1 # -*- mode: makefile; coding: utf-8 -*-
3 # This file is part of OpenMediaVault.
5 # @license http://www.gnu.org/licenses/gpl.html GPL Version 3
6 # @author Volker Theile <volker.theile@openmediavault.org>
7 # @copyright Copyright (c) 2009-2013 Volker Theile
9 # OpenMediaVault is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
14 # OpenMediaVault is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
22 OMV_PACKAGE
:= $(shell pwd | sed
's|.*/||')
23 OMV_POT_DIR
:= $(CURDIR
)/usr
/share
/openmediavault
/locale
24 OMV_POT_FILE
:= $(OMV_PACKAGE
).pot
25 OMV_TRANSIFEX_SLUG
:= $(OMV_PACKAGE
)pot
28 tx
--root
="$(CURDIR)/../" pull
--all \
29 --resource
=$(OMV_PACKAGE
).
$(OMV_TRANSIFEX_SLUG
)
32 tx
--root
="$(CURDIR)/../" push
--source \
33 --resource
=$(OMV_PACKAGE
).
$(OMV_TRANSIFEX_SLUG
)
38 echo
"Building PO template file ..." >&2
39 mkdir
-p
$(OMV_POT_DIR
)
40 find
$(CURDIR
) \
( -iname
*.js
-o
-iname
*.php
-o
-iname
*.inc \
) \
41 -type f
-print0 | xargs
-0r xgettext
--keyword
=_ \
42 --output-dir
=$(OMV_POT_DIR
) --output
=$(OMV_POT_FILE
) \
43 --force-po
--no-location
--no-wrap
--sort-output \
44 --package-name
=$(OMV_PACKAGE
) -
45 # Remove '#, c-format' comments, otherwise manuall upload of translation
46 # files confuses Transifex.
47 sed
--in-place
'/^#, c-format/d' $(OMV_POT_DIR
)/$(OMV_POT_FILE
)
51 echo
"Removing SCM files ..." >&2
52 find
$(CURDIR
)/debian
/$(OMV_PACKAGE
) \
( -name .svn
-o
-name .git \
) \
53 -type d
-print0
-prune | xargs
-0r
rm -rf
55 omv_build_doc
: debian
/doxygen.conf
56 mkdir
-p debian
/doxygen
60 dpkg-buildpackage
-S
-us
-uc
62 .PHONY
: omv_pull_po omv_push_pot omv_build_pot omv_clean_scm omv_build_doc