summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2013-01-30 11:29:54 -0500
committerAnand Avati <avati@redhat.com>2013-02-17 19:32:02 -0800
commit84f5e4b354526fbb7f0665345816e81c81245c8f (patch)
tree4ad63241d4b62cde7592030444adaf3d03b757ac /extras
parent6c848529cb26e6e4a5dc9576283207ab72187974 (diff)
glusterfs.spec.in: resync with Fedora glusterfs.spec
Resync with Fedora's glusterfs.spec, being careful to preserve recent additions to the glusterfs.spec.in such as the package-config for -devel and the OCF sub-package To build a set of RPMs: % ./autogen.sh % ./configure --enable-fusermount % make dist % cd extras/LinuxRPM && make glusterrpms Updated rpm.t, hopefully build system has all the dependencies to build UFO BUG: 819130 Change-Id: I1b1c161337ad780cf7d3ab401fa1b10648f38cbd Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/4454 Reviewed-by: Peter Portante <pportant@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/LinuxRPM/Makefile.am65
-rw-r--r--extras/Makefile.am2
2 files changed, 66 insertions, 1 deletions
diff --git a/extras/LinuxRPM/Makefile.am b/extras/LinuxRPM/Makefile.am
new file mode 100644
index 00000000000..e63a1ce40e6
--- /dev/null
+++ b/extras/LinuxRPM/Makefile.am
@@ -0,0 +1,65 @@
+
+GFS_TAR = ../../glusterfs-3git.tar.gz
+UFO_TAR = ../../gluster-swift-ufo-3git.tar.gz
+GFS_SPEC = ../../glusterfs.spec
+
+.PHONY: all
+
+all:
+ @echo "To build RPMS run `make glusterrpms`"
+
+.PHONY: glusterrpms prep srcrpm testsrpm clean
+
+glusterrpms: prep srcrpm rpms
+ -rm -rf rpmbuild
+
+prep::
+ if [ ! -e $(GFS_TAR) -a ! -e $(UFO_TAR) -a ! -e $(GFS_SPEC) ]; then \
+ $(MAKE) -c ../.. dist; \
+ fi
+ -mkdir -p rpmbuild/SPECS
+ -mkdir -p rpmbuild/RPMS
+ -mkdir -p rpmbuild/SRPMS
+ -rm -rf rpmbuild/SOURCES
+ cd rpmbuild && git clone http://pkgs.fedoraproject.org/cgit/glusterfs.git > /dev/null && mv glusterfs SOURCES
+ cp ../../*.tar.gz rpmbuild/SOURCES
+ cp ../../glusterfs.spec rpmbuild/SPECS
+
+# openstack/launchpad 'hides' source tarballs behind javascript glorp,
+# and curl will fail to fetch it using their download URL; we're forced
+# to fetch it from somewhere else.
+# maybe someone with better awk and sed skills than I have can suggest
+# something better here.
+SWIFT_URL = http://pkgs.fedoraproject.org/repo/pkgs/glusterfs/$(shell grep -v gluster rpmbuild/SOURCES/sources | cut -d ' ' -f 3)/$(shell grep -v gluster rpmbuild/SOURCES/sources | cut -d ' ' -f 1)/$(shell grep -v gluster rpmbuild/SOURCES/sources | cut -d ' ' -f 3)
+
+prep::
+ @if [ -x /usr/bin/curl -a ! -e rpmbuild/SOURCES/swift-1.7.4.tar.gz ]; then \
+ echo "fetching swift..." ; \
+ cd rpmbuild/SOURCES && /usr/bin/curl -s -O $(SWIFT_URL) ; \
+ elif [ ! -x /usr/bin/curl ]; then \
+ echo "you don't have curl installed, swift source not fetched" ; \
+ 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
+ mv rpmbuild/RPMS/*/* .
+
+# EPEL-5 does not like new versions of rpmbuild and requires some
+# _source_* defines
+
+testsrpm: prep
+ rpmbuild --define '_topdir $(shell pwd)/rpmbuild' \
+ --define '_source_payload w9.gzdio' \
+ --define '_source_filedigest_algorithm 1' \
+ -bs rpmbuild/SPECS/glusterfs.spec
+ mv rpmbuild/SRPMS/* ../..
+ -rm -rf rpmbuild
+
+clean:
+ -rm -rf rpmbuild
+ -rm -f *.rpm
diff --git a/extras/Makefile.am b/extras/Makefile.am
index a88da83cc1e..7b55ef2ee7e 100644
--- a/extras/Makefile.am
+++ b/extras/Makefile.am
@@ -2,7 +2,7 @@
EditorModedir = $(docdir)
EditorMode_DATA = glusterfs-mode.el glusterfs.vim
-SUBDIRS = init.d benchmarking hook-scripts $(OCF_SUBDIR)
+SUBDIRS = init.d benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM
confdir = $(sysconfdir)/glusterfs
conf_DATA = glusterfs-logrotate