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