summaryrefslogtreecommitdiff
path: root/sys-fs/zfs/zfs-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-02 14:09:07 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-02 14:09:07 +0100
commitb17a3ef12038de50228bade1f05502c74e135321 (patch)
tree9026dffec53f92cba48ca9a500a4f778e6304380 /sys-fs/zfs/zfs-9999.ebuild
parent3cf7c3ef441822c889356fd1812ebf2944a59851 (diff)
gentoo resync : 02.09.2020
Diffstat (limited to 'sys-fs/zfs/zfs-9999.ebuild')
-rw-r--r--sys-fs/zfs/zfs-9999.ebuild48
1 files changed, 31 insertions, 17 deletions
diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 11bc0febcb0a..7def71113015 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -15,16 +15,17 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3 linux-mod
EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
else
- SRC_URI="https://github.com/openzfs/${PN}/releases/download/${P}/${P}.tar.gz"
+ MY_P="${P/_rc/-rc}"
+ SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~ppc64"
+ S="${WORKDIR}/${P%_rc?}"
fi
LICENSE="BSD-2 CDDL MIT"
SLOT="0"
-IUSE="custom-cflags debug kernel-builtin libressl pam python +rootfs test-suite static-libs"
+IUSE="custom-cflags debug kernel-builtin libressl minimal nls pam python +rootfs test-suite static-libs"
DEPEND="
- ${PYTHON_DEPS}
net-libs/libtirpc[static-libs?]
sys-apps/util-linux[static-libs?]
sys-libs/zlib[static-libs(+)?]
@@ -32,6 +33,7 @@ DEPEND="
virtual/libudev[static-libs(-)?]
libressl? ( dev-libs/libressl:0=[static-libs?] )
!libressl? ( dev-libs/openssl:0=[static-libs?] )
+ !minimal? ( ${PYTHON_DEPS} )
pam? ( sys-libs/pam )
python? (
virtual/python-cffi[${PYTHON_USEDEP}]
@@ -40,6 +42,7 @@ DEPEND="
BDEPEND="virtual/awk
virtual/pkgconfig
+ nls? ( sys-devel/gettext )
python? (
dev-python/setuptools[${PYTHON_USEDEP}]
)
@@ -65,7 +68,11 @@ RDEPEND="${DEPEND}
)
"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+REQUIRED_USE="
+ !minimal? ( ${PYTHON_REQUIRED_USE} )
+ python? ( !minimal )
+ test-suite? ( !minimal )
+"
RESTRICT="test"
@@ -116,7 +123,7 @@ src_prepare() {
src_configure() {
use custom-cflags || strip-flags
- python_setup
+ use minimal || python_setup
local myconf=(
--bindir="${EPREFIX}/bin"
@@ -130,15 +137,17 @@ src_configure() {
--with-linux="${KV_DIR}"
--with-linux-obj="${KV_OUT_DIR}"
--with-udevdir="$(get_udevdir)"
- --with-pamconfigsdir="${EPREFIX}/unwanted_debian_files"
+ --with-pamconfigsdir="${EPREFIX}/unwanted_files"
--with-pammoduledir="$(getpam_mod_dir)"
- --with-python="${EPYTHON}"
--with-systemdunitdir="$(systemd_get_systemunitdir)"
--with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
+ --with-vendor=gentoo
$(use_enable debug)
+ $(use_enable nls)
$(use_enable pam)
$(use_enable python pyzfs)
$(use_enable static-libs static)
+ $(usex minimal --without-python --with-python="${EPYTHON}")
)
econf "${myconf[@]}"
@@ -158,7 +167,7 @@ src_install() {
gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use pam && { rm -rv "${ED}/unwanted_debian_files" || die ; }
+ use pam && { rm -rv "${ED}/unwanted_files" || die ; }
use test-suite || { rm -r "${ED}/usr/share/zfs" || die ; }
@@ -179,7 +188,7 @@ src_install() {
fi
# enforce best available python implementation
- python_fix_shebang "${ED}/bin"
+ use minimal || python_fix_shebang "${ED}/bin"
}
pkg_postinst() {
@@ -198,14 +207,19 @@ pkg_postinst() {
update_moduledb
fi
- [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
- einfo "You should add zfs-import to the boot runlevel."
- [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
- einfo "You should add zfs-mount to the boot runlevel."
- [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
- einfo "You should add zfs-share to the default runlevel."
- [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
- einfo "You should add zfs-zed to the default runlevel."
+ if systemd_is_booted || has_version sys-apps/systemd; then
+ einfo "Please refer to ${EROOT}/lib/systemd/system-preset/50-zfs.preset"
+ einfo "for default zfs systemd service configuration"
+ else
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
+ einfo "You should add zfs-import to the boot runlevel."
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
+ einfo "You should add zfs-mount to the boot runlevel."
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
+ einfo "You should add zfs-share to the default runlevel."
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
+ einfo "You should add zfs-zed to the default runlevel."
+ fi
}
pkg_postrm() {