X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=autoMakefile.am;h=effac1e9406898510ccbe49b8412d6455b522642;hp=689bee79867b512a328eabb57a2f1c8cc413433f;hb=549c57e77b7f3a4cae5a7381d612a499c2ca3dcc;hpb=52aa92420fe9829603bfb98dcda31bf22d995e42 diff --git a/autoMakefile.am b/autoMakefile.am index 689bee7..effac1e 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -119,6 +119,39 @@ rpm-local: $(MKDIR_P) $(rpmbuilddir)/SPECS && \ $(MKDIR_P) $(rpmbuilddir)/SOURCES) +if SERVER +DKMS_PACKAGE=$(PACKAGE) +DKMS_SERVER=--with servers +else +DKMS_PACKAGE=$(PACKAGE)-client +DKMS_SERVER=--without servers +endif + +# Only zfs Lustre DKMS Server is supported, so previous configure command +# must use related parameters for success. +dkms-srpm: $(PACKAGE)-dkms.spec dist Makefile + rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuilddir="$$rpmbuilddir" rpm-local || exit 1; \ + $(RPMBUILD) \ + --define "_tmppath $$rpmbuilddir/TMP" \ + --define "_topdir $$rpmbuilddir" \ + --define "_sourcedir $(top_srcdir)" \ + $(DKMS_SERVER) \ + --bs $(PACKAGE)-dkms.spec || exit 1; \ + cp $$rpmbuilddir/SRPMS/*.src.rpm $(top_srcdir) || exit 1; \ + rm -rf $$rpmbuilddir + +dkms-rpm: dkms-srpm + rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \ + $(RPMBUILD) \ + --define "_tmppath $$rpmbuilddir/TMP" \ + --define "_topdir $$rpmbuilddir" \ + @RPMBUILD_BINARY_ARGS@ \ + --rebuild $(DKMS_PACKAGE)-dkms-*.src.rpm || exit 1; \ + cp $$rpmbuilddir/RPMS/*/*.rpm $(top_srcdir) || exit 1; \ + rm -rf $$rpmbuilddir + rpms: srpm rpmbuilddir=`mktemp -t -d rpmbuild-@PACKAGE@-$$USER-XXXXXXXX`; \ $(MAKE) $(AM_MAKEFLAGS) \