summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lass2015-06-08 20:52:41 +0200
committerMichael Lass2015-06-08 20:52:41 +0200
commit3b5dd6e7977014aaf63c023e95fbe5a2b4e451a7 (patch)
tree89883d46a83f4eb3c010edcb0a4fee041128e0bf
downloadaur-3b5dd6e7977014aaf63c023e95fbe5a2b4e451a7.tar.gz
Initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD68
-rw-r--r--openafs-modules.install13
3 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4d16697aae5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = openafs-modules
+ pkgdesc = Kernel module for OpenAFS
+ pkgver = 1.6.11.1
+ pkgrel = 1
+ url = http://www.openafs.org
+ install = openafs-modules.install
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ license = custom:"IBM Public License Version 1.0"
+ makedepends = linux-headers
+ depends = openafs
+ conflicts = openafs-features-libafs
+ conflicts = openafs<1.6.6-2
+ options = !emptydirs
+ source = http://openafs.org/dl/1.6.11.1/openafs-1.6.11.1-src.tar.bz2
+ sha256sums = ae1a87faec8ee273f7d4baa69d1346f798415b38de72888decde011405423dc7
+
+pkgname = openafs-modules
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2d32d96c1f9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# Maintainer: Michael Lass <bevan@bi-co.net>
+
+# This PKGBUILD is maintained on github:
+# https://github.com/michaellass/AUR
+
+pkgname=openafs-modules
+_srcname=openafs
+pkgver=1.6.11.1
+pkgrel=1
+pkgdesc="Kernel module for OpenAFS"
+arch=('i686' 'x86_64' 'armv7h')
+url="http://www.openafs.org"
+license=('custom:"IBM Public License Version 1.0"')
+depends=('openafs')
+makedepends=('linux-headers')
+conflicts=('openafs-features-libafs' 'openafs<1.6.6-2')
+options=(!emptydirs)
+source=(http://openafs.org/dl/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2)
+install=openafs-modules.install
+sha256sums=('ae1a87faec8ee273f7d4baa69d1346f798415b38de72888decde011405423dc7')
+
+# Heuristic to determine version of installed kernel
+# You can modify this if the heuristic fails
+_extramodules=$(ls -dt /usr/lib/modules/extramodules-* | head -n1)
+_kernelver=$(cat ${_extramodules}/version)
+
+prepare() {
+ cd ${srcdir}/${_srcname}-${pkgver}
+
+ # Only needed when changes to configure were made
+ #./regen.sh -q
+}
+
+build() {
+ cd ${srcdir}/${_srcname}-${pkgver}
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib \
+ --disable-fuse-client \
+ --with-linux-kernel-packaging \
+ --with-linux-kernel-build="/usr/lib/modules/${_kernelver}/build"
+
+ make only_libafs
+}
+
+
+package() {
+ cd ${srcdir}/${_srcname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install_only_libafs
+
+ # install kernel module
+ install -dm755 ${pkgdir}${_extramodules}
+ mv ${pkgdir}/lib/modules/${_kernelver}/extra/openafs/openafs.ko ${pkgdir}${_extramodules}/openafs.ko
+ gzip -9 ${pkgdir}${_extramodules}/openafs.ko
+
+ # install license
+ install -Dm644 ${srcdir}/${_srcname}-${pkgver}/src/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+
+ # remove file already included in openafs package)
+ rm -rf ${pkgdir}/usr/bin ${pkgdir}/usr/include
+ find ${pkgdir} -name *.a -delete
+
+ # update major kernel version in install file
+ sed -i "s/depmod .*/depmod ${_kernelver}/g" "${startdir}/openafs-modules.install"
+}
diff --git a/openafs-modules.install b/openafs-modules.install
new file mode 100644
index 00000000000..65628f33b5c
--- /dev/null
+++ b/openafs-modules.install
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+post_install() {
+ depmod __KERNELVER__
+}
+
+post_upgrade() {
+ depmod __KERNELVER__
+}
+
+post_remove() {
+ depmod __KERNELVER__
+}