mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
70 lines
2 KiB
Bash
70 lines
2 KiB
Bash
# $Id: PKGBUILD 87983 2013-04-09 20:48:46Z arodseth $
|
|
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
|
|
# Contributor: Angel Velasquez <angvp@archlinux.org>
|
|
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
|
|
# Contributor: d'Ronin <daronin@2600.com>
|
|
# Contributor: Hexchain Tong <richard0053@gmail.com>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - compiler flags adjustment to build correctly
|
|
# - --cpu in configure set to correct architectures, autodetect fails
|
|
# - AArch64 patch
|
|
|
|
pkgname=botan
|
|
pkgver=2.3.0
|
|
pkgrel=1
|
|
pkgdesc='Crypto library written in C++'
|
|
arch=('x86_64' 'i686')
|
|
url='https://botan.randombit.net/'
|
|
license=('BSD')
|
|
depends=('gcc-libs' 'sh')
|
|
makedepends=('python')
|
|
validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC')
|
|
source=("https://botan.randombit.net/releases/Botan-${pkgver}.tgz"{,.asc}
|
|
'0001-aarch64-support.patch')
|
|
sha256sums=('39f970fee5986a4c3e425030aef50ac284da18596c004d1a9cce7688c4e6d47c'
|
|
'SKIP'
|
|
'0e279e3b16e115e26f5dc1edf02a4082f063134513aaf6ad1fbd10a1d2624e37')
|
|
|
|
prepare() {
|
|
cd "${pkgname^}-$pkgver"
|
|
|
|
patch -p1 -i ../0001-aarch64-support.patch
|
|
}
|
|
|
|
build() {
|
|
cd "${pkgname^}-$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
|
|
|
|
[[ $CARCH != "aarch64" ]] && CONFIG="--disable-neon"
|
|
|
|
./configure.py --prefix=/usr --cpu=$CPU $CONFIG
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd "${pkgname^}-$pkgver"
|
|
|
|
./botan-test
|
|
}
|
|
|
|
package() {
|
|
cd "${pkgname^}-$pkgver"
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
install -Dm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|
|
|
|
# getver: github.com/randombit/botan
|
|
# vim: ts=2 sw=2 et:
|