Dotclear

source: Makefile @ 1451:90f9cf62e261

Revision 1451:90f9cf62e261, 3.6 KB checked in by franck <carnet.franck.paul@…>, 12 years ago (diff)

Add packing of jsUpload in Makefile

Line 
1SHELL=/bin/sh
2
3DIST=_dist
4DC=$(DIST)/dotclear
5
6default:
7     @echo "make config or make dist"
8
9config:
10     mkdir -p ./$(DC)
11     
12     ## Copy needed folders and files
13     cp -pRf ./admin ./inc ./themes ./index.php ./CHANGELOG ./CREDITS ./LICENSE ./README ./$(DC)/
14     
15     ## Locales directory
16     mkdir -p ./$(DC)/locales
17     cp -pRf ./locales/README ./locales/en ./locales/fr ./$(DC)/locales/
18     
19     ## Create cache, db, plugins and public folders
20     mkdir ./$(DC)/cache ./$(DC)/db ./$(DC)/plugins ./$(DC)/public
21     cp inc/.htaccess ./$(DC)/cache/
22     cp inc/.htaccess ./$(DC)/db/
23     cp inc/.htaccess ./$(DC)/plugins/
24     
25     ## Remove .svn folders
26     find ./$(DIST)/ -type d -name '.svn' | xargs rm -rf
27
28     ## Remove .hg* files and folders
29     find ./$(DIST)/ -type d -name '.hg*' | xargs rm -rf
30     find ./$(DIST)/ -type f -name '.hg*' | xargs rm -rf
31     
32     ## Remove config file if any
33     rm -f ./$(DC)/inc/config.php
34     
35     ## Copy built-in plugins
36     cp -pRf \
37     ./plugins/aboutConfig \
38     ./plugins/akismet \
39     ./plugins/antispam \
40     ./plugins/attachments \
41     ./plugins/blogroll \
42     ./plugins/blowupConfig \
43     ./plugins/daInstaller \
44     ./plugins/fairTrackbacks \
45     ./plugins/importExport \
46     ./plugins/maintenance \
47     ./plugins/tags \
48     ./plugins/pages \
49     ./plugins/pings \
50     ./plugins/simpleMenu \
51     ./plugins/themeEditor \
52     ./plugins/userPref \
53     ./plugins/widgets \
54     ./$(DC)/plugins/
55     
56     ## Remove .svn folders
57     find ./$(DIST)/ -type d -name '.svn' -print0 | xargs -0 rm -rf
58     
59     ## Remove .hg* files and folders
60     find ./$(DIST)/ -type d -name '.hg*' | xargs rm -rf
61     find ./$(DIST)/ -type f -name '.hg*' | xargs rm -rf
62
63     ## "Compile" .po files
64     ./build-tools/make-l10n.php ./$(DC)/
65     
66     ## Pack javascript files
67     find $(DC)/admin/js/*.js -exec ./build-tools/min-js.php \{\} \;
68     find $(DC)/admin/js/ie7/*.js -exec ./build-tools/min-js.php \{\} \;
69     find $(DC)/admin/js/jquery/*.js -exec ./build-tools/min-js.php \{\} \;
70     find $(DC)/admin/js/jsToolBar/*.js -exec ./build-tools/min-js.php \{\} \;
71     find $(DC)/admin/js/jsUpload/*.js -exec ./build-tools/min-js.php \{\} \;
72     find $(DC)/admin/js/tool-man/*.js -exec ./build-tools/min-js.php \{\} \;
73     find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \;
74     find $(DC)/themes/default/js/*.js -exec ./build-tools/min-js.php \{\} \;
75     
76     ## Debug off
77     perl -pi -e "s|^//\*== DC_DEBUG|/*== DC_DEBUG|sgi;" $(DC)/inc/prepend.php $(DC)/inc/prepend.php
78     
79     ## Create digest
80     cd $(DC) && ( \
81          md5sum `find . -type f -not -path "./inc/digest" -not -path "./cache/*" -not -path "./db/*" -not -path ./CHANGELOG` \
82          > inc/digests \
83     )
84     
85     touch config-stamp
86
87dist: config dist-tgz dist-zip dist-l10n
88
89deb:
90     cp ./README debian/README
91     dpkg-buildpackage -rfakeroot
92
93dist-tgz:
94     [ -f config-stamp ]
95     cd $(DIST) && tar cfz dotclear-$$(grep DC_VERSION dotclear/inc/prepend.php | cut -d"'" -f4).tar.gz ./dotclear
96
97dist-zip:
98     [ -f config-stamp ]
99     cd $(DIST) && zip -r9 dotclear-$$(grep DC_VERSION dotclear/inc/prepend.php | cut -d"'" -f4).zip ./dotclear
100
101dist-l10n:
102     [ -f config-stamp ]
103     
104     rm -rf ./$(DIST)/l10n
105     mkdir -p ./$(DIST)/l10n
106     
107     find ./locales/ -maxdepth 1 -mindepth 1 -type d -not -name '.svn' -not -name '_pot' -not -name 'en' \
108     -exec cp -pRf \{\} ./$(DIST)/l10n/ \;
109     
110     find ./$(DIST)/l10n -type d -name '.svn' | xargs rm -rf
111     ./build-tools/make-l10n.php ./$(DIST)/l10n/
112     
113     cd ./$(DIST)/l10n && for i in *; do \
114          zip -r9 "$$i-$$(grep DC_VERSION ../dotclear/inc/prepend.php | cut -d"'" -f4).zip" "$$i"; \
115          rm -rf "$$i"; \
116     done
117     
118
119clean:
120     [ -f config-stamp ]
121     rm -rf $(DIST)
122     rm -f config-stamp build-stamp configure-stamp
123
124
125## Modules (Themes and Plugins) ###############################################
126pack-tool:
127     [ "$(ipath)" != '' ]
128     [ "$(iname)" != '' ]
129     [ "$(iname)" != '' ]
130     [ -d $(ipath)/$(iname) ]
131     
132     
Note: See TracBrowser for help on using the repository browser.

Sites map