# Maintainer: Natanael Copa _flavor=grsec _kpkg=linux-$_flavor _kver=3.18.11 _kpkgrel=2 _mypkgrel=0 _kpkgver="$_kver-r$_kpkgrel" _abi_release=${_kver}-${_kpkgrel}-${_flavor} _realname=devicemaster-linux pkgname=${_realname}-${_flavor} pkgver=$_kver # when changing _realver we *must* bump _mypkgrel _realver=7.06 pkgrel=$(( $_kpkgrel + $_mypkgrel )) pkgdesc="NS-Link Device Drivers $_realver for linux-$_flavor" url="http://www.comtrol.com/resources/product-resources-white-papers/ns-link-device-drivers" arch="all" license="GPL" depends="linux-${_flavor}=${_kpkgver}" makedepends="linux-${_flavor}-dev=${_kpkgver} linux-headers" install= install_if="$_kpkg=$_kpkgver $_realname" subpackages="" source="ftp://ftp.comtrol.com/dev_mstr/rts/drivers/linux/devicemaster-linux-$_realver.tar.gz nslink.patch " prepare() { # verify the kernel version (if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then _name=$pkgname . ../../main/linux-${_flavor}/APKBUILD pkgname=$_name [ "$_kver" != "$pkgver" ] \ && die "please update _kver to $pkgver" [ "$_kpkgrel" != "$pkgrel" ] \ && die "please update _kpkgrel to $pkgrel" fi) || return 1 cd "$srcdir/$_realname-$_realver" for i in $source; do case $i in *.patch|*.diff) msg "Applying $i" patch -p1 -i "$srcdir"/$i || return 1 ;; esac done } build() { cd "$srcdir/$_realname-$_realver" make -C /lib/modules/$_abi_release/build SUBDIRS="$PWD" modules \ V=1 || return 1 } package() { cd "$srcdir/$_realname-$_realver" mkdir -p "$pkgdir/lib/modules/${_abi_release}/misc/" cp *.ko "$pkgdir/lib/modules/${_abi_release}/misc/" || return 1 } md5sums="deded30023c8135c9beb06696e8c578f devicemaster-linux-7.06.tar.gz 4a7ab12e64cfb0dc2f5270a95534ca18 nslink.patch" sha256sums="6b11295952d1d74a6102a295a6ed5651ec040a0d8c30838cd23a1f3f7c95a4e7 devicemaster-linux-7.06.tar.gz 6d635a133f795a90ff776b1f5026d4cae734570a46042b3e23c3f6bd07d2c11c nslink.patch" sha512sums="496144ee40464c96442ce655424db886cb5b4df1701e30cc8d059fc918e8916cb6c3b0b57cead2d0e9d50e4618ee13efa5f3630765545ea45e29f8080101800b devicemaster-linux-7.06.tar.gz acb1e19bb56f47ba95bebf386c66a5639e11ed5c3d7e8591060fcc739d5383cec0cab08a1accaeef930adae495f3a63526ed1491977567caa257e4a9bd219045 nslink.patch"