PKGBUILDs/alarm/cryptodev-dkms/PKGBUILD

61 lines
1.9 KiB
Bash
Raw Normal View History

2016-03-29 23:29:18 +00:00
# Maintainer: Oleg Rakhmanov <oleg [at] archlinuxarm [dot] org>
pkgname=cryptodev-dkms
_pkgname=${pkgname%-*}
cryptodev_commit=7a3a9ee1329f7224b4fc564b80ef8160457caf76
pkgver=1.8
2016-08-20 05:52:42 +00:00
pkgrel=4
2016-03-29 23:29:18 +00:00
pkgdesc="Cryptodev module to take advantage of hardware crypto engines in userspace"
arch=('arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/cryptodev-linux/cryptodev-linux"
license=('GPL2')
depends=('dkms')
install=${pkgname}.install
provides=('cryptodev_friendly')
source=("cryptodev-${cryptodev_commit}.tar.gz::https://github.com/cryptodev-linux/cryptodev-linux/archive/${cryptodev_commit}.tar.gz"
2016-05-30 19:19:19 +00:00
'dkms.conf'
2016-08-20 05:52:42 +00:00
'pageaccess_fix_for_4.6+.patch'
'support_skcipher_and_ablkcipher.patch'
'fix_test_compile_time_warnings.patch')
2016-03-29 23:29:18 +00:00
sha256sums=('4ed29c923506c2e25e7250cf5984f659a6a430548fe625092c6a2d5f55d2798a'
2016-06-22 03:56:19 +00:00
'c42865a4a800a4927619ac5ed742be59a6d960af8295727af909e9ea9587f3da'
2016-08-20 05:52:42 +00:00
'f384d373a28ba3a900ddfeb50bfb37659f55e31059cb898fd2acffefef60d042'
'6bc437a1e698b9527e50354b8dba7f16cf8629bee95492e2f1a0201abe975b86'
'1b8541d772d5b8c145a7f0671e23096cfc42bbce5adaf737566584c885a266a9')
2016-05-30 19:19:19 +00:00
prepare() {
cd "${srcdir}/cryptodev-linux-${cryptodev_commit}"
2016-08-20 05:52:42 +00:00
patch -Np1 -i "${srcdir}/pageaccess_fix_for_4.6+.patch"
patch -Np1 -i "${srcdir}/support_skcipher_and_ablkcipher.patch"
patch -Np1 -i "${srcdir}/fix_test_compile_time_warnings.patch"
2016-05-30 19:19:19 +00:00
}
2016-03-29 23:29:18 +00:00
package() {
cd "${srcdir}"
local install_dir="${pkgdir}/usr/src/${_pkgname}-${pkgver}"
# Copy dkms.conf
install -Dm644 dkms.conf "${install_dir}/dkms.conf"
# Set name and version
sed -e "s/@_PKGNAME@/${_pkgname}/" \
-e "s/@PKGVER@/${pkgver}/" \
-i "${install_dir}/dkms.conf"
# Copy sources
cd "cryptodev-linux-${cryptodev_commit}"
for d in $(find . -type d)
do
install -dm755 "${install_dir}/$d"
done
for f in $(find . -type f)
do
install -m644 "$f" "${install_dir}/$f"
done
}