updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / libgcrypt-hardened / PKGBUILD
blob8ebba005c024306361fd66d4422ea38f45e9e177
3 pkgname=libgcrypt-hardened
4 pkgver=1.4.6
5 pkgrel=3
6 pkgdesc="a general purpose crypto library based on the code used"
7 arch=(i686 x86_64)
8 url="http://www.gnupg.org"
9 license=('LGPL')
10 depends=('libgpg-error>=1.9')
11 options=('!libtool' '!emptydirs')
12 install=libgcrypt.install
13 source=(ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${pkgver}.tar.bz2
14         #ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/libgcrypt/${pkgname}-${pkgver}.tar.bz2
16 provides=('libgcrypt=1.4.6-3')
17 replaces=('libgcrypt<=1.4.6-3')
18 conflicts=('libcrypt=>1.4.6-3')
20 md5sums=('dbf99425a4fe9217c84ce3a35d938634')
22 build() {
23   pkgname="libgcrypt"
24   export CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=2 -fstack-protector --param ssp-buffer-size=4"
25   export LDFLAGS="${LDFLAGS} -Wl,-z,relro -Wl,-z,now"
26   cd ${srcdir}/${pkgname}-${pkgver}
27   ./configure --prefix=/usr \
28         --disable-static \
29         --disable-padlock-support
30   make
33 check() {
34   pkgname="libgcrypt"
35   cd ${srcdir}/${pkgname}-${pkgver}
36   make check
39 package() {
40   pkgname="libgcrypt"
41   cd ${srcdir}/${pkgname}-${pkgver}
42   make DESTDIR=${pkgdir} install
44   # Move dynamic libraries to /lib
45   install -d -m755 "${pkgdir}"/lib/
46   mv "${pkgdir}"/usr/lib/libgcrypt.so* "${pkgdir}"/lib/
47   ln -sf /lib/libgcrypt.so "${pkgdir}"/usr/lib/libgcrypt.so
48 pkgname="libgcrypt-hardened"