summaryrefslogtreecommitdiff
path: root/community/preload/PKGBUILD
blob: 612cee5eadce6d644847d496c92f551a8b2a1b63 (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
39
40
41
42
43
44
45
46
47
# $Id: PKGBUILD 64901 2012-02-18 20:00:16Z bpiotrowski $
# Maintainer:
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=preload
pkgver=0.6.4
pkgrel=4
arch=('i686' 'x86_64' 'mips64el')
pkgdesc="Makes applications run faster by prefetching binaries and shared objects"
url="http://sourceforge.net/projects/preload"
license=('GPL2')
depends=('glib2' 'bash')
makedepends=('help2man' 'pkgconfig')
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 "${srcdir}"/$pkgname-$pkgver
  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --mandir=/usr/share/man \
              --localstatedir=/var
  make
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
  
  install -D -m755 "${srcdir}"/rc.preload "${pkgdir}"/etc/rc.d/preload
  rm -rf "${pkgdir}"/etc/rc.d/init.d

  rm -rf "${pkgdir}"/var/lib/preload/preload.state
  rm -rf "${pkgdir}"/var/log/preload.log

  install -d "${pkgdir}"/etc/conf.d
  mv "${pkgdir}"/etc/sysconfig/* "${pkgdir}"/etc/conf.d
  rm -rf "${pkgdir}"/etc/sysconfig

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