You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.6 KiB

# Maintainer: Nathan <ndowens@artixlinux.org>
# Contributor: Jan Houben <jan@nexttrex.de>
# Contributor: Jesus Alvarez <jeezusjr at gmail dot com>
#
# This PKGBUILD was generated by the archzfs build scripts located at
#
# http://github.com/archzfs/archzfs
#
pkgbase="zfs-git"
pkgname=('zfs-dkms-git' 'zfs-utils-git')
pkgver=2.1.99.r451.g7443299fe
_pkgver=2.1.0
pkgrel=1
arch=("x86_64")
makedepends=("automake" "python" "python-setuptools" "python-cffi" "git")
depends=("pam")
optdepends=('bash: For included ZFS scripts')
url="http://zfsonlinux.org/"
source=("git+https://github.com/openzfs/zfs.git"
"zfs-utils.initcpio.install"
"zfs-utils.initcpio.hook"
"zfs-utils.initcpio.zfsencryptssh.install")
sha256sums=('SKIP'
'29a8a6d76fff01b71ef1990526785405d9c9410bdea417b08b56107210d00b10'
'78e038f95639c209576e7fa182afd56ac11a695af9ebfa958709839ff1e274ce'
'29080a84e5d7e36e63c4412b98646043724621245b36e5288f5fed6914da5b68')
license=("CDDL")
pkgver() {
cd "$srcdir/zfs"
# cutting off 'foo-' prefix that presents in the git tag
git describe --long | sed 's/^zfs-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${srcdir}/zfs"
echo 'AM_GNU_GETTEXT([external])' >> configure.ac
echo 'AM_GNU_GETTEXT_VERSION([0.20])' >> configure.ac
# Remove tests
sed -i '/tests/d' configure.ac
sed -e 's,tests,,' \
-e '/SPELLCHECKDIRS/s,tests,,' \
-i Makefile.am
}
build() {
cd "${srcdir}/zfs"
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --with-mounthelperdir=/usr/bin \
--libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include --mandir=/usr/share/man \
--with-udevdir=/usr/lib/udev --libexecdir=/usr/lib/zfs \
--with-config=user --disable-systemd --enable-pyzfs
make
}
package_zfs-dkms-git() {
pkgdesc="Kernel modules for ZFS(GIT version)"
depends=("dkms" "lsb-release" "zfs-utils-git=${pkgver}-${pkgrel}")
provides=("zfs-dkms-git")
conflicts=("zfs-dkms")
groups=('zfs-git')
dkmsdir="${pkgdir}/usr/src/zfs-${pkgver%%_*}"
install -d "$dkmsdir"
cp -a "$srcdir"/zfs/. "$dkmsdir"
cd "$dkmsdir"
make clean
make distclean
find . -name ".git*" -print0 | xargs -0 rm -fr --
scripts/dkms.mkconf -v "${pkgver%%_*}" -f dkms.conf -n zfs
# Newer kernels enable -Werror-implicit-declaration, which fails
sed 's/"make"/make CFLAGS="$CFLAGS -Wno-error"/' -i dkms.conf
chmod g-w,o-w -R .
}
package_zfs-utils-git() {
pkgdesc="ZFS utils for the Zettabyte File System."
optdepends=("python: pyzfs and extra utilities", "python-cffi: pyzfs")
backup=('etc/zfs/zed.d/zed.rc' 'etc/default/zfs' 'etc/modules-load.d/zfs.conf' 'etc/sudoers.d/zfs')
conflicts=("zfs-utils")
replaces=("spl-utils-common" "zfs-utils-common")
provides=("spl-utils-git" "zfs-utils-git")
groups=('zfs-git')
cd "${srcdir}/zfs"
make DESTDIR="${pkgdir}" install
# Remove uneeded files
rm -r "${pkgdir}"/etc/init.d
rm -r "${pkgdir}"/usr/share/initramfs-tools
# Autoload the zfs module at boot
mkdir -p "${pkgdir}/etc/modules-load.d"
printf "%s\n" "zfs" > "${pkgdir}/etc/modules-load.d/zfs.conf"
# fix permissions
chmod 750 ${pkgdir}/etc/sudoers.d
chmod 440 ${pkgdir}/etc/sudoers.d/zfs
# Install the support files
install -D -m644 "${srcdir}"/zfs-utils.initcpio.hook "${pkgdir}"/usr/lib/initcpio/hooks/zfs
install -D -m644 "${srcdir}"/zfs-utils.initcpio.install "${pkgdir}"/usr/lib/initcpio/install/zfs
install -D -m644 "${srcdir}"/zfs-utils.initcpio.zfsencryptssh.install "${pkgdir}"/usr/lib/initcpio/install/zfsencryptssh
install -D -m644 contrib/bash_completion.d/zfs "${pkgdir}"/usr/share/bash-completion/completions/zfs
}