summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: ca2781b4790381fd4a106be4e7f0ab869b874ec2 (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
NAME=mageia-theme
PACKAGE=mageia-theme
VERSION=1.5.0.30

THEMES=Mageia-Default

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

SVNSOFT=svn+ssh://svn.mageia.org/svn/soft/theme/mageia-theme/
SVNNAME=svn+ssh://svn.mageia.org/svn/packages/cauldron/mageia-theme/current/

all:

install:
	@mkdir -p $(prefix)$(sharedir)/mga/backgrounds/
	@/bin/cp -f gimp/scripts/gimp-normalize-to-bootsplash.scm tmp-gimp-command
	@cat gimp/scripts/gimp-convert-to-jpeg.scm >> tmp-gimp-command
	@for i in */gfxboot/*.png ; do \
	    echo \(gimp-normalize-to-bootsplash 1.0 \"$$i\" \"`dirname $$i`/`basename $$i .png`.jpg\"\) >> tmp-gimp-command; \
	done
	@for i in */background/*.png ; do \
            echo \(gimp-convert-to-jpeg 0.98 \"$$i\" \"$(prefix)$(sharedir)/mga/backgrounds/`basename $$i .png`.jpg\"\) >> tmp-gimp-command; \
	done
	@echo \(gimp-quit 1\) >> tmp-gimp-command
	@echo running gimp to convert images
	@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))'

	mkdir -p $(prefix)/$(sharedir)/mga/screensaver
	mkdir -p $(prefix)/$(sharedir)/mga/backgrounds
	install -m 644 common/screensaver/*.jpg $(prefix)$(sharedir)/mga/screensaver
	install -m 644 extra-backgrounds/*.jpg $(prefix)$(sharedir)/mga/backgrounds
	install -m 644 extra-backgrounds/*.xml $(prefix)$(sharedir)/mga/backgrounds
#	install -m644 */background/*.jpg $(prefix)$(sharedir)/mga/backgrounds 
	@for t in $(THEMES); do \
          set -x; set -e; \
	  install -d $(prefix)/$(sharedir)/plymouth/themes/$$t; \
	  install -m644 common/plymouth/*.script $(prefix)$(sharedir)/plymouth/themes/$$t/; \
	  install -m644 common/plymouth/*.png $(prefix)$(sharedir)/plymouth/themes/$$t/; \
	  install -m644 $$t/plymouth/*.plymouth $(prefix)$(sharedir)/plymouth/themes/$$t/; \
	  install -m644 $$t/plymouth/*.png $(prefix)$(sharedir)/plymouth/themes/$$t/; \
	  install -m644 $$t/background/$$t-*.png $(prefix)$(sharedir)/mga/backgrounds/; \
	  install -d $(prefix)$(sharedir)/gfxboot/themes/$$t;  \
	  install -m644 $$t/gfxboot/*.jpg $(prefix)$(sharedir)/gfxboot/themes/$$t/; \
        done

changelog:
	svn2cl --authors ../common/username.xml --accum
	rm -f ChangeLog.bak
	svn commit -m "Generated by svn2cl the `LC_ALL=C 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 cfa $(NAME)-$(VERSION).tar.xz $(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)