summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 88523836a33670e26ab0f1f9fc1a8e2290ba1dfe (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
NAME=mandriva-theme
PACKAGE=mandriva-theme
VERSION=1.2.11

THEMES=Mandriva Mandriva-One Mandriva-Powerpack Mandriva-Powerpack+ Mandriva-Discovery Mandriva-Flash

FILES=$(THEMES) Makefile common gimp
sharedir=/usr/share
configdir=/etc

SVNSOFT=svn+ssh://svn.mandriva.com/svn/soft/theme/mandriva-theme/
SVNNAME=svn+ssh://svn.mandriva.com/svn/packages/cooker/mandriva-theme/current/

all:
	GIMP2_DIRECTORY=`pwd`/gimp gimp --console-messages -i -d -b '(begin (gimp-normalize-to-bootsplash-dirs 1.0 "*" "bootsplash/data/*.png") (gimp-quit 1))'
	GIMP2_DIRECTORY=`pwd`/gimp gimp --console-messages -i -d -b '(begin (gimp-normalize-to-bootsplash-dirs 1.0 "*" "gfxboot/*.png") (gimp-quit 1))'

install:
	mkdir -p $(prefix)$(sharedir)/bootsplash/themes/
	mkdir -p $(prefix)$(configdir)/bootsplash/themes/
	mkdir -p $(prefix)$(sharedir)/mdk/backgrounds/root
	mkdir -p $(prefix)/$(sharedir)/mdk/screensaver
	mkdir -p $(prefix)$(sharedir)/config/
	mkdir -p $(prefix)$(sharedir)/bootsplash/Mandriva-common/images
	install -m 644 common/bootsplash/data/*.jpg $(prefix)$(sharedir)/bootsplash/Mandriva-common/images
	install -m 644 common/screensaver/*.{jpg,png} $(prefix)$(sharedir)/mdk/screensaver
	@for t in $(THEMES); do \
          set -x; set -e; \
	  install -d $(prefix)$(sharedir)/bootsplash/themes/$$t/images;  \
	  install -m644 $$t/bootsplash/data/*.jpg $(prefix)$(sharedir)/bootsplash/themes/$$t/images/; \
	  install -d $(prefix)/$(configdir)/bootsplash/themes/$$t/config;  \
	  install -m644 common/bootsplash/config/* $(prefix)$(configdir)/bootsplash/themes/$$t/config/; \
	  perl -pi -e "s,/\@THEME\@/,/$$t/,"  $(prefix)$(configdir)/bootsplash/themes/$$t/config/*.cfg; \
	  if [ -d $$t/bootsplash/config ]; then \
	    install -m644 $$t/bootsplash/config/* $(prefix)$(configdir)/bootsplash/themes/$$t/config/; \
	  fi; \
	  install -d $(prefix)/$(configdir)/bootsplash/themes/$$t/animations;  \
	  install -m644 $$t/background/$$t-*.png $(prefix)$(sharedir)/mdk/backgrounds/; \
	  for d in 800x600 1024x768 1280x1024 1600x1200; \
	  do \
	    ln -s bootsplash-$$d.jpg $(prefix)$(sharedir)/bootsplash/themes/$$t/images/silent-$$d.jpg; \
	    for v in 1 2 3 4 5 6; \
	    do \
	      ln -s vt0-$$d.cfg $(prefix)$(configdir)/bootsplash/themes/$$t/config/vt$$v-$$d.cfg; \
	    done; \
	  done; \
	  chmod 644 $(prefix)$(configdir)/bootsplash/themes/$$t/config/*.cfg; \
	  install -d $(prefix)$(sharedir)/bootsplash/themes/$$t/grub;  \
	  install -m644 $$t/grub/* $(prefix)$(sharedir)/bootsplash/themes/$$t/grub/; \
	  install -d $(prefix)$(sharedir)/gfxboot/themes/$$t;  \
	  install -m644 $$t/gfxboot/*.jpg $(prefix)$(sharedir)/gfxboot/themes/$$t/; \
        done

changelog: ../common/username
	cvs2cl -U ../common/username -I ChangeLog 
	rm -f ChangeLog.bak
	cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog

dist: cleandist dir export tar

cleandist:
	rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2

export:
	cvs export -d $(PACKAGE)-$(VERSION) -r $(TAG) $(PACKAGE)

localdist: cleandist dir localcopy tar

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)