NAME=bootsplash VERSION := $(shell sed -n 's/%define version //p' < $(NAME).spec) RELEASE := $(shell sed -n 's/%define release //p' < $(NAME).spec) RELTAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__') SUBDIRS=scripts fb DATADIRS=themes/data/ CONFIGDIRS=themes/config/ prefix=/ sharedir=/usr/share configdir=/etc RPM=$(HOME)/rpm all: check check: @for i in $(SUBDIRS);do make -C $$i check;done install: @mkdir -p $(prefix)$(sharedir)/bootsplash/themes/ @mkdir -p $(prefix)$(configdir)/bootsplash/themes/ @for i in $(SUBDIRS);do make -C $$i install;done @for i in $(DATADIRS);do cp -a $$i/* $(prefix)$(sharedir)/bootsplash/themes/;done @for i in $(CONFIGDIRS);do cp -a $$i/* $(prefix)$(configdir)/bootsplash/themes/;done dis: clean rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar* 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) clean: @for i in $(SUBDIRS);do make -C $$i clean;done rm -f *~ \#*\# changelog: ../common/username ( cvs2cl -U ../common/username -I ChangeLog -I tmp/ ; \ rm -f ChangeLog.bak ; \ cvs commit -m "Generated by cvs2cl the `date '+%c'`" ChangeLog ; \ ) cvstag: cvs commit cvs tag $(RELTAG) rpm: changelog cvstag dis ../$(NAME)-$(VERSION).tar.bz2 $(RPM) cp -f ../$(NAME)-$(VERSION).tar.bz2 $(RPM)/SOURCES -rpm -ba --clean $(NAME).spec rm -f ../$(NAME)-$(VERSION).tar.bz2 localrpm: dis ../$(NAME)-$(VERSION).tar.bz2 $(RPM) cp -f ../$(NAME)-$(VERSION).tar.bz2 $(RPM)/SOURCES -rpm -ba --clean $(NAME).spec rm -f ../$(NAME)-$(VERSION).tar.bz2