summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-05-02 13:00:53 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-05-02 13:00:53 -0500
commit607f0124ed64cfeff9976dffb0650702b54a298d (patch)
tree98313d29a1735dbfe676a7e67590538243655ebd /pcr
parent8464403d50322dd104ae099d1d5af3753edf2d5c (diff)
Removing spl-utils-git. Use spl-utils instead
Diffstat (limited to 'pcr')
-rw-r--r--pcr/spl-dkms/PKGBUILD61
-rw-r--r--pcr/spl-dkms/spl-utils.hostid1
-rw-r--r--pcr/spl-dkms/spl.install16
-rw-r--r--pcr/spl-utils-git/PKGBUILD49
4 files changed, 78 insertions, 49 deletions
diff --git a/pcr/spl-dkms/PKGBUILD b/pcr/spl-dkms/PKGBUILD
new file mode 100644
index 000000000..b93bde6df
--- /dev/null
+++ b/pcr/spl-dkms/PKGBUILD
@@ -0,0 +1,61 @@
+#
+# Maintainer (Arch): Iacopo Isimbaldi <isiachi@rhye.it>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+#
+
+pkgbase="spl-dkms"
+pkgname=("spl-dkms" "spl-utils")
+pkgver=0.6.5.6
+pkgrel=2
+license=('GPL')
+makedepends=("git")
+arch=("i686" "x86_64")
+url="http://zfsonlinux.org/"
+source=("git+https://github.com/zfsonlinux/spl.git#tag=spl-${pkgver}"
+ "spl-utils.hostid")
+sha256sums=('SKIP'
+ 'ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e')
+
+build() {
+ cd "${srcdir}/spl"
+ ./autogen.sh
+
+ _at_enable=""
+ [ "${CARCH}" == "i686" ] && _at_enable="--enable-atomic-spinlocks"
+
+ ./configure --prefix=/usr \
+ --libdir=/usr/lib \
+ --sbindir=/usr/bin \
+ --with-config=user \
+ ${_at_enable}
+
+ make
+}
+
+package_spl-dkms() {
+ pkgdesc="Solaris Porting Layer kernel modules."
+ depends=("dkms" "spl-utils=${pkgver}-${pkgrel}")
+ provides=("spl")
+ conflicts=("spl-git" "spl-lts")
+ install=spl.install
+
+ dkmsdir="${pkgdir}/usr/src/spl-${pkgver}"
+ install -d "${dkmsdir}"
+ cp -a ${srcdir}/spl/. ${dkmsdir}
+
+ cd "${dkmsdir}"
+ make clean distclean
+ find . -name ".git*" -print0 | xargs -0 rm -fr --
+ scripts/dkms.mkconf -v ${pkgver} -f dkms.conf -n spl
+ chmod g-w,o-w -R .
+}
+
+package_spl-utils() {
+ pkgdesc="Solaris Porting Layer kernel module support files."
+ conflicts=("spl-utils-git" "spl-utils-lts")
+
+ cd "${srcdir}/spl"
+ make DESTDIR="${pkgdir}" install
+
+ install -D -m644 "${srcdir}"/spl-utils.hostid "${pkgdir}"/etc/hostid
+}
diff --git a/pcr/spl-dkms/spl-utils.hostid b/pcr/spl-dkms/spl-utils.hostid
new file mode 100644
index 000000000..7bde8641b
--- /dev/null
+++ b/pcr/spl-dkms/spl-utils.hostid
@@ -0,0 +1 @@
+ÿÿÿÿ \ No newline at end of file
diff --git a/pcr/spl-dkms/spl.install b/pcr/spl-dkms/spl.install
new file mode 100644
index 000000000..1438151a8
--- /dev/null
+++ b/pcr/spl-dkms/spl.install
@@ -0,0 +1,16 @@
+post_install() {
+ check_hostid
+}
+
+check_hostid() {
+ # Check /etc/hostid to see if it set to the sentinel value, see
+ # https://wiki.archlinux.org/index.php/ZFS for more information.
+ HOSTID=$(hostid)
+ if [ "0x$HOSTID" == "0xffffffff" ]; then
+ # Generate a new hostid
+ : >/etc/hostid
+ HOSTID=$(hostid)
+ # hostid is 4 byte little endian
+ printf $(echo -n $HOSTID | sed 's/\(..\)\(..\)\(..\)\(..\)/\\x\4\\x\3\\x\2\\x\1/') >/etc/hostid
+ fi
+}
diff --git a/pcr/spl-utils-git/PKGBUILD b/pcr/spl-utils-git/PKGBUILD
deleted file mode 100644
index d076a5813..000000000
--- a/pcr/spl-utils-git/PKGBUILD
+++ /dev/null
@@ -1,49 +0,0 @@
-# Maintainer (Arch): Jesus Alvarez <jeezusjr at gmail dot com>
-# Contributor (Arch): Kyle Fuller <inbox at kylefuller dot co dot uk>
-# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
-#
-# This PKGBUILD was generated by the archzfs build scripts located at
-#
-# http://github.com/demizer/archzfs
-#
-# The build script generates and updates the pkgver and _kernel* variables.
-#
-pkgname="spl-utils-git"
-pkgver=0.6.4.2_r0_g04974ca_4.1.6_1
-pkgrel=1
-license=('GPL')
-pkgdesc="Solaris Porting Layer kernel module support files."
-makedepends=("git")
-arch=("i686" "x86_64")
-url="http://zfsonlinux.org/"
-source=("git+https://github.com/zfsonlinux/spl.git#commit=04974ca1"
- "spl-utils.hostid")
-groups=("archzfs-git")
-md5sums=('SKIP'
- 'a54f0041a9e15b050f25c463f1db7449')
-replaces=("spl-utils")
-provides=("spl-utils")
-conflicts=("spl-utils" "spl-utils-lts")
-
-build() {
- cd "${srcdir}/spl"
- ./autogen.sh
-
- _at_enable=""
- [ "${CARCH}" == "i686" ] && _at_enable="--enable-atomic-spinlocks"
-
- ./configure --prefix=/usr \
- --libdir=/usr/lib \
- --sbindir=/usr/bin \
- --with-config=user \
- ${_at_enable}
-
- make
-}
-
-package() {
- cd "${srcdir}/spl"
- make DESTDIR="${pkgdir}" install
-
- install -D -m644 "${srcdir}"/spl-utils.hostid "${pkgdir}"/etc/hostid
-}