summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothée Ravier2016-12-18 13:19:13 +0100
committerTimothée Ravier2016-12-18 13:19:13 +0100
commit2573c69555d91ed4f861df21b036a87147b8ca05 (patch)
treef55af836af205733e7934d9d6d47e57de0f56c53
parent0fe1369249dac64300d8722b2501bd4ef9bf8e38 (diff)
downloadaur-2573c69555d91ed4f861df21b036a87147b8ca05.tar.gz
Switch to DKMS. Will not build for linux-lts
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD94
-rw-r--r--bus1.install13
-rw-r--r--dkms.conf12
4 files changed, 89 insertions, 63 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4991e7e5f42f..9bbe228ad55f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,33 @@
# Generated by mksrcinfo v8
-# Thu Apr 21 23:31:51 UTC 2016
+# Sun Dec 18 12:17:30 UTC 2016
pkgbase = bus1-git
pkgdesc = Bus1 Out-of-Tree Kernel Module
- pkgver = r419.7f6b78e
+ pkgver = r937.dc398d5
pkgrel = 1
- url = https://github.com/bus1/bus1
- install = bus1.install
- arch = i686
+ url = http://www.bus1.org
arch = x86_64
+ arch = i686
license = LGPL2.1
+ makedepends = git
makedepends = xmlto
makedepends = docbook-xsl
- makedepends = git
- depends = linux-grsec=4.4.8.201604201957-1
- provides = bus1
- conflicts = bus1
- replaces = bus1
- options = !strip
source = git+https://github.com/bus1/bus1.git
+ source = dkms.conf
sha256sums = SKIP
+ sha256sums = 1dce1d7a39ca866c15fbeb305fbeebd1cafe40f02e4e42da77eaed5c6c2e9285
+
+pkgname = bus1-dkms-git
+ depends = dkms
+ provides = bus1
+ provides = bus1-git
+ conflicts = bus1
+ conflicts = bus1-git
+
+pkgname = bus1-headers-git
+ provides = bus1-headers
+ conflicts = bus1-headers
-pkgname = bus1-git
+pkgname = bus1-doc-git
+ provides = bus1-doc
+ conflicts = bus1-doc
diff --git a/PKGBUILD b/PKGBUILD
index c56d25859a83..4a22e87ac210 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,55 +1,73 @@
# Maintainer: Timothée Ravier <tim@siosm.fr>
-# Don't forget to set the EXTRAMODULES value in bus1.install
-
-# Values for a grsecurity patched kernel (linux-grsec)
-_kernel_version="4.4.8.201604201957-1"
-_extramodules_version="4.4.8"
-
-_dep_suffix="-grsec"
-_extramodules_version_suffix="grsec"
-
-# Values for an oficial Arch Linux kernel (linux)
-# _kernel_version="4.5.2-1"
-# _extramodules_version="4.5.2"
-
-# _dep_suffix=""
-# _extramodules_version_suffix="ARCH"
-
-pkgname=bus1-git
-_pkgname=${pkgname/-git}
-pkgver=r419.7f6b78e
+pkgbase=bus1-git
+_pkgbase=${pkgbase/-git}
+pkgname=(bus1-dkms-git bus1-headers-git bus1-doc-git)
+pkgver=r937.dc398d5
pkgrel=1
pkgdesc='Bus1 Out-of-Tree Kernel Module'
-arch=('i686' 'x86_64')
-url="https://github.com/bus1/${_pkgname}"
-depends=("linux${_dep_suffix}=${_kernel_version}")
-makedepends=('xmlto' 'docbook-xsl' 'git')
-provides=("${_pkgname}")
-conflicts=("${_pkgname}")
-replaces=("${_pkgname}")
+arch=('x86_64' 'i686')
+url='http://www.bus1.org'
+makedepends=('git' 'xmlto' 'docbook-xsl')
license=('LGPL2.1')
-options=(!strip)
-source=("git+https://github.com/bus1/${_pkgname}.git")
-sha256sums=('SKIP')
-install="${_pkgname}.install"
+source=("git+https://github.com/bus1/${_pkgbase}.git"
+ 'dkms.conf')
+sha256sums=('SKIP'
+ '1dce1d7a39ca866c15fbeb305fbeebd1cafe40f02e4e42da77eaed5c6c2e9285')
pkgver() {
- cd ${_pkgname}
+ cd ${_pkgbase}
+
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
- cd ${_pkgname}
- make
+ cd ${_pkgbase}
+
make -f Makefile.docs
}
-package() {
- cd ${_pkgname}
- install -Dm 0644 ipc/bus1/bus1.ko \
- "${pkgdir}"/usr/lib/modules/extramodules-${_extramodules_version}-${_extramodules_version_suffix}/kernel/ipc/bus1/bus1.ko
+package_bus1-dkms-git() {
+ depends=('dkms')
+ provides=('bus1' 'bus1-git')
+ conflicts=('bus1' 'bus1-git')
+
+ cd ${_pkgbase}
+
+ install -Dm0644 "${srcdir}"/dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
+
+ install -m0644 Makefile "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}
+
+ install -dm0755 "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/ipc/bus1
+ cp -a ipc/bus1 "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/ipc/
+
+ install -Dm0644 include/uapi/linux/bus1.h \
+ "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/include/uapi/linux/bus1.h
+ install -dm0755 "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/usr/include/linux
+ ln -s ../../../include/uapi/linux/bus1.h \
+ "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/usr/include/linux
+
+ # For testing only
+ # install -dm0755 "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/tools/testing/selftests/bus1
+ # install -m0644 tools/testing/selftests/bus1/* \
+ # "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/tools/testing/selftests/bus1
+}
+
+package_bus1-headers-git() {
+ provides=('bus1-headers')
+ conflicts=('bus1-headers')
+
+ cd ${_pkgbase}
+
+ install -Dm 0644 include/uapi/linux/bus1.h "${pkgdir}"/usr/include/linux/bus1.h
+}
+
+package_bus1-doc-git() {
+ provides=('bus1-doc')
+ conflicts=('bus1-doc')
+
+ cd ${_pkgbase}
+
install -dm 0755 "${pkgdir}"/usr/share/man/man7/
install -m 0644 Documentation/bus1/bus1*.7 "${pkgdir}"/usr/share/man/man7/
- install -Dm 0644 include/uapi/linux/bus1.h "${pkgdir}"/usr/include/linux/bus1.h
}
diff --git a/bus1.install b/bus1.install
deleted file mode 100644
index 8e801377c85a..000000000000
--- a/bus1.install
+++ /dev/null
@@ -1,13 +0,0 @@
-post_install() {
- EXTRAMODULES='extramodules-4.4.8-grsec'
- #EXTRAMODULES='extramodules-4.5-ARCH'
- depmod $(cat /usr/lib/modules/${EXTRAMODULES}/version)
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 000000000000..da6af1bbb27d
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,12 @@
+# Linux DKMS config script for the bus1 kernel module
+
+PACKAGE_NAME="bus1"
+PACKAGE_VERSION=0.0.0
+
+MAKE[0]="make KERNELVER=${kernelver}"
+
+BUILT_MODULE_NAME="bus1"
+BUILT_MODULE_LOCATION="ipc/bus1"
+DEST_MODULE_LOCATION="/kernel/ipc/bus1"
+
+AUTOINSTALL=yes