diff options
author | Frederic Lepied <flepied@mandriva.com> | 2001-08-21 18:43:53 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2001-08-21 18:43:53 +0000 |
commit | 9ef9705af2e0fa3a649c0b3b15e90b8d52607277 (patch) | |
tree | 4713ec638db14935a4a665166aac5b32a8fd26aa /Makefile | |
parent | 0b400e354bd3304218673a1f23ef6e767ac9afe2 (diff) | |
download | spec-helper-9ef9705af2e0fa3a649c0b3b15e90b8d52607277.tar spec-helper-9ef9705af2e0fa3a649c0b3b15e90b8d52607277.tar.gz spec-helper-9ef9705af2e0fa3a649c0b3b15e90b8d52607277.tar.bz2 spec-helper-9ef9705af2e0fa3a649c0b3b15e90b8d52607277.tar.xz spec-helper-9ef9705af2e0fa3a649c0b3b15e90b8d52607277.zip |
added rules to build test and release rpm.
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: |