2 # This file is part of Panucci.
3 # Copyright (c) 2008-2010 The Panucci Audiobook and Podcast Player Project
5 # Panucci is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # Panucci is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with Panucci. If not, see <http://www.gnu.org/licenses/>.
22 MESSAGESPOT
= data
/messages.pot
24 TRANSLATION_SOURCES
=$(wildcard src
/panucci
/*.py
) $(wildcard src
/panucci
/backends
/*.py
)
28 data
/panucci.service
: data
/panucci.service.in
29 sed
's|@INSTALL_PREFIX@|'/$(PREFIX
)'|g' < data
/panucci.service.in
> data
/panucci.service
32 install: mo data
/panucci.service
33 $(PYTHON
) setup.py
install --root
=$(DESTDIR
) --prefix=$(PREFIX
)
36 PYTHONPATH
=src
/ $(PYTHON
) bin
/panucci
--debug
39 xgettext
-k_
-kN_
--from-code utf-8
-Lpython
-o
$(MESSAGESPOT
) $(TRANSLATION_SOURCES
)
40 for langfile in data
/po
/*.po
; do msgmerge
-q
-U
$${langfile} $(MESSAGESPOT
); done
43 for langfile in data
/po
/*.po
; do \
44 mo_dir
="data/locale/`basename $${langfile} .po`/LC_MESSAGES/"; \
45 mkdir
-p
$${mo_dir}; \
46 msgfmt
$${langfile} -o
$${mo_dir}/panucci.mo
; \
50 find src
/ -name
'*.pyc' -exec
rm '{}' \
;
51 find src
/ -name
'*.pyo' -exec
rm '{}' \
;
52 rm -rf build data
/locale
53 rm -f data
/panucci.service data
/po
/*~
58 .PHONY
: install test po mo
clean distclean