aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@mandriva.com>2007-02-16 16:48:00 +0000
committerFrederic Crozat <fcrozat@mandriva.com>2007-02-16 16:48:00 +0000
commit23e8f302048d5860eabffbb28e404654aea2a2e1 (patch)
tree9557766b9b03882b3692e0a26d3428d1988cc467
parent2be34c695655361684f933854fd29ce4a0954adf (diff)
downloadcommon-data-23e8f302048d5860eabffbb28e404654aea2a2e1.tar
common-data-23e8f302048d5860eabffbb28e404654aea2a2e1.tar.gz
common-data-23e8f302048d5860eabffbb28e404654aea2a2e1.tar.bz2
common-data-23e8f302048d5860eabffbb28e404654aea2a2e1.tar.xz
common-data-23e8f302048d5860eabffbb28e404654aea2a2e1.zip
Fix target since specfile is moved in SVN
-rw-r--r--Makefile29
1 files changed, 13 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 4449c6f..8da0845 100644
--- a/Makefile
+++ b/Makefile
@@ -1,49 +1,46 @@
PACKAGE = desktop-common-data
NAME = desktop-common-data
-VERSION:=$(shell rpm -q --qf '%{VERSION}\n' --specfile $(PACKAGE).spec | head -1)
-RELEASE:=$(shell rpm -q --qf '%{RELEASE}\n' --specfile $(PACKAGE).spec | head -1| sed -e 's/%mkrel \(.*\)/\1mdk/g')
TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__')
mandir=/usr/share/man
SVNROOT = svn+ssh://svn.mandriva.com/svn/soft/$(PACKAGE)
+checktag:
+ @if [ "x$(VERSION)" == "x" -o "x$(RELEASE)" = "x" ]; then \
+ echo usage is "make VERSION=version_number RELEASE=release_number dist" ; \
+ exit 1 ; \
+ fi
clean:
find . -type d -name '.xvpics' -o -name '*~' |xargs rm -rf
# rules to build a test rpm
-localrpm: localdist buildrpm
-
localdist: cleandist dir localcopy tar
-cleandist:
+cleandist: checktag
rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2
-dir:
+dir: checktag
mkdir $(PACKAGE)-$(VERSION)
-localcopy:
+localcopy: checktag
find . -not -name "$(PACKAGE)-$(VERSION)"|cpio -pd $(PACKAGE)-$(VERSION)/
- find $(PACKAGE)-$(VERSION) -type d -name CVS -o -name .cvsignore -name '*~' |xargs rm -rf
+ find $(PACKAGE)-$(VERSION) -type d -name CVS -o -name .cvsignore -name '*~' -o name '.svn' |xargs rm -rf
-tar:
+tar: checktag
tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
bzip2 -9vf $(PACKAGE)-$(VERSION).tar
rm -rf $(PACKAGE)-$(VERSION)
-buildrpm:
- rpm -ta $(PACKAGE)-$(VERSION).tar.bz2
-
# rules to build a distributable rpm
-rpm: changelog svntag dist buildrpm
+dist: checktag cleandist dir export tar
-dist: cleandist dir export tar
-export:
+export: checktag
svn export $(SVNROOT)/tags/$(TAG) $(PACKAGE)-$(VERSION)
-svntag:
+svntag: checktag
svn copy $(SVNROOT)/trunk $(SVNROOT)/tags/$(TAG) -m "$(TAG)"
changelog: ../common/username