mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
26e08952e6
This commit adds support for building a zfs-modules-dkms sub package built around Dynamic Kernel Module Support. This is to allow building packages using the DKMS infrastructure which is intended to ease the burden of kernel version changes, upgrades, etc. By default zfs-modules-dkms-* sub package will be built as part of the 'make rpm' target. Alternately, you can build only the DKMS module package using the 'make rpm-dkms' target. Examples: # To build packaged binaries as well as a dkms packages $ ./configure && make rpm # To build only the packaged binary utilities and dkms packages $ ./configure && make rpm-utils rpm-dkms Note: Only the RHEL 5/6, CHAOS 5, and Fedora distributions are supported for building the dkms sub package. Signed-off-by: Prakash Surya <surya1@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #535
107 lines
3.1 KiB
Plaintext
107 lines
3.1 KiB
Plaintext
srpm-modules:
|
|
if CONFIG_KERNEL
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common
|
|
endif
|
|
|
|
srpm-utils:
|
|
if CONFIG_USER
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common
|
|
endif
|
|
|
|
srpm: srpm-modules srpm-utils
|
|
|
|
rpm-dkms: srpm-modules
|
|
if CONFIG_KERNEL
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" dkms-common
|
|
endif
|
|
|
|
rpm-modules: srpm-modules
|
|
if CONFIG_KERNEL
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common
|
|
endif
|
|
|
|
rpm-utils: srpm-utils
|
|
if CONFIG_USER
|
|
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common
|
|
endif
|
|
|
|
rpm: rpm-modules rpm-utils rpm-dkms
|
|
|
|
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 $(rpmspec) $(rpmbuild)/SPECS && \
|
|
mkdir -p $(rpmbuild)/SOURCES && \
|
|
cp $(distdir).tar.gz $(rpmbuild)/SOURCES)
|
|
|
|
dkms-common:
|
|
rpmpkg=$(pkg)-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE).src.rpm; \
|
|
rpmspec=$(pkg).spec; \
|
|
rpmdkms=$(pkg)-dkms-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE).noarch.rpm;\
|
|
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" \
|
|
--define "dist %{nil}" \
|
|
--define "_without_kernel 1" \
|
|
--define "_without_kernel_debug 1" \
|
|
--define "_with_kernel_dkms 1" \
|
|
--nodeps --rebuild $$rpmpkg || exit 1; \
|
|
cp $$rpmbuild/RPMS/noarch/$$rpmdkms . || exit 1; \
|
|
$(RM) -R $$rpmbuild
|
|
|
|
srpm-common: dist
|
|
rpmpkg=$(pkg)-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE).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" \
|
|
--define "build_src_rpm 1" \
|
|
--define "dist %{nil}" \
|
|
--nodeps -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \
|
|
cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \
|
|
$(RM) -R $$rpmbuild
|
|
|
|
rpm-common:
|
|
rpmpkg=$(pkg)-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE).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" \
|
|
--define "dist %{nil}" \
|
|
--define "require_kdir $(LINUX)" \
|
|
--define "require_kobj $(LINUX_OBJ)" \
|
|
--define "require_kver $(LINUX_VERSION)" \
|
|
--define "require_spldir $(SPL)" \
|
|
--define "require_splobj $(SPL_OBJ)" \
|
|
--define "require_splver $(SPL_VERSION)" \
|
|
--define "$(DEBUG_ZFS) 1" \
|
|
--define "$(DEBUG_DMU_TX) 1" \
|
|
--nodeps --rebuild $$rpmpkg || exit 1; \
|
|
cp $$rpmbuild/RPMS/*/* . || exit 1; \
|
|
$(RM) -R $$rpmbuild
|