3
PACKAGE=schooltool.isli
4
LOCALES=src/schooltool/isli/locales
5
TRANSLATIONS_ZCML=schooltool/isli/translations.zcml
7
DIST=/home/ftp/pub/schooltool/ark
10
INSTANCE_TYPE=schooltool
21
virtualenv --no-site-packages -p $(PYTHON) python
24
bootstrap bin/buildout: | buildout.cfg python
25
python/bin/python bootstrap.py
28
cp deploy.cfg buildout.cfg
31
buildout .installed.cfg: python bin/buildout buildout.cfg base.cfg deploy.cfg setup.py
32
bin/buildout $(BUILDOUT_FLAGS)
35
develop bin/coverage: buildout.cfg develop.cfg
36
sed -e 's/base.cfg/develop.cfg/' -i buildout.cfg
42
$(MAKE) buildout BUILDOUT_FLAGS=-n
45
bin/make-schooltool-instance instance instance_type=$(INSTANCE_TYPE)
49
bin/start-schooltool-instance instance
58
rm -rf bin develop-eggs parts .installed.cfg
61
rm -rf coverage ftest-coverage
62
find . -name '*.py[co]' -delete
63
find . -name '*.mo' -delete
64
find . -name 'LC_MESSAGES' -exec rmdir -p --ignore-fail-on-non-empty {} +
93
bin/test --at-level 2 -u --coverage=$(CURDIR)/coverage
95
.PHONY: coverage-reports-html
96
coverage-reports-html coverage/reports: bin/coverage build
97
test -d coverage || $(MAKE) coverage
98
rm -rf coverage/reports
99
mkdir coverage/reports
100
bin/coverage coverage coverage/reports
101
ln -s $(PACKAGE).html coverage/reports/index.html
103
.PHONY: ftest-coverage
104
ftest-coverage: build
105
rm -rf ftest-coverage
106
bin/test --at-level 2 -f --coverage=$(CURDIR)/ftest-coverage
108
.PHONY: ftest-coverage-reports-html
109
ftest-coverage-reports-html ftest-coverage/reports: bin/coverage build
110
test -d ftest-coverage || $(MAKE) ftest-coverage
111
rm -rf ftest-coverage/reports
112
mkdir ftest-coverage/reports
113
bin/coverage ftest-coverage ftest-coverage/reports
114
ln -s $(PACKAGE).html ftest-coverage/reports/index.html
118
.PHONY: extract-translations
119
extract-translations: build
120
bin/i18nextract --egg $(PACKAGE) \
121
--domain $(PACKAGE) \
122
--zcml $(TRANSLATIONS_ZCML) \
123
--output-file $(LOCALES)/$(PACKAGE).pot
125
.PHONY: compile-translations
126
compile-translations:
127
for f in $(LOCALES)/*.po; do \
128
mkdir -p $${f%.po}/LC_MESSAGES; \
129
msgfmt -o $${f%.po}/LC_MESSAGES/$(PACKAGE).mo $$f;\
132
.PHONY: update-translations
134
for f in $(LOCALES)/*.po; do \
135
msgmerge -qUN $$f $(LOCALES)/$(PACKAGE).pot ;\
137
$(MAKE) compile-translations
142
release: compile-translations
143
-cp buildout.cfg buildout.cfg~dev~
144
cp deploy.cfg buildout.cfg
145
grep -qv 'dev' version.txt.in || echo -n `cat version.txt.in`-r`bzr revno` > version.txt
146
$(PYTHON) setup.py sdist
148
-mv buildout.cfg~dev~ buildout.cfg
152
rm -v dist/$(PACKAGE)-*dev-r*.tar.gz
157
VERSION=`cat version.txt.in` ;\
159
grep -qv 'dev' version.txt.in || VERSION=`cat version.txt.in`-r`bzr revno` ;\
160
grep -qv 'dev' version.txt.in || DIST=$(DIST)/dev ;\
161
if [ -w $${DIST} ] ; then \
162
echo cp dist/$(PACKAGE)-$${VERSION}.tar.gz $${DIST} ;\
163
cp dist/$(PACKAGE)-$${VERSION}.tar.gz $${DIST} ;\
165
echo scp dist/$(PACKAGE)-$${VERSION}.tar.gz* ftp.schooltool.org:$${DIST} ;\
166
scp dist/$(PACKAGE)-$${VERSION}.tar.gz* ftp.schooltool.org:$${DIST} ;\
171
.PHONY: ubuntu-environment
173
sudo apt-get install build-essential gettext enscript \
174
python-dev python-virtualenv \
175
ttf-ubuntu-font-family ttf-liberation \
176
libicu-dev libxslt1-dev libfreetype6-dev libjpeg-dev