summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2009-06-02 16:12:26 -0500
committerDavid Teigland <teigland@redhat.com>2009-06-03 14:21:15 -0500
commitddd77efc5f80b7a25fdc67a83a6d6781f215ac19 (patch)
tree0c961fcfcd6cf498d1a8b3f2a20b8df6083b7c76
parent82747a02c788c18e52dbb598c0f70a253b417850 (diff)
downloaddct-stuff-ddd77efc5f80b7a25fdc67a83a6d6781f215ac19.tar.gz
dct-stuff-ddd77efc5f80b7a25fdc67a83a6d6781f215ac19.tar.xz
dct-stuff-ddd77efc5f80b7a25fdc67a83a6d6781f215ac19.zip
cpgx: build stuff
Signed-off-by: David Teigland <teigland@redhat.com>
-rw-r--r--cpgx/Makefile30
-rw-r--r--cpgx/VERSION2
-rw-r--r--cpgx/cpgx.spec6
-rwxr-xr-xcpgx/make-tarball33
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
+