summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Mikulicz2021-01-16 14:13:03 +0100
committerSzymon Mikulicz2021-01-16 14:13:03 +0100
commit279f0a699b5ffb4187fff2b0aaac9d9a1fea21b6 (patch)
tree172f29468a0b064015ef7d5a2fad92112fbac93b
downloadaur-comedi-dkms-git.tar.gz
Create package
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD35
2 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5997d815a96
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = comedi-dkms-git
+ pkgdesc = The Linux Control and Measurement Device Interface
+ pkgver = r3496.9a780c9a
+ pkgrel = 1
+ url = https://github.com/Linux-Comedi/comedi
+ arch = any
+ license = GPL2
+ makedepends = git
+ depends = dkms
+ depends = automake
+ optdepends = comedilib: userspace library for COMEDI devices
+ conflicts = comedi
+ source = comedi::git+https://github.com/Linux-Comedi/comedi.git
+ sha256sums = SKIP
+
+pkgname = comedi-dkms-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..44801cd7e4b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Ashymad <ashymad@posteo.net>
+
+_pkgbase=comedi
+pkgname=${_pkgbase}-dkms-git
+pkgver=r3496.9a780c9a
+pkgrel=1
+pkgdesc="The Linux Control and Measurement Device Interface"
+arch=('any')
+url="https://github.com/Linux-Comedi/comedi"
+depends=('dkms' 'automake')
+makedepends=('git')
+optdepends=('comedilib: userspace library for COMEDI devices')
+license=('GPL2')
+conflicts=("${_pkgbase}")
+
+source=("${_pkgbase}::git+$url.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${_pkgbase}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cd "$srcdir/${_pkgbase}"
+
+ autoupdate
+ autoreconf -vfi
+
+ mkdir -p "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
+ cp -vr * "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
+
+ sed -e "s/^PACKAGE_VERSION=.*$/PACKAGE_VERSION=${pkgver}/" \
+ -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
+}