X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=config%2Frpm.am;h=9deafb3debfc9660eab0ffd98d191ee310e7ce92;hb=babf3f9b6d9294b0a88457941d60af5d9d7b744d;hp=c352fc582cf9f795ee6b13685fd46efc409ca0f0;hpb=c9c0d073da561bcbefbdf09c87fc75b227415619;p=zfs.git diff --git a/config/rpm.am b/config/rpm.am index c352fc5..9deafb3 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -1,20 +1,31 @@ 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-modules: srpm-modules - -rpm: rpm-modules rpm-utils +rpm: rpm-modules rpm-utils rpm-dkms rpm-local: @(if test "${HAVE_RPMBUILD}" = "no"; then \ @@ -33,6 +44,26 @@ rpm-local: 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; \ @@ -68,6 +99,8 @@ rpm-common: --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