diff options
author | Alex Landau <alex.landau@xorcom.com> | 2008-12-28 10:43:48 +0000 |
---|---|---|
committer | Alex Landau <alex.landau@xorcom.com> | 2008-12-28 10:43:48 +0000 |
commit | 3600a6d1a64202e013d715d93e2dc24ac1d6d450 (patch) | |
tree | 5813759b4049adc1968fd7349c6a91c51810e4bf | |
parent | 9e0becb8a54c76aaaaea805fbb361d86f9ef90f6 (diff) |
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
-rw-r--r-- | Makefile | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -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 |