2014-07-01 13:18:30 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
2019-02-26 13:32:46 +00:00
|
|
|
LANGUAGES := $(shell node -p "Object.keys(require('./lang/languages.json')).join(' ')")
|
|
|
|
COUNTRIES_DIR := node_modules/i18n-iso-countries/langs
|
|
|
|
|
2014-07-01 13:18:30 +00:00
|
|
|
%:
|
2014-09-10 17:26:30 +00:00
|
|
|
dh $@
|
|
|
|
|
2015-01-05 14:41:38 +00:00
|
|
|
# we skip making Makefile exists for updating browserify modules when developing
|
|
|
|
override_dh_auto_build:
|
|
|
|
|
2019-02-26 13:32:46 +00:00
|
|
|
override_dh_install: $(LANGUAGES)
|
2014-08-27 07:20:53 +00:00
|
|
|
dh_installdirs
|
2019-12-04 15:15:48 +00:00
|
|
|
dh_install
|
2019-02-26 13:32:46 +00:00
|
|
|
|
|
|
|
$(LANGUAGES):
|
2019-07-22 23:14:40 +00:00
|
|
|
LOCALE=$$(echo $@ | cut -c1-2) ; \
|
2019-02-26 13:32:46 +00:00
|
|
|
if [ -f $(COUNTRIES_DIR)/$@.json ] ; \
|
|
|
|
then \
|
|
|
|
dh_install -pjitsi-meet-web $(COUNTRIES_DIR)/$@.json usr/share/jitsi-meet/lang/; \
|
|
|
|
mv debian/jitsi-meet-web/usr/share/jitsi-meet/lang/$@.json debian/jitsi-meet-web/usr/share/jitsi-meet/lang/countries-$@.json; \
|
2019-07-22 23:14:40 +00:00
|
|
|
else \
|
|
|
|
if [ -f $(COUNTRIES_DIR)/$$LOCALE.json ] ; \
|
|
|
|
then \
|
|
|
|
dh_install -pjitsi-meet-web $(COUNTRIES_DIR)/$$LOCALE.json usr/share/jitsi-meet/lang/; \
|
|
|
|
mv debian/jitsi-meet-web/usr/share/jitsi-meet/lang/$$LOCALE.json debian/jitsi-meet-web/usr/share/jitsi-meet/lang/countries-$@.json; \
|
|
|
|
fi; \
|
2019-02-26 13:32:46 +00:00
|
|
|
fi;
|