summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 647577cbdb56b228b10fc8b1d35aadb14189c501 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
NAME=mandriva-theme
PACKAGE=mandriva-theme
VERSION=1.2.22

THEMES=Mandriva-Free Mandriva-One Mandriva-Powerpack 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:
	@/bin/cp -f gimp/scripts/gimp-normalize-to-bootsplash.scm tmp-gimp-command
	@for i in */bootsplash/data/*.png */gfxboot/*.png ; do \
	    echo \(gimp-normalize-to-bootsplash 1.0 \"$$i\" \"`dirname $$i`/`basename $$i .png`.jpg\"\) >> tmp-gimp-command; \
	done
	@echo \(gimp-quit 1\) >> tmp-gimp-command
	@cat tmp-gimp-command | gimp  --console-messages -i  -d  -b -
	@rm -f tmp-gimp-command
#	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/*.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/; \
	  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/; \
	  install -m644 $$t/background/$$t.xml $(prefix)$(sharedir)/mdk/backgrounds/; \
	  for d in 1024x768 1280x1024 1280x800 1440x900 1600x1200 1680x1050 1920x1200 1920x1440 ; \
	  do \
	    ln -f -s $$t-$$d-1300.png $(prefix)$(sharedir)/mdk/backgrounds/$$t-$$d.png; \
	  done; \
	  source $$t/bootsplash/colors; \
	  for d in 800x600 1024x768 1280x1024 1600x1200; \
	  do \
	    W=`echo $$d | sed -e "s/x.*//"` ;\
	    H=`echo $$d | sed -e "s/.*x//"` ;\
	    ln -f -s bootsplash-$$d.jpg $(prefix)$(sharedir)/bootsplash/themes/$$t/images/silent-$$d.jpg; \
	    for v in common/bootsplash/config/*-template.cfg ; do \
		cp -f $$v $(prefix)$(configdir)/bootsplash/themes/$$t/config/`basename $$v -template.cfg`-$$d.cfg ;\
            done; \
	    perl -pi -e "s,/\@THEME\@/,/$$t/,; s,\@B1\@,$$B1,g; s,\@B2\@,$$B2,g; s,\@B3\@,$$B3,g;s,\@B4\@,$$B4,g; s/\@HEIGHT\@(-\d+)?/$$H+\$$1/eg; s/\@WIDTH\@(-\d+)?/$$W+\$$1/eg"  $(prefix)$(configdir)/bootsplash/themes/$$t/config/*-$$d.cfg; \
	    for v in 1 2 3 4 5 6; \
	    do \
	      ln -f -s vt0-$$d.cfg $(prefix)$(configdir)/bootsplash/themes/$$t/config/vt$$v-$$d.cfg; \
	    done; \
	  done; \
	  rm -f $(prefix)$(configdir)/bootsplash/themes/$$t/config/*template.cfg ; \
	  chmod 644 $(prefix)$(configdir)/bootsplash/themes/$$t/config/*.cfg; \
	  install -d $(prefix)$(sharedir)/gfxboot/themes/$$t;  \
	  install -m644 $$t/gfxboot/*.jpg $(prefix)$(sharedir)/gfxboot/themes/$$t/; \
	  install -m644 /usr/share/fonts/TTF/dejavu/DejaVuSans.ttf $(prefix)$(configdir)/bootsplash/luxisri.ttf; \
        done

changelog:
	svn2cl --authors ../common/username.xml --accum
	rm -f ChangeLog.bak
	svn commit -m "Generated by svn2cl the `date '+%c'`" ChangeLog

dist: cleandist export tar

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

export:
	svn export -q -rBASE . $(NAME)-$(VERSION)

localdist: cleandist localcopy tar

dir:
	mkdir $(NAME)-$(VERSION)

tar:
	tar cvf $(NAME).tar $(NAME)-$(VERSION)
	rm -rf $(NAME)-$(VERSION)

localcopy: dir
	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)