PKGBUILDs/community/botan/PKGBUILD

72 lines
2.1 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
2015-08-02 18:23:14 +00:00
# - AArch64 patch
2013-04-11 02:45:12 +00:00
pkgname=botan
2015-09-27 13:24:16 +00:00
pkgver=1.11.20
2015-01-12 12:24:12 +00:00
pkgrel=1
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')
2015-08-02 18:23:14 +00:00
makedepends=('python2' 'asio' 'git')
2015-09-27 13:24:16 +00:00
#source=("git://github.com/randombit/botan.git#commit=8e19ecf11c"
source=("http://botan.randombit.net/releases/Botan-${pkgver}.tgz"{,.asc}
2015-08-02 18:23:14 +00:00
'0001-aarch64-support.patch')
2015-09-27 13:24:16 +00:00
md5sums=('18dc2498cbcef88b553faca8eb5fac49'
'SKIP'
2015-08-02 18:23:14 +00:00
'37165d2a365dd2e9d779b89fa55ba77b')
# Botan Distribution Key. To import: gpg --import botan.key
2015-09-27 13:24:16 +00:00
validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC')
2015-04-28 12:28:26 +00:00
2015-01-05 15:58:50 +00:00
prepare() {
2015-09-27 13:24:16 +00:00
cd "${pkgname^}-$pkgver"
patch -p1 -i ../0001-aarch64-support.patch
2015-01-09 13:01:53 +00:00
2015-01-05 15:58:50 +00:00
# Use python2 for the installation scripts
2015-09-27 13:24:16 +00:00
find src/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() {
2015-09-27 13:24:16 +00:00
cd "${pkgname^}-$pkgver"
2013-04-11 02:45:12 +00:00
2015-08-02 18:23:14 +00:00
if [[ $CARCH == 'aarch64' ]]; then
CPU='aarch64'
elif [[ $CARCH == 'armv7h' ]]; then
2013-04-11 02:45:12 +00:00
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-09-27 13:24:16 +00:00
python2 configure.py \
--prefix=/usr \
--enable-modules=cvc \
--destdir="$pkgdir/usr" \
--cpu=$CPU
2015-08-02 18:23:14 +00:00
make
2013-04-11 02:45:12 +00:00
}
package() {
2015-09-27 13:24:16 +00:00
cd "${pkgname^}-$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-12 12:24:12 +00:00
install -Dm644 doc/license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
2013-04-11 02:45:12 +00:00
}
# vim:set ts=2 sw=2 et: