updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / nacl / PKGBUILD
blob54f18c578a28369834b28849676ea3153f714026
1 pkgname=nacl
2 arch=(i686 x86_64)
3 pkgver=20110221
4 pkgrel=1
5 pkgdesc="NaCl (pronounced 'salt') Networking and Cryptography library"
6 url="http://nacl.cace-project.eu/"
7 license=('Public Domain')
8 source=(http://hyperelliptic.org/nacl/${pkgname}-${pkgver}.tar.bz2)
9 md5sums=('7efb5715561c3d10dafd3fa97b4f2d20')
11 build() {
12   cd "$srcdir/${pkgname}-${pkgver}"
14   # The do script does by far too much magic. The following will prevent NaCL to be built for unnecessary architectures
15   cat >okcompilers/c <<EOF
16 gcc -fomit-frame-pointer
17 gcc -O -fomit-frame-pointer
18 gcc -O3 -fomit-frame-pointer -funroll-loops
19 EOF
21   cat >okcompilers/cpp <<EOF
22 g++ -fomit-frame-pointer
23 g++ -O -fomit-frame-pointer
24 g++ -O3 -fomit-frame-pointer -funroll-loops
25 EOF
27   msg "This will take some time. Go get a coffee or something ;-)"
28   ./do
30   install -D -m 644 build/*/lib/*/libnacl.a "${pkgdir}/usr/lib/libnacl.a"
32   install -d "${pkgdir}/usr/include/nacl"
33   install -t "${pkgdir}/usr/include/nacl" build/*/include/*/*
34   rm "${pkgdir}"/usr/include/nacl/{cpucycles,randombytes}.h