1 include /usr
/share
/dpkg
/pkg-info.mk
30 BUILDDIR ?
= ${DEB_SOURCE}-${DEB_VERSION}
32 PVE_I18N_DEB
=pve-i18n_
${DEB_VERSION}_all.deb
33 PMG_I18N_DEB
=pmg-i18n_
${DEB_VERSION}_all.deb
34 PBS_I18N_DEB
=pbs-i18n_
${DEB_VERSION}_all.deb
36 DEBS
=${PMG_I18N_DEB} $(PVE_I18N_DEB
) $(PBS_I18N_DEB
)
38 PMGLOCALEDIR
=${DESTDIR}/usr
/share
/pmg-i18n
39 PVELOCALEDIR
=${DESTDIR}/usr
/share
/pve-i18n
40 PBSLOCALEDIR
=${DESTDIR}/usr
/share
/pbs-i18n
42 PMG_LANG_FILES
=$(patsubst %, pmg-lang-
%.js
, $(LINGUAS
))
43 PVE_LANG_FILES
=$(patsubst %, pve-lang-
%.js
, $(LINGUAS
))
44 PBS_LANG_FILES
=$(patsubst %, pbs-lang-
%.js
, $(LINGUAS
))
48 $(BUILDDIR
): submodule
57 build-debs
: $(BUILDDIR
)
58 cd
$(BUILDDIR
); dpkg-buildpackage
-b
-us
-uc
63 test -f pmg-gui
/Makefile
-a
-f proxmox-backup
/Makefile
-a
-f pve-manager
/Makefile \
64 || git submodule update
--init
67 install: ${PMG_LANG_FILES} ${PVE_LANG_FILES} ${PBS_LANG_FILES}
68 install -d
${PMGLOCALEDIR}
69 install -m
0644 ${PMG_LANG_FILES} ${PMGLOCALEDIR}
70 install -d
${PVELOCALEDIR}
71 install -m
0644 ${PVE_LANG_FILES} ${PVELOCALEDIR}
72 install -d
${PBSLOCALEDIR}
73 install -m
0644 ${PBS_LANG_FILES} ${PBSLOCALEDIR}
76 .
/po2js.pl
-t pmg
-v
"${DEB_VERSION}" -o pmg-lang-
$*.js
$?
79 .
/po2js.pl
-t pve
-v
"${DEB_VERSION}" -o pve-lang-
$*.js
$?
82 .
/po2js.pl
-t pbs
-v
"${DEB_VERSION}" -o pbs-lang-
$*.js
$?
84 # parameter 1 is the name
85 # parameter 2 is the directory
87 .
/jsgettext.pl
-p
"$(1) $(shell cd $(2);git rev-parse HEAD)" -o
$(1).pot
$(2)
90 .PHONY
: update update_pot do_update
92 $(call potupdate
,proxmox-widget-toolkit
,proxmox-widget-toolkit
/)
93 $(call potupdate
,pve-manager
,pve-manager
/www
/manager6
/)
94 $(call potupdate
,proxmox-mailgateway
,pmg-gui
/js
/)
95 $(call potupdate
,proxmox-backup
,proxmox-backup
/www
/)
100 for i in
$(LINGUAS
); do echo
-n
"$$i: "; msgmerge
-s
-v
$$i.po messages.pot
>$$i.po.tmp
&& mv
$$i.po.tmp
$$i.po
; done
;
103 git submodule
foreach 'git pull --ff-only origin master'
107 @for i in
$(LINGUAS
); do echo
-n
"$$i: "; msgfmt
--statistics
-o
/dev
/null
$$i.po
; done
109 init-
%.po
: messages.pot
110 msginit
-i
$^
-l
$^
-o
$*.po
--no-translator
112 .INTERMEDIATE
: messages.pot
113 messages.pot
: proxmox-widget-toolkit.pot proxmox-mailgateway.pot pve-manager.pot proxmox-backup.pot
121 find .
-name
'*~' -exec
rm {} ';'
122 rm -rf
$(DEB_SOURCE
)-[0-9]*/ *.po.tmp
*.js.tmp
*.deb
*.buildinfo
*.changes
*.js messages.pot
124 .PHONY
: upload-pve upload-pmg upload-pbs upload
125 upload-pve
: ${PVE_I18N_DEB}
126 tar cf
- $^|ssh
-X repoman@repo.proxmox.com
-- upload
--product pve
--dist bullseye
127 upload-pmg
: ${PMG_I18N_DEB}
128 tar cf
- $^|ssh
-X repoman@repo.proxmox.com
-- upload
--product pmg
--dist bullseye
129 upload-pbs
: ${PBS_I18N_DEB}
130 tar cf
- $^|ssh
-X repoman@repo.proxmox.com
-- upload
--product pbs
--dist bullseye
132 upload
: upload-pve upload-pmg upload-pbs