3
ifneq ($(shell dh -l | grep -xF translations),)
4
dh $@ --with python2,translations
9
override_dh_auto_install:
10
dh_auto_install -- --install-scripts=/opt/extras.ubuntu.com/maps --install-data=/opt/extras.ubuntu.com/maps --install-lib=/opt/extras.ubuntu.com/maps
13
dh_python2 /opt/extras.ubuntu.com/maps
18
mkdir -p debian/maps/opt/extras.ubuntu.com/maps/bin
19
if [ -x debian/maps/opt/extras.ubuntu.com/maps/maps/maps ]; then mv debian/maps/opt/extras.ubuntu.com/maps/maps/maps debian/maps/opt/extras.ubuntu.com/maps/bin; fi
20
if [ -f debian/maps/opt/extras.ubuntu.com/maps/share/applications/maps.desktop ]; then \
21
mkdir -p debian/maps/usr/share/applications; \
22
mv debian/maps/opt/extras.ubuntu.com/maps/share/applications/maps.desktop debian/maps/usr/share/applications/extras-maps.desktop; \
23
rmdir --ignore-fail-on-non-empty debian/maps/opt/extras.ubuntu.com/maps/share/applications; \
24
sed -i 's|Exec=.*|Exec=/opt/extras.ubuntu.com/maps/bin/maps|' debian/maps/usr/share/applications/extras-maps.desktop; \
25
sed -i 's|Icon=/usr/|Icon=/opt/extras.ubuntu.com/maps/|' debian/maps/usr/share/applications/extras-maps.desktop; \
27
grep -RlZ 'import gettext' debian/maps/* | xargs -0 -r sed -i 's|\(import\) gettext$$|\1 locale|'
28
grep -RlZ 'from gettext import gettext as _' debian/maps/* | xargs -0 -r sed -i 's|from gettext \(import gettext as _\)|from locale \1|'
29
grep -RlZ "gettext.textdomain('maps')" debian/maps/* | xargs -0 -r sed -i "s|gettext\(\.textdomain('maps')\)|locale\.bindtextdomain('maps', '/opt/extras.ubuntu.com/maps/share/locale')\nlocale\1|"
30
sed -i "s|__maps_data_directory__ =.*|__maps_data_directory__ = '/opt/extras.ubuntu.com/maps/share/maps/'|" debian/maps/opt/extras.ubuntu.com/maps/maps*/mapsconfig.py
31
sed -i 's| sys.path.insert(0, opt_path)|\0\n os.putenv("XDG_DATA_DIRS", "%s:%s" % ("/opt/extras.ubuntu.com/maps/share/", os.getenv("XDG_DATA_DIRS", "")))|' debian/maps/opt/extras.ubuntu.com/maps/bin/maps
32
if [ -d debian/maps/opt/extras.ubuntu.com/maps/share/glib-2.0/schemas ]; then glib-compile-schemas debian/maps/opt/extras.ubuntu.com/maps/share/glib-2.0/schemas; fi
b'\\ No newline at end of file'