Dotclear

source: Makefile @ 415:14f70d8abc9f

Revision 415:14f70d8abc9f, 3.4 KB checked in by Dsls <dsls@…>, 14 years ago (diff)

added attachments as plugins being included at build, strengthened tests for *If templates tests

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

Sites map