NAME=bootsplash VERSION := $(shell rpm -q --qf '%{version}\n' --specfile $(NAME).spec | head -1) RELEASE := $(shell rpm -q --qf '%{release}\n' --specfile $(NAME).spec | head -1) RELTAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__') SUBDIRS=scripts fb fbmngplay fbtruetype splash po FILES=$(SUBDIRS) Makefile bootsplash.spec ChangeLog README prefix=/ sharedir=/usr/share configdir=/etc RPM=$(HOME)/rpm SVNSOFT=svn+ssh://svn.mandriva.com/svn/soft/bootsplash/ SVNNAME=svn+ssh://svn.mandriva.com/svn/packages/cooker/bootsplash/current/ all: @for i in $(SUBDIRS);do make -C $$i all;done install: @for i in $(SUBDIRS);do make -C $$i install;done dir: mkdir $(NAME)-$(VERSION) tar: dir localcopy tar cvf $(NAME).tar $(NAME)-$(VERSION) rm -rf $(NAME)-$(VERSION) localcopy: tar c --exclude=.svn $(FILES) | tar x -C $(NAME)-$(VERSION) clean: @for i in $(SUBDIRS);do make -C $$i clean;done rm -f *~ \#*\# svntag: svn cp -m 'version $(VERSION)' $(SVNSOFT)/trunk $(SVNNAME)/tag/v$(VERSION) ci: tar svn ci -m 'Update soft SPEC for version $(VERSION)' $(NAME).spec mkdir svn; cd svn; mdvsys co $(NAME) cp $(NAME).spec svn/$(NAME)/SPECS/ cp $(NAME).tar svn/$(NAME)/SOURCES/ cd svn/$(NAME)/; mdvsys ci -m 'update tarball and spec for version $(VERSION)' rpm: clean ci cd svn/$(NAME); bm localrpm: tar $(RPM) cp -f $(NAME).tar $(RPM)/SOURCES -rpm -ba --clean $(NAME).spec rm -f $(NAME).tar submit: clean ci mdvsys submit $(NAME)