Dotclear

source: Makefile @ 285:6ed83236e7be

Revision 285:6ed83236e7be, 3.1 KB checked in by Franck <carnet.franck.paul@…>, 14 years ago (diff)

AJout plugin userPref dans la distribution

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 config file if any
29     rm -f ./$(DC)/inc/config.php
30     
31     ## Copy built-in plugins
32     cp -pRf \
33     ./plugins/aboutConfig \
34     ./plugins/akismet \
35     ./plugins/antispam \
36     ./plugins/blogroll \
37     ./plugins/blowupConfig \
38     ./plugins/fairTrackbacks \
39     ./plugins/importExport \
40     ./plugins/maintenance \
41     ./plugins/tags \
42     ./plugins/pages \
43     ./plugins/pings \
44     ./plugins/themeEditor \
45     ./plugins/userPref \
46     ./plugins/widgets \
47     ./$(DC)/plugins/
48     
49     ## Remove .svn folders
50     find ./$(DIST)/ -type d -name '.svn' -print0 | xargs -0 rm -rf
51     
52     ## "Compile" .po files
53     ./build-tools/make-l10n.php ./$(DC)/
54     
55     ## Pack javascript files
56     find $(DC)/admin/js/*.js -exec ./build-tools/min-js.php \{\} \;
57     find $(DC)/admin/js/jquery/*.js -exec ./build-tools/min-js.php \{\} \;
58     find $(DC)/admin/js/jsToolBar/*.js -exec ./build-tools/min-js.php \{\} \;
59     find $(DC)/admin/js/tool-man/*.js -exec ./build-tools/min-js.php \{\} \;
60     find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \;
61     find $(DC)/themes/default/js/*.js -exec ./build-tools/min-js.php \{\} \;
62     
63     ## Debug off
64     perl -pi -e "s|^//\*== DC_DEBUG|/*== DC_DEBUG|sgi;" $(DC)/inc/prepend.php $(DC)/inc/prepend.php
65     
66     ## Create digest
67     cd $(DC) && ( \
68          md5sum `find . -type f -not -path "./inc/digest" -not -path "./cache/*" -not -path "./db/*" -not -path ./CHANGELOG` \
69          > inc/digests \
70     )
71     
72     touch config-stamp
73
74dist: config dist-tgz dist-zip dist-l10n
75
76deb:
77     cp ./README debian/README
78     dpkg-buildpackage -rfakeroot
79
80dist-tgz:
81     [ -f config-stamp ]
82     cd $(DIST) && tar cfz dotclear-$$(grep DC_VERSION dotclear/inc/prepend.php | cut -d"'" -f4).tar.gz ./dotclear
83
84dist-zip:
85     [ -f config-stamp ]
86     cd $(DIST) && zip -r9 dotclear-$$(grep DC_VERSION dotclear/inc/prepend.php | cut -d"'" -f4).zip ./dotclear
87
88dist-l10n:
89     [ -f config-stamp ]
90     
91     rm -rf ./$(DIST)/l10n
92     mkdir -p ./$(DIST)/l10n
93     
94     find ./locales/ -maxdepth 1 -mindepth 1 -type d -not -name '.svn' -not -name '_pot' -not -name 'en' \
95     -exec cp -pRf \{\} ./$(DIST)/l10n/ \;
96     
97     find ./$(DIST)/l10n -type d -name '.svn' | xargs rm -rf
98     ./build-tools/make-l10n.php ./$(DIST)/l10n/
99     
100     cd ./$(DIST)/l10n && for i in *; do \
101          zip -r9 "$$i-$$(grep DC_VERSION ../dotclear/inc/prepend.php | cut -d"'" -f4).zip" "$$i"; \
102          rm -rf "$$i"; \
103     done
104     
105
106clean:
107     [ -f config-stamp ]
108     rm -rf $(DIST)
109     rm -f config-stamp build-stamp configure-stamp
110
111
112## Modules (Themes and Plugins) ###############################################
113pack-tool:
114     [ "$(ipath)" != '' ]
115     [ "$(iname)" != '' ]
116     [ "$(iname)" != '' ]
117     [ -d $(ipath)/$(iname) ]
118     
119     
Note: See TracBrowser for help on using the repository browser.

Sites map