summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lass2015-06-08 20:52:48 +0200
committerMichael Lass2015-06-08 20:52:48 +0200
commit83631d6ecc801216e103c5fd5b227d496f6de6ec (patch)
tree53c8255c2eb17ee6b369f297a088ad6adacc30f1
downloadaur-83631d6ecc801216e103c5fd5b227d496f6de6ec.tar.gz
Initial commit
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD62
-rw-r--r--dkms.conf18
-rw-r--r--openafs-modules-dkms.install18
4 files changed, 122 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..9e980833214
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = openafs-modules-dkms
+ pkgdesc = Kernel module for OpenAFS (dkms)
+ pkgver = 1.6.11.1
+ pkgrel = 1
+ url = http://www.openafs.org
+ install = openafs-modules-dkms.install
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ license = custom:"IBM Public License Version 1.0"
+ depends = dkms
+ depends = openafs
+ provides = openafs-modules=1.6.11.1
+ conflicts = openafs-features-libafs
+ conflicts = openafs-modules
+ 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
+ source = dkms.conf
+ sha256sums = ae1a87faec8ee273f7d4baa69d1346f798415b38de72888decde011405423dc7
+ sha256sums = ea7d1e6dfb5006016e25738be722c8793765f52ad55c0bbf588dd7fdf2bdd2bf
+
+pkgname = openafs-modules-dkms
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1ad5af918a8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Michael Lass <bevan@bi-co.net>
+
+# This PKGBUILD is maintained on github:
+# https://github.com/michaellass/AUR
+
+pkgname=openafs-modules-dkms
+_srcname=openafs
+pkgver=1.6.11.1
+pkgrel=1
+pkgdesc="Kernel module for OpenAFS (dkms)"
+arch=('i686' 'x86_64' 'armv7h')
+url="http://www.openafs.org"
+license=('custom:"IBM Public License Version 1.0"')
+depends=('dkms' 'openafs')
+provides=("openafs-modules=$pkgver")
+conflicts=('openafs-features-libafs' 'openafs-modules' 'openafs<1.6.6-2')
+options=(!emptydirs)
+source=(http://openafs.org/dl/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2
+ dkms.conf)
+install=openafs-modules-dkms.install
+sha256sums=('ae1a87faec8ee273f7d4baa69d1346f798415b38de72888decde011405423dc7'
+ 'ea7d1e6dfb5006016e25738be722c8793765f52ad55c0bbf588dd7fdf2bdd2bf')
+
+prepare() {
+ cd ${srcdir}/${_srcname}-${pkgver}
+
+ # Only needed when changes to configure were made
+ #./regen.sh -q
+}
+
+build() {
+ cd ${srcdir}/${_srcname}-${pkgver}
+
+ case "$CARCH" in
+ "i686") sysname=i386_linux26 ;;
+ "x86_64") sysname=amd64_linux26 ;;
+ "armv7h") sysname=arm_linux26 ;;
+ *) error "Unknown architecture '$CARCH'" && false
+ esac
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib \
+ --disable-fuse-client \
+ --disable-kernel-module \
+ --with-afs-sysname=$sysname
+
+ make only_libafs_tree
+}
+
+package() {
+
+ # install license
+ install -Dm644 ${srcdir}/${_srcname}-${pkgver}/src/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+
+ # install sources
+ install -dm755 ${pkgdir}/usr/src/${_srcname}-${pkgver}
+ mv ${srcdir}/${_srcname}-${pkgver}/libafs_tree/* ${pkgdir}/usr/src/${_srcname}-${pkgver}
+ sed "s/__VERSION__/$pkgver/" ${srcdir}/dkms.conf > ${pkgdir}/usr/src/${_srcname}-${pkgver}/dkms.conf
+
+}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 00000000000..6cc5af1f677
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,18 @@
+PACKAGE_NAME="openafs"
+PACKAGE_VERSION="__VERSION__"
+
+BUILT_MODULE_NAME[0]="openafs"
+BUILT_MODULE_LOCATION[0]="src/libafs/MODLOAD-$kernelver-SP"
+DEST_MODULE_LOCATION[0]="/kernel/fs"
+AUTOINSTALL=yes
+
+export $(grep -m1 '^MAKEFLAGS=' /etc/makepkg.conf)
+MAKE[0]="(./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib \
+ --disable-fuse-client \
+ --with-linux-kernel-packaging \
+ --with-linux-kernel-headers=${kernel_source_dir} \
+ && make ${MAKEFLAGS} )"
+CLEAN="[ ! -f Makefile ] || make clean"
diff --git a/openafs-modules-dkms.install b/openafs-modules-dkms.install
new file mode 100644
index 00000000000..3d0ae0c5262
--- /dev/null
+++ b/openafs-modules-dkms.install
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+post_install() {
+ dkms add openafs/${1%-*}
+ dkms install openafs/${1%-*}
+}
+
+pre_upgrade() {
+ pre_remove "$2"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+pre_remove() {
+ [ -n "${1%-*}" ] && dkms remove openafs/${1%-*} --all
+}