~ubuntu-app-review-contributors/ubuntu-app-reviews/maps

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: App Bot
  • Author(s): Sigurd Gartmann
  • Date: 2012-07-09 21:35:18 UTC
  • Revision ID: appbot@holba.ch-20120709213518-vdeh60tnw27cdgne
Tags: 12.07.3
New release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
%:
 
3
ifneq ($(shell dh -l | grep -xF translations),)
 
4
        dh $@ --with python2,translations
 
5
else
 
6
        dh $@ --with python2
 
7
endif
 
8
 
 
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
 
11
 
 
12
override_dh_python2:
 
13
        dh_python2 /opt/extras.ubuntu.com/maps
 
14
 
 
15
 
 
16
override_dh_install:
 
17
        dh_install
 
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; \
 
26
        fi
 
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'