summaryrefslogtreecommitdiff
path: root/community/preload/PKGBUILD
blob: e5457727cb4366afc09e257ff90ccdc45ce7d73c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=preload
pkgver=0.6.4
pkgrel=2
arch=('i686' 'x86_64')
pkgdesc="Makes applications run faster by prefetching binaries and shared objects"
url="http://sourceforge.net/projects/preload"
license=('GPL2')
makedepends=('help2man' 'pkgconfig')
depends=('glib2')
backup=('etc/preload.conf')
options=('!makeflags')
install=$pkgname.install
source=(http://downloads.sourceforge.net/sourceforge/preload/$pkgname-$pkgver.tar.gz \
        rc.preload)
md5sums=('10786287b55afd3a2b433b4f898809f4'
         'bde0dd7867c77e7c4d10b481b5cddcd3')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --localstatedir=/var
  make || return 1
  make DESTDIR=$startdir/pkg install
  
  install -D -m755 ../rc.preload $startdir/pkg/etc/rc.d/preload
  rm -rf $startdir/pkg/etc/rc.d/init.d

  rm -rf $startdir/pkg/var/lib/preload/preload.state
  rm -rf $startdir/pkg/var/log/preload.log

  mkdir $startdir/pkg/etc/conf.d
  mv $startdir/pkg/etc/sysconfig/* $startdir/pkg/etc/conf.d
  rm -rf $startdir/pkg/etc/sysconfig

  sed -r -i 's#^((map|exe)prefix =) (.+)$#\1 /opt;\3#' $startdir/pkg/etc/preload.conf
}