mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
f3757573a6
Refresh the existing RPM packaging to conform to the 'Fedora Packaging Guidelines'. This includes adopting the kmods2 packaging standard which is used fod kmods distributed by rpmfusion for Fedora/RHEL. http://fedoraproject.org/wiki/Packaging:Guidelines http://rpmfusion.org/Packaging/KernelModules/Kmods2 While the spec files have been entirely rewritten from a user perspective the only major changes are: * The Fedora packages now have a build dependency on the rpmfusion repositories. The generic kmod packages also have a new dependency on kmodtool-1.22 but it is bundled with the source rpm so no additional packages are needed. * The kernel binary module packages have been renamed from zfs-modules-* to kmod-zfs-* as specificed by kmods2. * The is now a common kmod-zfs-devel-* package in addition to the per-kernel devel packages. The common package contains the development headers while the per-kernel package contains kernel specific build products. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1341
88 lines
2.9 KiB
Plaintext
88 lines
2.9 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.
|
|
###############################################################################
|
|
|
|
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
|
|
|
|
rpm-utils: srpm-utils
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \
|
|
def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_UTIL}' 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 scripts/kmodtool $(rpmbuild)/SOURCES && \
|
|
cp $(distdir).tar.gz $(rpmbuild)/SOURCES)
|
|
|
|
srpm-common: dist
|
|
@(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; \
|
|
$(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; \
|
|
${RPMBUILD} \
|
|
--define "_tmppath $$rpmbuild/TMP" \
|
|
--define "_topdir $$rpmbuild" \
|
|
$(def) --rebuild $$rpmpkg || exit 1; \
|
|
cp $$rpmbuild/RPMS/*/* . || exit 1; \
|
|
rm -R $$rpmbuild)
|