From db657f7c5e618e886964709eaf1540f83f1ac4b2 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich <kevin@archlinuxarm.org> Date: Thu, 11 Apr 2013 02:45:12 +0000 Subject: [PATCH] added community/botan --- community/botan/PKGBUILD | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 community/botan/PKGBUILD diff --git a/community/botan/PKGBUILD b/community/botan/PKGBUILD new file mode 100644 index 000000000..5a17163e8 --- /dev/null +++ b/community/botan/PKGBUILD @@ -0,0 +1,49 @@ +# $Id: PKGBUILD 87983 2013-04-09 20:48:46Z arodseth $ +# Maintainer: Alexander Rødseth <rodseth@gmail.com> +# Contributor: Angel Velasquez <angvp@archlinux.org> +# Contributor: Douglas Soares de Andrade <douglas@archlinux.org> +# Contributor: d'Ronin <daronin@2600.com> + +# ALARM: Kevin Mihelich <kevin@archlinuxarm.org> +# - compiler flags adjustment to build correctly +# - --cpu in configure set to correct architectures, autodetect fails + +pkgname=botan +pkgver=1.10.5 +pkgrel=1 +pkgdesc='Crypto library written in C++' +license=('BSD') +arch=('x86_64' 'i686') +url='http://botan.randombit.net/' +depends=('gcc-libs' 'sh') +makedepends=('python2') +source=("http://files.randombit.net/botan/Botan-${pkgver}.tbz") +sha256sums=('2934c00533847dc93c485081d3ce6aae4a110151a69b587b895241159da77cf3') + +build() { + cd "$srcdir/Botan-$pkgver" + + if [[ $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 + + sed -i 's:env python:env python2:' configure.py + ./configure.py --prefix=/usr --cpu=$CPU + make +} + +package() { + cd "$srcdir/Botan-$pkgver" + + make DESTDIR="$pkgdir/usr" install + install -Dm644 doc/license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + find "$pkgdir/usr/share/doc" -type f -exec chmod 0644 {} \; +} + +# vim:set ts=2 sw=2 et: