diff options
Diffstat (limited to 'extras/LinuxRPM/Makefile.am')
| -rw-r--r-- | extras/LinuxRPM/Makefile.am | 60 |
1 files changed, 18 insertions, 42 deletions
diff --git a/extras/LinuxRPM/Makefile.am b/extras/LinuxRPM/Makefile.am index cf8f44a0550..f02853798c0 100644 --- a/extras/LinuxRPM/Makefile.am +++ b/extras/LinuxRPM/Makefile.am @@ -1,66 +1,42 @@ -GFS_TAR = ../../glusterfs-*git.tar.gz -UFO_TAR = ../../gluster-swift-ufo-*git.tar.gz -GFS_SPEC = ../../glusterfs.spec +GFS_TAR = ../../glusterfs-$(VERSION).tar.gz .PHONY: all all: @echo "To build RPMS run 'make glusterrpms'" -.PHONY: glusterrpms prep srcrpm testsrpm clean +.PHONY: glusterrpms glusterrpms_without_autogen +.PHONY: autogen prep srcrpm testsrpm clean -glusterrpms: prep srcrpm rpms +glusterrpms: autogen glusterrpms_without_autogen + +glusterrpms_without_autogen: prep srcrpm rpms -rm -rf rpmbuild -prep:: - if [ ! -e $(GFS_TAR) -a ! -e $(UFO_TAR) -a ! -e $(GFS_SPEC) ]; then \ - $(MAKE) -c ../.. dist; \ - fi +autogen: + cd ../.. && \ + rm -rf autom4te.cache && \ + ./autogen.sh && \ + ./configure --enable-gnfs --with-previous-options + +prep: + $(MAKE) -C ../.. dist; + -mkdir -p rpmbuild/BUILD -mkdir -p rpmbuild/SPECS -mkdir -p rpmbuild/RPMS -mkdir -p rpmbuild/SRPMS - -rm -rf rpmbuild/SOURCES - @if [ -d /d/cache/glusterfs -a -e /d/cache/glusterfs/sources ]; then \ - echo "copying glusterfs rpm files from local cache..." ; \ - mkdir -p ./rpmbuild/SOURCES; \ - cp /d/cache/glusterfs/* ./rpmbuild/SOURCES/ ; \ - touch /d/cache/.gluster ; \ - elif [ -x /usr/bin/git ]; then \ - echo "fetching glusterfs rpm files from fedora git repo..."; \ - cd ./rpmbuild && git clone git://pkgs.fedoraproject.org/glusterfs.git > /dev/null && mv glusterfs SOURCES; \ - else \ - echo "glusterfs rpm files not fetched, you don't have git installed!" ; \ - exit 1 ; \ - fi + -mkdir -p rpmbuild/SOURCES + -rm -rf rpmbuild/SOURCES/* cp ../../*.tar.gz ./rpmbuild/SOURCES cp ../../glusterfs.spec ./rpmbuild/SPECS -# Remember to change folsom to grizzly when we rebase to grizzly -SWIFT_TARBALL = $(shell grep -v gluster ./rpmbuild/SOURCES/sources | cut -d ' ' -f 3) -SWIFT_MD5SIG = $(shell grep -v gluster ./rpmbuild/SOURCES/sources | cut -d ' ' -f 1) -SWIFT_VERS = $(shell echo $(SWIFT_TARBALL) | grep -o 1\.[0-9]\.[0-9]) -SWIFT_URL = https://launchpad.net/swift/folsom/$(SWIFT_VERS)/+download/$(SWIFT_TARBALL) - -prep:: - @if [ -e /d/cache/$(SWIFT_TARBALL) -a -d ./rpmbuild/SOURCES ]; then \ - echo "copying swift source tarball from local cache..." ; \ - cp /d/cache/$(SWIFT_TARBALL) ./rpmbuild/SOURCES/ ; \ - touch /d/cache/.swift ; \ - elif [ -x /usr/bin/curl -a -d ./rpmbuild/SOURCES ]; then \ - echo "fetching swift from launchpad.net..." ; \ - cd ./rpmbuild/SOURCES && /usr/bin/curl -sOL $(SWIFT_URL) ; \ - else \ - echo "swift source not fetched, you don't have curl installed!" ; \ - exit 1 ; \ - fi - srcrpm: rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bs rpmbuild/SPECS/glusterfs.spec mv rpmbuild/SRPMS/* . rpms: - rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bb rpmbuild/SPECS/glusterfs.spec + rpmbuild --define '_topdir $(shell pwd)/rpmbuild' --with gnfs -bb rpmbuild/SPECS/glusterfs.spec mv rpmbuild/RPMS/*/* . # EPEL-5 does not like new versions of rpmbuild and requires some |
