diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 72 |
1 files changed, 43 insertions, 29 deletions
@@ -1,5 +1,5 @@ #--------------------------------------------------------------- -# Project : Linux-Mandrake +# Project : Mandrake Linux # Module : spec-helper # File : Makefile # Version : $Id$ @@ -7,51 +7,65 @@ # Created On : Fri Feb 18 08:11:21 2000 #--------------------------------------------------------------- -VERSION=0.4 +PACKAGE=spec-helper +VERSION:=$(shell grep '%define *version ' $(PACKAGE).spec| cut -d ' ' -f 3) +RELEASE:=$(shell grep '%define *release ' $(PACKAGE).spec| cut -d ' ' -f 3) +TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__') + FILES= spec-helper clean_files clean_perl compress_files strip_files relative_me_babe lib_symlinks -DISTFILES= Makefile ChangeLog Howto-spec-helper $(FILES) macroszification -NAME=spec-helper -DIST=$(NAME)-$(VERSION) +DISTFILES= Makefile ChangeLog Howto-spec-helper $(FILES) macroszification spec-helper.spec bindir=/usr/bin all: @echo "use make install or make dist" -dist: - rm -f $(NAME)-$(VERSION).tar.bz2 - rm -rf $(DIST) - mkdir $(DIST) - ln $(DISTFILES) $(DIST) - tar cvf $(NAME)-$(VERSION).tar $(DIST) - bzip2 -9vf $(NAME)-$(VERSION).tar - rm -rf $(DIST) - install: install -d -m755 $(bindir) install -m755 macroszification $(bindir)/ install -d -m 755 $(DESTDIR)/usr/share/spec-helper install -m 755 $(FILES) $(DESTDIR)/usr/share/spec-helper -dis: - rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar* - mkdir -p $(NAME)-$(VERSION) - ln $(DISTFILES) $(NAME)-$(VERSION) - tar cvf ../$(NAME)-$(VERSION).tar $(NAME)-$(VERSION) - bzip2 -9vf ../$(NAME)-$(VERSION).tar - rm -rf $(NAME)-$(VERSION) +# rules to build a test rpm + +localrpm: localdist buildrpm + +localdist: cleandist dir localcopy tar + +cleandist: + rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2 + +dir: + mkdir $(PACKAGE)-$(VERSION) + +localcopy: + ln $(DISTFILES) $(PACKAGE)-$(VERSION) + +tar: + 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 cvstag dist buildrpm + +dist: cleandist dir export tar + +export: + cvs export -d $(PACKAGE)-$(VERSION) -r $(TAG) $(PACKAGE) + +cvstag: + cvs commit + cvs tag $(CVSTAGOPT) $(TAG) changelog: ../common/username -#cvs2cl is available in our contrib. - cvs2cl -U ../common/username -I ChangeLog -I $(NAME).spec + cvs2cl -U ../common/username -I ChangeLog rm -f ChangeLog.bak cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog -rpm: dis - test -d $(RPM)/SOURCES && test -d $(RPM)/ - cp -f ../$(NAME)-$(VERSION).tar.bz2 $(RPM)/SOURCES - -rpm -ba --clean --rmsource $(NAME).spec - rm -f $(NAME)-$(VERSION).tar.bz2 - # Local variables: # mode: makefile # End: |