X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=config%2Frpm.am;h=9deafb3debfc9660eab0ffd98d191ee310e7ce92;hb=95f5c63b47d8f8294b38843f9ba710e97b749b63;hp=41107d5eeb434c6c8fa50ab7c35954c2de978ae2;hpb=1c5de20ae2511124613926e4f780572634818218;p=zfs.git diff --git a/config/rpm.am b/config/rpm.am index 41107d5..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; \