1 include /usr
/share
/dpkg
/pkg-info.mk
30 BUILDDIR ?
= $(DEB_SOURCE
)-$(DEB_VERSION
)
32 DSC
=$(DEB_SOURCE
)_
$(DEB_VERSION_UPSTREAM_REVISION
).dsc
33 PVE_I18N_DEB
=pve-i18n_
$(DEB_VERSION
)_all.deb
34 PMG_I18N_DEB
=pmg-i18n_
$(DEB_VERSION
)_all.deb
35 PBS_I18N_DEB
=pbs-i18n_
$(DEB_VERSION
)_all.deb
37 DEBS
=$(PMG_I18N_DEB
) $(PVE_I18N_DEB
) $(PBS_I18N_DEB
)
39 PMGLOCALEDIR
=$(DESTDIR
)/usr
/share
/pmg-i18n
40 PVELOCALEDIR
=$(DESTDIR
)/usr
/share
/pve-i18n
41 PBSLOCALEDIR
=$(DESTDIR
)/usr
/share
/pbs-i18n
43 PMG_LANG_FILES
=$(patsubst %, pmg-lang-
%.js
, $(LINGUAS
))
44 PVE_LANG_FILES
=$(patsubst %, pve-lang-
%.js
, $(LINGUAS
))
45 PBS_LANG_FILES
=$(patsubst %, pbs-lang-
%.js
, $(LINGUAS
))
49 $(BUILDDIR
): submodule
58 build-debs
: $(BUILDDIR
)
59 cd
$(BUILDDIR
); dpkg-buildpackage
-b
-us
-uc
69 cd
$(BUILDDIR
); dpkg-buildpackage
-S
-us
-uc
-d
73 test -f pmg-gui
/Makefile
-a
-f proxmox-backup
/Makefile
-a
-f pve-manager
/Makefile \
74 || git submodule update
--init
77 install: $(PMG_LANG_FILES
) $(PVE_LANG_FILES
) $(PBS_LANG_FILES
)
78 install -d
$(PMGLOCALEDIR
)
79 install -m
0644 $(PMG_LANG_FILES
) $(PMGLOCALEDIR
)
80 install -d
$(PVELOCALEDIR
)
81 install -m
0644 $(PVE_LANG_FILES
) $(PVELOCALEDIR
)
82 install -d
$(PBSLOCALEDIR
)
83 install -m
0644 $(PBS_LANG_FILES
) $(PBSLOCALEDIR
)
86 .
/po2js.pl
-t pmg
-v
"$(DEB_VERSION)" -o pmg-lang-
$*.js
$?
89 .
/po2js.pl
-t pve
-v
"$(DEB_VERSION)" -o pve-lang-
$*.js
$?
92 .
/po2js.pl
-t pbs
-v
"$(DEB_VERSION)" -o pbs-lang-
$*.js
$?
94 # parameter 1 is the name
95 # parameter 2 is the directory
97 .
/jsgettext.pl
-p
"$(1) $(shell cd $(2);git rev-parse HEAD)" -o
$(1).pot
$(2)
100 .PHONY
: update update_pot do_update
101 update_pot
: submodule
102 $(call potupdate
,proxmox-widget-toolkit
,proxmox-widget-toolkit
/)
103 $(call potupdate
,pve-manager
,pve-manager
/www
/manager6
/)
104 $(call potupdate
,proxmox-mailgateway
,pmg-gui
/js
/)
105 $(call potupdate
,proxmox-backup
,proxmox-backup
/www
/)
110 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
;
113 git submodule
foreach 'git pull --ff-only origin master'
117 @for i in
$(LINGUAS
); do echo
-n
"$$i: "; msgfmt
--statistics
-o
/dev
/null
$$i.po
; done
119 init-
%.po
: messages.pot
120 msginit
-i
$^
-l
$^
-o
$*.po
--no-translator
122 .INTERMEDIATE
: messages.pot
123 messages.pot
: proxmox-widget-toolkit.pot proxmox-mailgateway.pot pve-manager.pot proxmox-backup.pot
131 rm -rf
$(DEB_SOURCE
)-[0-9]*/ *.po.tmp
*.js.tmp
*.deb
*.dsc
*.
tar.
* *.build
*.buildinfo
*.changes
*.js messages.pot
133 .PHONY
: upload-pve upload-pmg upload-pbs upload
134 upload-
%: UPLOAD_DIST ?
= $(DEB_DISTRIBUTION
)
135 upload-pve
: $(PVE_I18N_DEB
)
136 tar cf
- $^|ssh
-X repoman@repo.proxmox.com
-- upload
--product pve
--dist $(UPLOAD_DIST
)
137 upload-pmg
: $(PMG_I18N_DEB
)
138 tar cf
- $^|ssh
-X repoman@repo.proxmox.com
-- upload
--product pmg
--dist $(UPLOAD_DIST
)
139 upload-pbs
: $(PBS_I18N_DEB
)
140 tar cf
- $^|ssh
-X repoman@repo.proxmox.com
-- upload
--product pbs
--dist $(UPLOAD_DIST
)
142 upload
: upload-pve upload-pmg upload-pbs