aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 46067170c8bcc4138db63b46151124552a0ca5a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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)