From 90f3cbd4815e674daec6d8aab1e45e00c782067e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 23 Jul 2002 14:05:06 +0000 Subject: check make got correct tag from spec file --- perl-install/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'perl-install/Makefile') diff --git a/perl-install/Makefile b/perl-install/Makefile index 668ba38c2..0c464be57 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -1,6 +1,6 @@ PACKAGE=drakxtools PKGVERSION:=$(shell rpm -q --qf '%{VERSION}\n' --specfile $(PACKAGE).spec|head -1) -RELEASE:=$(shell rpm -q --qf '%{RELEASE}\n' --specfile $(PACKAGE).spec|head -1) +RELEASE:=$(shell rpm -q --qf '%{RELEASE}\n' --specfile $(PACKAGE).spec|head -) TAG := $(shell echo "V$(PKGVERSION)_$(RELEASE)" | tr -- '-.' '__') include Makefile.config @@ -196,15 +196,20 @@ stage2: localrpm: localdist buildrpm -localsrpm: localdist buildsrpm +localsrpm: spec_test localdist buildsrpm -fastsrpm: cvstag localsrpm +fastsrpm: spec_test cvstag localsrpm localdist: cleandist localcopy tar cleandist: rm -rf ../$(PACKAGE)-$(PKGVERSION) ../$(PACKAGE)-$(PKGVERSION).tar.bz2 +spec_test: + @if [[ -z "$(PRELEASE)" ]]; then echo "unable to get spec release"; exit 2;fi + @if [[ -z "$(PKGVERSION)" ]]; then echo "unable to get spec version"; exit 3;fi + + tar: cd ../$(PACKAGE)-$(PKGVERSION) && perl -pi -e 's/^C_RPM.*/C_RPM=0/; s/^C_DRAKX.*/C_DRAKX=0/' c/Makefile cd ../$(PACKAGE)-$(PKGVERSION) && perl -pi -e 's/^all: help/all:/' share/po/Makefile @@ -224,7 +229,7 @@ buildsrpm: rpm: cvstag dist buildrpm -srpm: cvstag dist buildsrpm +srpm: test cvstag dist buildsrpm dist: cleandist export tar -- cgit v1.2.1