diff options
author | Frederic Lepied <flepied@mandriva.com> | 2001-07-31 07:16:16 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2001-07-31 07:16:16 +0000 |
commit | 13a9547ac81310db67d7ebf8f018a9c83175970f (patch) | |
tree | 86f71b53da45b17364a797e7f481e3c745813037 /Makefile | |
parent | 3ba86fd5ff5d1d3b2b4597f149e47e5113b2eafb (diff) | |
download | common-data-13a9547ac81310db67d7ebf8f018a9c83175970f.tar common-data-13a9547ac81310db67d7ebf8f018a9c83175970f.tar.gz common-data-13a9547ac81310db67d7ebf8f018a9c83175970f.tar.bz2 common-data-13a9547ac81310db67d7ebf8f018a9c83175970f.tar.xz common-data-13a9547ac81310db67d7ebf8f018a9c83175970f.zip |
added rules to build test and distrib rpm.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 65 |
1 files changed, 45 insertions, 20 deletions
@@ -1,5 +1,7 @@ -NAME = mandrake_desk -VERSION = $(shell awk '/define version/ { print $$3 }' $(NAME).spec) +PACKAGE = mandrake_desk +VERSION:=$(shell grep 'Version:' $(PACKAGE).spec| cut -f 2) +RELEASE:=$(shell grep 'Release:' $(PACKAGE).spec| cut -f 2) +TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__') mandir=/usr/share/man all: @@ -31,7 +33,7 @@ install: $(RPM_BUILD_ROOT)/usr/share/pixmaps/backgrounds/linux-mandrake/ install -m644 icons/mandrake*.xpm $(RPM_BUILD_ROOT)/usr/share/pixmaps/mdk/ - + install -m644 faces/* $(RPM_BUILD_ROOT)/usr/share/faces install -m644 login/loging100.png $(RPM_BUILD_ROOT)/usr/share/pixmaps/mdk @@ -40,21 +42,44 @@ install: cp gnome/mandrake.links.sh $(RPM_BUILD_ROOT)/usr/lib/mc/desktop-scripts/mandrake.links.sh chmod 0755 $(RPM_BUILD_ROOT)/usr/lib/mc/desktop-scripts/mandrake.links.sh -dis: - rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar* +# 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: + find . | grep -v -- "$(PACKAGE)-$(VERSION)\|\.bz2\|CVS\|~" |cpio -pd $(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) + cd $(PACKAGE)-$(VERSION); autoconf + +cvstag: cvs commit - mkdir -p $(NAME)-$(VERSION) - find . -not -name "$(NAME)-$(VERSION)"|cpio -pd $(NAME)-$(VERSION)/ - find $(NAME)-$(VERSION) -type d -name CVS -o -name .cvsignore -o -name unused |xargs rm -rf - tar cf ../$(NAME)-$(VERSION).tar $(NAME)-$(VERSION) - bzip2 -9f ../$(NAME)-$(VERSION).tar - rm -rf $(NAME)-$(VERSION) - -rpm: dis ../$(NAME)-$(VERSION).tar.bz2 $(RPM) - cp -f ../$(NAME)-$(VERSION).tar.bz2 $(RPM)/SOURCES - cp -f special/mandrake-small.xpm $(RPM)/SOURCES/ - cp -f $(NAME).spec $(RPM)/SPECS/ - -rpm -ba --clean --rmsource $(NAME).spec - rm -f ../$(NAME)-$(VERSION).tar.bz2 - rm -f $(RPM)/SOURCES/mandrake-small.xpm - rm -f $(RPM)/SPECS/$(NAME).spec + cvs tag $(CVSTAGOPT) $(TAG) + +changelog: ../common/username + cvs2cl -U ../common/username -I ChangeLog + rm -f ChangeLog.bak + cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog |