From 68e5406673c49d6473c407bc269815927c77577d Mon Sep 17 00:00:00 2001 From: moonman Date: Tue, 29 Mar 2016 17:29:18 -0600 Subject: [PATCH] Add cryptodev-dkms 1.8-1 --- alarm/cryptodev-dkms/PKGBUILD | 46 +++++++++++++++++++++ alarm/cryptodev-dkms/cryptodev-dkms.install | 15 +++++++ alarm/cryptodev-dkms/dkms.conf | 7 ++++ 3 files changed, 68 insertions(+) create mode 100644 alarm/cryptodev-dkms/PKGBUILD create mode 100644 alarm/cryptodev-dkms/cryptodev-dkms.install create mode 100644 alarm/cryptodev-dkms/dkms.conf diff --git a/alarm/cryptodev-dkms/PKGBUILD b/alarm/cryptodev-dkms/PKGBUILD new file mode 100644 index 000000000..74cb17639 --- /dev/null +++ b/alarm/cryptodev-dkms/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Oleg Rakhmanov + +pkgname=cryptodev-dkms +_pkgname=${pkgname%-*} +cryptodev_commit=7a3a9ee1329f7224b4fc564b80ef8160457caf76 + +pkgver=1.8 +pkgrel=1 + +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') +sha256sums=('4ed29c923506c2e25e7250cf5984f659a6a430548fe625092c6a2d5f55d2798a' + '8a4e7273cc8b9b62fddb86e8328b5a511fc6e92cefe7444d8aad45410b41be5f') +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 +} diff --git a/alarm/cryptodev-dkms/cryptodev-dkms.install b/alarm/cryptodev-dkms/cryptodev-dkms.install new file mode 100644 index 000000000..c78993cee --- /dev/null +++ b/alarm/cryptodev-dkms/cryptodev-dkms.install @@ -0,0 +1,15 @@ +post_install() { + dkms install cryptodev/${1%%-*} +} + +pre_upgrade() { + pre_remove ${2%%-*} +} + +post_upgrade() { + post_install ${1%%-*} +} + +pre_remove() { + dkms remove cryptodev/${1%%-*} --all +} diff --git a/alarm/cryptodev-dkms/dkms.conf b/alarm/cryptodev-dkms/dkms.conf new file mode 100644 index 000000000..0a897c6cf --- /dev/null +++ b/alarm/cryptodev-dkms/dkms.conf @@ -0,0 +1,7 @@ +PACKAGE_NAME="@_PKGNAME@" +PACKAGE_VERSION="@PKGVER@" +MAKE[0]="make -s build" +CLEAN="make -s clean" +BUILT_MODULE_NAME[0]="@_PKGNAME@" +DEST_MODULE_LOCATION[0]="/extra" +AUTOINSTALL="yes"