diff options
author | Brian Behlendorf <[email protected]> | 2009-06-16 10:44:59 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-06-16 10:44:59 -0700 |
commit | 39a3d2a421bf067329bae352866a5d1fccbcee70 (patch) | |
tree | 326b0cb2c65c3d9150bfe4717095e046940cadce /Makefile.am | |
parent | e554dffa6031a2cf37537fc8451f757d5ae9e46f (diff) |
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-<version>, a
spl symlink is created to reference the last installed version.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 9 |
1 files changed, 6 insertions, 3 deletions
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 |