mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
d0cea309e7
The zfs-initramfs package has never worked as no RPM-based distribution uses initramfs-tools, which is listed as a dependency of zfs-initramfs. This would not ordinarily be a problem, as it is only enabled when /usr/share/initramfs-tools is present, which should not normally be the case on RPM-based distributions. However, other packages may install unused files there even if initramfs-tools is not used, so remove this auto-detection for the rpm-utils target. This does not fully remove the logic for the zfs-initramfs package. This splits it out into a separate rpm-utils-initramfs target so that the Debian builds can still use it. Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Harald van Dijk <harald@gigawatt.nl> Closes #10898
106 lines
3.7 KiB
Plaintext
106 lines
3.7 KiB
Plaintext
###############################################################################
|
|
# Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC.
|
|
# Copyright (C) 2007 The Regents of the University of California.
|
|
# Written by Brian Behlendorf <behlendorf1@llnl.gov>.
|
|
###############################################################################
|
|
# Build targets for RPM packages.
|
|
###############################################################################
|
|
|
|
PHONY += srpm srpms srpm-kmod srpm-dkms srpm-utils
|
|
PHONY += rpm rpms rpm-kmod rpm-dkms rpm-utils rpm-utils-initramfs
|
|
PHONY += srpm-common rpm-common rpm-local
|
|
|
|
srpm-kmod srpm-dkms srpm-utils: dist
|
|
|
|
srpm-kmod:
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-kmod" \
|
|
def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_KMOD}' srpm-common
|
|
|
|
srpm-dkms:
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-dkms" \
|
|
def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_DKMS}' srpm-common
|
|
|
|
srpm-utils:
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \
|
|
def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_UTIL}' srpm-common
|
|
|
|
srpm: srpm-kmod srpm-dkms srpm-utils
|
|
srpms: srpm-kmod srpm-dkms srpm-utils
|
|
|
|
rpm-kmod: srpm-kmod
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-kmod" \
|
|
def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_KMOD}' rpm-common
|
|
|
|
rpm-dkms: srpm-dkms
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-dkms" \
|
|
def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_DKMS}' rpm-common
|
|
|
|
# The rpm-utils and rpm-utils-initramfs targets are identical except for the
|
|
# zfs-initramfs package: rpm-utils never includes it, rpm-utils-initramfs
|
|
# includes it if detected at configure time. The zfs-initramfs package does
|
|
# not work on any known RPM-based distribution and the resulting RPM is only
|
|
# used to create a Debian package. The rpm-utils-initramfs target is not
|
|
# intended to be specified by the user directly, it is provided as a
|
|
# dependency of the deb-utils target.
|
|
|
|
rpm-utils: srpm-utils
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \
|
|
def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_UTIL}' rpm-common
|
|
|
|
rpm-utils-initramfs: srpm-utils
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \
|
|
def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_UTIL} ${RPM_DEFINE_INITRAMFS}' rpm-common
|
|
|
|
rpm: rpm-kmod rpm-dkms rpm-utils
|
|
rpms: rpm-kmod rpm-dkms rpm-utils
|
|
|
|
rpm-local:
|
|
@(if test "${HAVE_RPMBUILD}" = "no"; then \
|
|
echo -e "\n" \
|
|
"*** Required util ${RPMBUILD} missing. Please install the\n" \
|
|
"*** package for your distribution which provides ${RPMBUILD},\n" \
|
|
"*** re-run configure, and try again.\n"; \
|
|
exit 1; \
|
|
fi; \
|
|
mkdir -p $(rpmbuild)/TMP && \
|
|
mkdir -p $(rpmbuild)/BUILD && \
|
|
mkdir -p $(rpmbuild)/RPMS && \
|
|
mkdir -p $(rpmbuild)/SRPMS && \
|
|
mkdir -p $(rpmbuild)/SPECS && \
|
|
cp ${RPM_SPEC_DIR}/$(rpmspec) $(rpmbuild)/SPECS && \
|
|
mkdir -p $(rpmbuild)/SOURCES && \
|
|
cp $(top_srcdir)/scripts/kmodtool $(rpmbuild)/SOURCES && \
|
|
cp $(distdir).tar.gz $(rpmbuild)/SOURCES)
|
|
|
|
srpm-common:
|
|
@(dist=`$(RPM) --eval %{?dist}`; \
|
|
rpmpkg=$(pkg)-$(VERSION)-$(RELEASE)$$dist*src.rpm; \
|
|
rpmspec=$(pkg).spec; \
|
|
rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
|
|
$(MAKE) $(AM_MAKEFLAGS) \
|
|
rpmbuild="$$rpmbuild" \
|
|
rpmspec="$$rpmspec" \
|
|
rpm-local || exit 1; \
|
|
LANG=C $(RPMBUILD) \
|
|
--define "_tmppath $$rpmbuild/TMP" \
|
|
--define "_topdir $$rpmbuild" \
|
|
$(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \
|
|
cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \
|
|
rm -R $$rpmbuild)
|
|
|
|
rpm-common:
|
|
@(dist=`$(RPM) --eval %{?dist}`; \
|
|
rpmpkg=$(pkg)-$(VERSION)-$(RELEASE)$$dist*src.rpm; \
|
|
rpmspec=$(pkg).spec; \
|
|
rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
|
|
$(MAKE) $(AM_MAKEFLAGS) \
|
|
rpmbuild="$$rpmbuild" \
|
|
rpmspec="$$rpmspec" \
|
|
rpm-local || exit 1; \
|
|
LANG=C ${RPMBUILD} \
|
|
--define "_tmppath $$rpmbuild/TMP" \
|
|
--define "_topdir $$rpmbuild" \
|
|
$(def) --rebuild $$rpmpkg || exit 1; \
|
|
cp $$rpmbuild/RPMS/*/* . || exit 1; \
|
|
rm -R $$rpmbuild)
|