summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Coenen2016-06-27 10:19:03 +0200
committerManuel Coenen2016-06-27 10:19:03 +0200
commit2cf6995a17534fd338878d8df5139f0027c60ef7 (patch)
treecd72d2d504ca438d031070280d2aa67c3082cab3
downloadaur-2cf6995a17534fd338878d8df5139f0027c60ef7.tar.gz
Initial release of c2_gpio-dkms-git
-rw-r--r--.SRCINFO23
-rw-r--r--90-c2_bus.rules2
-rw-r--r--PKGBUILD49
-rw-r--r--c2_gpio-dkms-git.install5
-rw-r--r--dkms.conf7
5 files changed, 86 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..29d5fc53c87
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = c2_gpio-dkms-git
+ pkgdesc = Linux GPIO C2 Bus Master Implementation
+ pkgver = r48.2d5f58f
+ pkgrel = 1
+ url = https://github.com/dimhoff/si4010prog
+ install = c2_gpio-dkms-git.install
+ arch = any
+ license = GPL2
+ makedepends = git
+ makedepends = make
+ makedepends = gcc
+ depends = dkms
+ provides = c2_gpio-dkms
+ conflicts = c2_gpio
+ source = c2_gpio-dkms-git::git+git://github.com/dimhoff/si4010prog.git
+ source = dkms.conf
+ source = 90-c2_bus.rules
+ md5sums = SKIP
+ md5sums = 76a06cf15c98143494aefa819533f959
+ md5sums = 4299721bd42e71c877dc0816f60c5ea1
+
+pkgname = c2_gpio-dkms-git
+
diff --git a/90-c2_bus.rules b/90-c2_bus.rules
new file mode 100644
index 00000000000..edc0774d9c7
--- /dev/null
+++ b/90-c2_bus.rules
@@ -0,0 +1,2 @@
+KERNEL=="c2_gpio", SUBSYSTEM=="module", ACTION=="add", PROGRAM="/usr/bin/grep c2_gpio /proc/devices", RUN+="/usr/bin/bash -c '/usr/bin/mknod /dev/c2_bus c %c{1} 0 && /usr/bin/chmod 777 /dev/c2_bus'"
+KERNEL=="c2_gpio", SUBSYSTEM=="module", ACTION=="remove", RUN+="/usr/bin/rm /dev/c2_bus"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..fd695d88bd3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Manuel Coenen <manuel dot coenen at gmail dot com>
+_pkgbase=c2_gpio
+pkgname=c2_gpio-dkms-git
+pkgver=r48.2d5f58f
+pkgrel=1
+pkgdesc="Linux GPIO C2 Bus Master Implementation"
+arch=('any')
+url="https://github.com/dimhoff/si4010prog"
+license=('GPL2')
+depends=('dkms')
+makedepends=('git'
+'make'
+'gcc')
+provides=("${pkgname%-git}")
+conflicts=("${_pkgbase}")
+install=${pkgname}.install
+source=("${pkgname}::git+git://github.com/dimhoff/si4010prog.git"
+'dkms.conf'
+'90-c2_bus.rules'
+)
+md5sums=('SKIP'
+ '76a06cf15c98143494aefa819533f959'
+ '4299721bd42e71c877dc0816f60c5ea1')
+
+pkgver() {
+ cd "$srcdir/${pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/${pkgname}/drivers/c2_gpio"
+ make
+}
+
+package() {
+
+ # Copy dkms.conf
+ install -Dm644 dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
+ install -Dm644 90-c2_bus.rules "${pkgdir}"/usr/lib/udev/rules.d/90-c2_bus.rules
+
+ # Set name and version
+ sed -e "s/@_PKGBASE@/${_pkgbase}/" \
+ -e "s/@PKGVER@/${pkgver}/" \
+ -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
+
+ # Copy sources (including Makefile)
+ cd "$srcdir/${pkgname}/drivers/c2_gpio"
+ cp -r * "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
+}
diff --git a/c2_gpio-dkms-git.install b/c2_gpio-dkms-git.install
new file mode 100644
index 00000000000..433d9216c0d
--- /dev/null
+++ b/c2_gpio-dkms-git.install
@@ -0,0 +1,5 @@
+post_install() {
+ echo ">>>> If you want to automatically load c2_gpio on system start execute"
+ echo ">>>> echo c2_gpio > /etc/modules-load.d/c2_gpio.conf"
+ echo ">>>> as root"
+}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 00000000000..71b0800efc6
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,7 @@
+PACKAGE_NAME="@_PKGBASE@"
+PACKAGE_VERSION="@PKGVER@"
+#MAKE[0]="make --uname_r=$kernelver"
+#CLEAN="make clean"
+BUILT_MODULE_NAME[0]="@_PKGBASE@"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/misc"
+AUTOINSTALL="yes"