summaryrefslogtreecommitdiff
path: root/pkgs/haveged/PKGBUILD
blob: 20fbc6fdc9a7f228fc5da43b7d7268a1ef313be7 (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
# Maintainer: pootzko <pootzko@gmail.com>
# Contributor: kfgz

pkgname=haveged
pkgver=0.9
pkgrel=1
pkgdesc="A simple entropy daemon."
arch=('i686' 'x86_64')
url="http://www.issihosts.com/haveged/"
license="GPL"
depends=()
source=(${url}/${pkgname}-${pkgver}.tar.gz)
md5sums=('1830eae20c45f6b5d48790a1160392e5')

build() {
	cd ${srcdir}/${pkgname}-${pkgver}
	export CFLAGS="-march=native -O0 -pipe"
	
	mv init.d rc.d	
	
	sed -i 's/rc.d\/init.d/rc.d/g' rc.d/haveged
	sed -i 's/\/subsys//g' rc.d/haveged	
	sed -i "15s/success/echo \'success\'/g" rc.d/haveged	
	sed -i "24s/success/echo \'success\'/g" rc.d/haveged	
	sed -i "15s/failure/echo \'failure\'/g" rc.d/haveged	
	sed -i "24s/failure/echo \'failure\'/g" rc.d/haveged			
	sed -i s/init.d/rc.d/g Makefile.am
	sed -i s/init.d/rc.d/g Makefile.in	
	sed -i s/init.d/rc.d/g haveged.spec		
	sed -i s/init.d/rc.d/g README		

	sed -i 's/usr\/local/usr/g' configure
	sed -i 's/usr\/local/usr/g' haveged.spec
	sed -i 's/usr\/local/usr/g' INSTALL
	sed -i 's/usr\/local/usr/g' rc.d/haveged
	sed -i 's/usr\/local/usr/g' README
		
	./configure --prefix=/usr
	make || return 1
	make DESTDIR=${pkgdir} install
}