PKGBUILDs/community/botan/PKGBUILD

66 lines
1.7 KiB
Bash
Raw Normal View History

2018-07-03 11:40:51 +00:00
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2013-04-11 02:45:12 +00:00
# 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>
2018-04-11 12:40:19 +00:00
# Contributor: Jack Lloyd <jack@randombit.net>
2013-04-11 02:45:12 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2015-08-02 18:23:14 +00:00
# - AArch64 patch
2018-04-11 13:03:52 +00:00
# - disable neon on !AArch64
2013-04-11 02:45:12 +00:00
pkgname=botan
2019-11-06 00:46:59 +00:00
pkgver=2.12.0
2019-01-09 14:49:44 +00:00
pkgrel=1
2013-04-11 02:45:12 +00:00
pkgdesc='Crypto library written in C++'
2019-01-09 14:49:44 +00:00
arch=(x86_64)
2016-11-15 19:06:00 +00:00
url='https://botan.randombit.net/'
2019-01-09 14:49:44 +00:00
license=(BSD)
makedepends=(python)
2018-04-15 15:27:46 +00:00
optdepends=('python: for using botan2.py')
validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC')
2019-07-20 15:36:04 +00:00
source=("https://botan.randombit.net/releases/Botan-${pkgver}.tar.xz"{,.asc}
2015-08-02 18:23:14 +00:00
'0001-aarch64-support.patch')
2019-11-06 00:46:59 +00:00
sha256sums=('1eaefd459d52f27de1805cff8c68792e0610919648ee98e101980e94edb90a63'
2018-04-15 15:27:46 +00:00
'SKIP'
'0e279e3b16e115e26f5dc1edf02a4082f063134513aaf6ad1fbd10a1d2624e37')
2015-04-28 12:28:26 +00:00
2015-01-05 15:58:50 +00:00
prepare() {
2018-04-15 15:27:46 +00:00
cd "${pkgname^}-$pkgver"
2015-09-27 13:24:16 +00:00
patch -p1 -i ../0001-aarch64-support.patch
2015-01-05 15:58:50 +00:00
}
2013-04-11 02:45:12 +00:00
build() {
2018-04-15 15:27:46 +00:00
cd "${pkgname^}-$pkgver"
2013-04-11 02:45:12 +00:00
2017-04-21 18:07:52 +00:00
[[ $CARCH != "aarch64" ]] && CONFIG="--disable-neon"
2018-11-11 17:55:19 +00:00
# botan benefits from -O3. Upstream is using it when testing.
2019-04-21 00:19:50 +00:00
CXXFLAGS="$CXXFLAGS -O3" \
./configure.py \
2018-04-15 15:27:46 +00:00
--prefix=/usr \
--with-bzip \
--with-lzma \
2018-10-27 16:49:06 +00:00
--with-zlib \
2018-11-11 17:55:19 +00:00
--with-os-feature=getrandom \
2018-04-15 15:27:46 +00:00
$CONFIG
2019-01-09 14:49:44 +00:00
2015-08-02 18:23:14 +00:00
make
2013-04-11 02:45:12 +00:00
}
2015-10-18 15:30:41 +00:00
check() {
2018-04-15 15:27:46 +00:00
cd "${pkgname^}-$pkgver"
2015-10-18 15:30:41 +00:00
./botan-test
}
2013-04-11 02:45:12 +00:00
package() {
2018-04-15 15:27:46 +00:00
DESTDIR="$pkgdir" make -C "${pkgname^}-$pkgver" install
install -Dm644 "${pkgname^}-$pkgver/license.txt" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
2013-04-11 02:45:12 +00:00
}
2016-11-15 19:06:00 +00:00
# getver: github.com/randombit/botan
2017-08-15 12:35:24 +00:00
# vim: ts=2 sw=2 et: