diff options
-rw-r--r-- | Makefile | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -1,9 +1,10 @@ RPM=$(HOME)/rpm NAME = drakwizard -VERSION := $(shell sed -n 's/%define version //p' < $(NAME).spec) -RELEASE := $(shell sed -n 's/%define release //p' < $(NAME).spec) +VERSION := $(shell rpm --specfile $(NAME).spec -q | sed -n 's/^$(NAME)-\([^-]*\)-[^-]*$$/\1/p') +RELEASE := $(shell rpm --specfile $(NAME).spec -q | sed -n 's/^$(NAME)-[^-]*-\([^-]*\)$$/\1/p') RELTAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__') TAR = $(NAME)-$(VERSION).tar.bz2 +SVNURL = $(shell dirname $(shell svn info | sed -n 's/^URL: \(.*\)/\1/p')) # TODO: get WIZ_HOME take care of usr prefix WIZ_HOME=/usr/share/wizards/ @@ -71,19 +72,20 @@ clean: rm -f *~ dis: clean - cd ..; cp -rf wizard_perl $(NAME) - cd ..; tar cf - $(NAME) | bzip2 -9 > $(TAR) - cd ..; rm -rf $(NAME) + mkdir ../tmp_$(NAME) + cp -rf . ../tmp_$(NAME)/$(NAME) + cd ../tmp_$(NAME); tar cf - $(NAME) | bzip2 -9 > ../$(TAR) + cd ..; rm -rf tmp_$(NAME) changelog: ../common/username - ( cvs2cl -U ../common/username -I ChangeLog -I tmp/ --accum ; \ + ( svn2cl --authors=../../common/username --accum ; \ rm -f ChangeLog.bak ; \ - cvs commit -m "Generated by cvs2cl the `date '+%c'`" ChangeLog ; \ + svn commit -m "Generated by svn2cl the `date '+%c'`" ChangeLog ; \ ) -cvstag: - cvs commit - cvs tag $(RELTAG) +svntag: + svn commit + svn cp -m "Create tag $(RELTAG)" $(SVNURL)/trunk $(SVNURL)/tags/$(RELTAG) localsrpm: dis ../$(TAR) $(RPM) cp -f ../$(TAR) $(RPM)/SOURCES @@ -94,7 +96,7 @@ localsrpm: dis ../$(TAR) $(RPM) localrpm: localsrpm -rpm -ba --clean $(NAME).spec -rpm: changelog cvstag dis ../$(TAR) $(RPM) +rpm: changelog svntag dis ../$(TAR) $(RPM) cp -f ../$(TAR) $(RPM)/SOURCES -rpm -ba --clean $(NAME).spec rm -f ../$(TAR) |