PKGBUILDs/community/botan/PKGBUILD

61 lines
1.9 KiB
Bash
Raw Normal View History

2013-04-11 02:45:12 +00:00
# $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>
2015-01-09 13:01:53 +00:00
# Contributor: Hexchain Tong <richard0053@gmail.com>
2013-04-11 02:45:12 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - compiler flags adjustment to build correctly
# - --cpu in configure set to correct architectures, autodetect fails
pkgname=botan
2015-01-05 15:58:50 +00:00
pkgver=1.11.12
2015-01-09 13:01:53 +00:00
pkgrel=2
2013-04-11 02:45:12 +00:00
pkgdesc='Crypto library written in C++'
license=('BSD')
arch=('x86_64' 'i686')
url='http://botan.randombit.net/'
2015-01-05 15:58:50 +00:00
depends=('gcc-libs' 'sh' 'asio')
makedepends=('python2' 'asio')
source=("http://botan.randombit.net/releases/Botan-${pkgver}.tgz"{,.asc})
sha256sums=('053d4c2647d9cc2da99112717facb36cf98c2b0f3d99bd7e37c9677c6b5c3025' 'SKIP')
validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC') # Botan Distribution Key
prepare() {
2015-01-09 13:01:53 +00:00
cd "Botan-$pkgver/src"
2015-01-05 15:58:50 +00:00
# Use python2 for the installation scripts
2015-01-09 13:01:53 +00:00
find scripts -name '*.py' -exec sed -i -e '1s,python$,python2,' {} +
2015-01-05 15:58:50 +00:00
}
2013-04-11 02:45:12 +00:00
build() {
2013-11-25 14:42:12 +00:00
cd "Botan-$pkgver"
2013-04-11 02:45:12 +00:00
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
2015-01-05 15:58:50 +00:00
python2 configure.py --prefix=/usr --enable-modules=cvc --destdir="$pkgdir/usr" --cpu=$CPU
2013-04-11 02:45:12 +00:00
make
}
package() {
2013-11-25 14:42:12 +00:00
cd "Botan-$pkgver"
2013-04-11 02:45:12 +00:00
make DESTDIR="$pkgdir/usr" install
find "$pkgdir/usr/share/doc" -type f -exec chmod 0644 {} \;
2015-01-05 15:58:50 +00:00
install -Dm644 doc/license.rst "$pkgdir/usr/share/licenses/$pkgname/license.rst"
2015-01-09 13:01:53 +00:00
# Fix the pkg-config location
mv "$pkgdir/usr/pkgconfig" "$pkgdir/usr/lib/pkgconfig"
2013-04-11 02:45:12 +00:00
}
# vim:set ts=2 sw=2 et: