# Maintainer: Oleg Rakhmanov pkgname=cryptodev-dkms _pkgname=${pkgname%-*} cryptodev_commit=7a3a9ee1329f7224b4fc564b80ef8160457caf76 pkgver=1.8 pkgrel=2 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" 'dkms.conf' 'cryptodev_linux_4.6_fix.patch') sha256sums=('4ed29c923506c2e25e7250cf5984f659a6a430548fe625092c6a2d5f55d2798a' '8a4e7273cc8b9b62fddb86e8328b5a511fc6e92cefe7444d8aad45410b41be5f' '271e8f0891f57e00f50c1dbb67edc6369e3b45eb850a79099cf50916f68cf723') prepare() { cd "${srcdir}/cryptodev-linux-${cryptodev_commit}" patch -Np1 -i "${srcdir}/cryptodev_linux_4.6_fix.patch" } 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 }