summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex Landau <alex.landau@xorcom.com>2008-12-28 10:35:13 +0000
committerAlex Landau <alex.landau@xorcom.com>2008-12-28 10:35:13 +0000
commit9e0becb8a54c76aaaaea805fbb361d86f9ef90f6 (patch)
tree8c21f6c8a3d7b571368dcdd09c101ce33cd5f9f9 /Makefile
parent94e268f4d359d6d2de417f991b8ea6f420d60d58 (diff)
rapid-tunneling:
- .deb builds git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6501 283159da-0705-0410-b60c-f2062b4bb6ad
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 7cdcce6..e3b95c4 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,12 @@ INIT_D = sshd_support
SOURCES = Makefile $(SPEC) $(SCRIPTS) $(CONFIGS) $(INIT_D)
VER = $(shell awk '/^Version: / {print $$2}' $(SPEC)| head -n 1)
-REL = $(shell awk '/^Release: / {print $$2}' $(SPEC)| head -n 1)
+RPM_REL = $(shell awk '/^Release: / {print $$2}' $(SPEC)| head -n 1)
+DEB_VER = $(shell head -n 1 debian/changelog | sed -n 's/.*(\([0-9.-]*\)).*/\1/p' | cut -d- -f1)
+
+ifneq ($(VER),$(DEB_VER))
+$(error Version in $(SPEC) ($(VER)) conflicts with version in debian/changelog ($(DEB_VER)))
+endif
all: rpm deb
@@ -16,11 +21,14 @@ rpm: $(SPEC) SOURCES/$(PACKAGE)-$(VER).tar.gz
[ -e SPECS ] || ln -s . SPECS
cd SPECS; rpmbuild --target noarch --define "_topdir $(PWD)" -ba $(SPEC)
mkdir -p OUTPUT
- cp RPMS/rapid-tunneling{,-server}-$(VER)-$(REL).noarch.rpm OUTPUT/
- cp SRPMS/rapid-tunneling-$(VER)-$(REL).src.rpm OUTPUT/
+ cp RPMS/rapid-tunneling{,-server}-$(VER)-$(RPM_REL).noarch.rpm OUTPUT/
+ cp SRPMS/rapid-tunneling-$(VER)-$(RPM_REL).src.rpm OUTPUT/
deb:
- debuild -uc -us
+ debuild -uc -us -I -I'[A-Z]*'
+ mkdir -p OUTPUT
+ mv ../rapid-tunneling_$(VER)* OUTPUT/
+ mv ../rapid-tunneling-server_$(VER)* OUTPUT/
SOURCES/$(PACKAGE)-$(VER).tar.gz: $(SOURCES)
tar czf $@ --transform 's|^|$(PACKAGE)-$(VER)/|' $^