summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD44
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..862caffc00c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = xtrx-linux-pcie-drv-git
+ pkgdesc = XTRX PCI driver for linux
+ pkgver = r17.5ae3a3e
+ pkgrel = 1
+ url = https://github.com/xtrx-sdr/xtrx_linux_pcie_drv
+ arch = any
+ license = GPL
+ makedepends = git
+ makedepends = cmake
+ makedepends = dkms
+ provides = xtrx-linux-pcie-drv
+ conflicts = xtrx-linux-pcie-drv
+ source = git+https://github.com/xtrx-sdr/xtrx_linux_pcie_drv
+ md5sums = SKIP
+
+pkgname = xtrx-linux-pcie-drv-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..75b5f91b497
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: lain <aur@hacktheinter.net>
+pkgname=xtrx-linux-pcie-drv-git
+pkgver=r17.5ae3a3e
+pkgrel=1
+pkgdesc="XTRX PCI driver for linux"
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+arch=('any')
+url='https://github.com/xtrx-sdr/xtrx_linux_pcie_drv'
+md5sums=('SKIP')
+license=('GPL')
+depends=()
+makedepends=('git' 'cmake' 'dkms')
+source=("git+$url")
+
+pkgver() {
+ cd xtrx_linux_pcie_drv
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd xtrx_linux_pcie_drv
+
+ # pkgbuild dkms stuff isn't happy about the version
+ # string 0.0.1-2, specifically the hyphenation.
+ # let's patch it to just match $pkgver
+ sed -e "s/PACKAGE_VERSION=\"[^\"]\\+\"/PACKAGE_VERSION=\"${pkgver}\"/" \
+ -i 'dkms.conf'
+ sed -e "s/\${LIBVER}-\${MAINT_VERSION}/${pkgver}/" \
+ -i 'CMakeLists.txt'
+
+ mkdir -p build
+
+ cd build
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package() {
+ cd xtrx_linux_pcie_drv/build
+ make DESTDIR="$pkgdir/" install
+}