# $Id$ # Maintainer: Felix Yan # Contributor: drakkan # ALARM: Kevin Mihelich # - compiler flags adjustment to build correctly # - --cpu in configure set to correct architectures, autodetect fails # - AArch64 patch pkgname=botan1.10 pkgver=1.10.13 pkgrel=1 pkgdesc='Crypto library written in C++ - old stable branch' license=('BSD') arch=('x86_64' 'i686') url='http://botan.randombit.net/' depends=('gcc-libs' 'sh') makedepends=('python2') source=("http://botan.randombit.net/releases/Botan-${pkgver}.tgz" '0001-aarch64-support.patch') sha256sums=('23ec973d4b4a4fe04f490d409e08ac5638afe3aa09acd7f520daaff38ba19b90' '0e279e3b16e115e26f5dc1edf02a4082f063134513aaf6ad1fbd10a1d2624e37') prepare() { cd "${pkgname^}-$pkgver" patch -p1 -i ../0001-aarch64-support.patch } build() { cd "Botan-$pkgver" if [[ $CARCH == 'aarch64' ]]; then CPU='aarch64' elif [[ $CARCH == 'armv7h' ]]; then sed -i 's/lang_flags "/lang_flags "-mfpu=vfpv3-d16 -mfloat-abi=hard /' src/build-data/cc/gcc.txt CPU='arm/armv7-a' elif [[ $CARCH == 'armv6h' ]]; then sed -i 's/lang_flags "/lang_flags "-mfpu=vfp -mfloat-abi=hard /' src/build-data/cc/gcc.txt CPU='arm/armv6' elif [[ $CARCH == 'arm' ]]; then CPU='arm/armv5te' fi python2 configure.py --prefix=/usr --enable-modules=cvc --cpu=$CPU make } package() { cd "Botan-$pkgver" make DESTDIR="$pkgdir/usr" install find "$pkgdir/usr/share/doc" -type f -exec chmod 0644 {} \; install -Dm644 doc/license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } # vim:set ts=2 sw=2 et: