diff options
-rw-r--r-- | cpgx/Makefile | 30 | ||||
-rw-r--r-- | cpgx/VERSION | 2 | ||||
-rw-r--r-- | cpgx/cpgx.spec | 6 | ||||
-rwxr-xr-x | cpgx/make-tarball | 33 |
4 files changed, 40 insertions, 31 deletions
diff --git a/cpgx/Makefile b/cpgx/Makefile index 94c3266..596e03e 100644 --- a/cpgx/Makefile +++ b/cpgx/Makefile @@ -27,33 +27,5 @@ clean: rm -f *.o cpgx install: all - install cpgx $(DESTDIR)/usr/bin + install -D cpgx $(DESTDIR)/usr/bin -VERSION := $(shell cat VERSION) - -ifdef DIST - RPMDEFS := -D "dist $(DIST)" -endif - -tarfiles := cpgx.c list.h cpgx.spec Makefile VERSION -tarball := cpgx-$(VERSION).tar.gz - -# to release tarball: -# edit VERSION with new number and without -git -# commit VERSION change -# make tarball, sprm, rpm -# edit VERSION adding -git -# commit VERSION change -# push - -$(tarball): $(tarfiles) - -$(RM) $@ - git archive --format=tar --prefix=cpgx-$(VERSION)/ HEAD^{tree} | gzip > $@ - -tarball: $(tarball) - -rpm: $(tarball) $(tarfiles) - rpmbuild -ta $< $(RPMDEFS) - -srpm: $(tarball) $(tarfiles) - rpmbuild -ts $< $(RPMDEFS) diff --git a/cpgx/VERSION b/cpgx/VERSION index 13ae109..d3827e7 100644 --- a/cpgx/VERSION +++ b/cpgx/VERSION @@ -1 +1 @@ -1.0-git +1.0 diff --git a/cpgx/cpgx.spec b/cpgx/cpgx.spec index c5db74d..49be05f 100644 --- a/cpgx/cpgx.spec +++ b/cpgx/cpgx.spec @@ -7,8 +7,12 @@ Group: QA License: GPL Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Source0: cpgx-%{version}.tar.gz -BuildRequires: corosync-devel +%if 0%{?rhel} == 5 +BuildRequires: openais-devel +%else +BuildRequires: corosync-devel +%endif %description This program tests the virtual synchrony guarantees of corosync and cpg. diff --git a/cpgx/make-tarball b/cpgx/make-tarball new file mode 100755 index 0000000..f9fc44b --- /dev/null +++ b/cpgx/make-tarball @@ -0,0 +1,33 @@ +#!/bin/bash + +# to release +# edit VERSION with new number and without -git +# edit cpgx.spec with new version numbers +# commit changes to VERSION and cpgx.spec +# make tarball (uses commited VERSION and cpgx.spec) +# edit VERSION adding -git +# commit VERSION change +# push + +WC=`git diff | wc -l` + +if [ "$WC" != "0" ] +then + echo "error uncommited changes" + exit 2 +fi + +VER=`cat VERSION` + +VER2=`awk '/^Version:/ { print $2 }' < cpgx.spec` + +if [ "$VER" != "$VER2" ] +then + echo "error VERSION = $VER, cpgx.spec = $VER2" + exit 2 +fi + +echo "version $VER" + +git archive --format=tar --prefix=cpgx-$VER/ HEAD^{tree} | gzip > cpgx-$VER.tar.gz + |