Skip to content

Instantly share code, notes, and snippets.

@4s1
Last active Oct 6, 2016
Embed
What would you like to do?
--- PKGBUILD?h=dddvb-dkms 2016-09-26 20:19:08.000000000 +0200
+++ dddvb-0.9.26.PKGBUILD.txt 2016-09-26 20:23:07.350412793 +0200
@@ -1,13 +1,13 @@
# This PKGBUILD is part of the VDR4Arch project [https://github.com/vdr4arch]
-# Maintainer: Christopher Reimer <mail+vdr4arch[at]c-reimer[dot]de>
-_pkgbase="dddvb"
+# Maintainer: schulmar
pkgname="dddvb-dkms"
+_pkgname=${pkgname%-*}
pkgdesc="Official Digital Devices driver package as DKMS"
pkgver=0.9.26
pkgrel=1
arch=("any")
-url="http://download.digital-devices.de"
+url="https://github.com/DigitalDevices/dddvb"
license=("GPL2")
depends=("dkms")
makedepends=('linux-headers')
@@ -15,25 +15,33 @@
conflicts=('digitaldevices-dvb-drivers' 'dvbsky-dvb-drivers' 'technotrend-dvb-drivers')
provides=('dddvb-dkms')
install="${pkgname}.install"
-source=("https://github.com/DigitalDevices/$_pkgbase/archive/$pkgver.tar.gz")
+source=("https://github.com/DigitalDevices/$_pkgname/archive/$pkgver.tar.gz")
md5sums=('2724912a8331a470a1ed4cb26fe4165b')
prepare() {
cd "$srcdir"
- echo "PACKAGE_NAME=\"$_pkgbase\"" > dkms.conf
+ echo "PACKAGE_NAME=\"$_pkgname\"" > dkms.conf
echo "PACKAGE_VERSION=\"$pkgver\"" >> dkms.conf
echo 'AUTOINSTALL="yes"' >> dkms.conf
echo 'CHECK_MODULE_VERSION="no"' >> dkms.conf
echo 'MAKE="make"' >> dkms.conf
echo 'CLEAN="make clean"' >> dkms.conf
- cd "$srcdir/$_pkgbase-$pkgver"
+ cd "$srcdir/$_pkgname-$pkgver"
sed -i '/apps/d' Makefile
sed -i 's/lib\/modules/usr\/lib\/modules/g' Makefile
+
+ # make cross compile compatible
+ sed -i 's/$(shell uname -r)/$(kernelver)/' Makefile
+ sed -i '1i kernelver ?= $(shell uname -r)' Makefile
+
+ # remove apps
+ rm -rf ./apps/
}
build() {
- cd "$srcdir/$_pkgbase-$pkgver"
+ kernelver=$(uname -r)
+ cd "$srcdir/$_pkgname-$pkgver"
make
# Borrowed from dahdi-linux
@@ -51,9 +59,10 @@
}
package() {
- install -D -m 0644 "$srcdir/dkms.conf" "$pkgdir/usr/src/$_pkgbase-$pkgver/dkms.conf"
+ install -D -m 0644 "$srcdir/dkms.conf" "$pkgdir/usr/src/$_pkgname-$pkgver/dkms.conf"
- cd "$srcdir/$_pkgbase-$pkgver"
+ cd "$srcdir/$_pkgname-$pkgver"
- cp -a * "$pkgdir/usr/src/$_pkgbase-$pkgver"
+ cp -a * "$pkgdir/usr/src/$_pkgname-$pkgver"
}
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment