Dotclear

source: Makefile @ 0:54703be25dd6

Revision 0:54703be25dd6, 3.1 KB checked in by Dsls <dsls@…>, 14 years ago (diff)

2.3 branch (trunk) first checkin

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

Sites map