From 39a3d2a421bf067329bae352866a5d1fccbcee70 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 16 Jun 2009 10:44:59 -0700 Subject: Packaging improvements for RHEL and SLES - Properly honor --prefix in build system and rpm spec file. - Add '--define require_kdir' to spec file to support building rpms against kernel sources installed in non-default locations. - Add '--define require_kobj' to spec file to support building rpms against kernel object installed in non-default locations. - Stop suppressing errors in autogen.sh script. - Improved logic to detect missing kernel objects when they are not located with the source. This is the common case for SLES as well as in-tree chaos kernel builds and is done to simply support for multiple arches. - Moved spl-devel build products to /usr/src/spl-, a spl symlink is created to reference the last installed version. --- Makefile.am | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 63d6ba7e4..c0a4a6b65 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,8 +16,11 @@ distclean-local:: -type f -print | xargs $(RM) install-data-local: - $(INSTALL) -D spl_config.h $(DESTDIR)/$(LINUX)/include/spl/spl_config.h - $(INSTALL) -D spl_unconfig.h $(DESTDIR)/$(LINUX)/include/spl/spl_unconfig.h + instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \ + for instfile in $(noinst_HEADERS) module/Module.symvers; do \ + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ + done + (cd $(DESTDIR)/${prefix}/src && ln -f -s spl-$(SPL_META_VERSION) spl) ctags: $(RM) $(top_srcdir)/tags @@ -50,6 +53,6 @@ srpm: dist rpm: srpm rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ + /usr/bin/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)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild -- cgit v1.2.3