From 3600a6d1a64202e013d715d93e2dc24ac1d6d450 Mon Sep 17 00:00:00 2001 From: Alex Landau Date: Sun, 28 Dec 2008 10:43:48 +0000 Subject: rapid-tunneling: - Fix breakage caused by version check in the wrong place git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6502 283159da-0705-0410-b60c-f2062b4bb6ad --- Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e3b95c4..7e65f18 100644 --- a/Makefile +++ b/Makefile @@ -10,29 +10,32 @@ VER = $(shell awk '/^Version: / {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 -rpm: $(SPEC) SOURCES/$(PACKAGE)-$(VER).tar.gz +rpm: checkver $(SPEC) SOURCES/$(PACKAGE)-$(VER).tar.gz mkdir -p BUILD RPMS SOURCES SRPMS [ -e SPECS ] || ln -s . SPECS cd SPECS; rpmbuild --target noarch --define "_topdir $(PWD)" -ba $(SPEC) mkdir -p OUTPUT - cp RPMS/rapid-tunneling{,-server}-$(VER)-$(RPM_REL).noarch.rpm OUTPUT/ + cp RPMS/noarch/rapid-tunneling-$(VER)-$(RPM_REL).noarch.rpm OUTPUT/ + cp RPMS/noarch/rapid-tunneling-server-$(VER)-$(RPM_REL).noarch.rpm OUTPUT/ cp SRPMS/rapid-tunneling-$(VER)-$(RPM_REL).src.rpm OUTPUT/ -deb: +deb: checkver 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) + mkdir -p SOURCES tar czf $@ --transform 's|^|$(PACKAGE)-$(VER)/|' $^ +checkver: +ifneq ($(VER),$(DEB_VER)) + @echo Version in $(SPEC) ($(VER)) conflicts with version in debian/changelog ($(DEB_VER)); exit 1 +endif + install: install -m 755 -d $(DESTDIR)/usr/sbin install -m 755 rapid-tunneling $(DESTDIR)/usr/sbin -- cgit v1.2.3