0 | 0 |
#!/usr/bin/make -f
|
1 | 1 |
|
2 | |
pkg = $(DEB_SOURCE_PACKAGE)
|
3 | |
DEB_PYTHON_SUGAR_PACKAGES = $(pkg)
|
|
2 |
include /usr/share/dpkg/pkg-info.mk
|
4 | 3 |
|
5 | |
include /usr/share/cdbs/1/class/python-sugar.mk
|
6 | |
include /usr/share/cdbs/1/rules/debhelper.mk
|
|
4 |
PKG = $(DEB_SOURCE)
|
7 | 5 |
|
|
6 |
export PYBUILD_SYSTEM = custom
|
|
7 |
export PYBUILD_INSTALL_ARGS = HOME=debian/fakehome \
|
|
8 |
&& mkdir --parents "$$HOME" \
|
|
9 |
&& /usr/bin/python3 setup.py install --destdir debian/tmp \
|
|
10 |
&& rm -rf "$$HOME"
|
|
11 |
|
|
12 |
# omit git hint files
|
|
13 |
%:
|
|
14 |
dh $@ --with linktree --buildsystem=pybuild -X.git
|
|
15 |
|
|
16 |
execute_after_dh_install:
|
8 | 17 |
# Fix favor ISO 639-1 when differing from ISO 639-2
|
9 | |
binary-post-install/$(pkg)::
|
10 | |
mv debian/$(cdbs_curpkg)/usr/share/locale/aym \
|
11 | |
debian/$(cdbs_curpkg)/usr/share/locale/ay
|
12 | |
mv debian/$(cdbs_curpkg)/usr/share/locale/ibo \
|
13 | |
debian/$(cdbs_curpkg)/usr/share/locale/ig
|
14 | |
|
15 | |
clean::
|
16 | |
find -name *.mo -delete
|
17 | |
find -name *.linfo -delete
|
18 | |
rm -f MANIFEST
|
19 | |
|
|
18 |
mv debian/$(PKG)/usr/share/locale/aym \
|
|
19 |
debian/$(PKG)/usr/share/locale/ay
|
|
20 |
mv debian/$(PKG)/usr/share/locale/ibo \
|
|
21 |
debian/$(PKG)/usr/share/locale/ig
|
20 | 22 |
# Fix broken paths in desktop file
|
21 | 23 |
# * TODO: drop when fixed in sugar-toolkit-gtk3
|
22 | |
binary-fixup/$(pkg)::
|
23 | |
find $(cdbs_curdestdir)/usr/share -type f -name '*.desktop' \
|
|
24 |
find debian/*/usr/share -type f -name '*.desktop' \
|
24 | 25 |
-execdir perl -pi -e 's,^\S+\s*=\s*\K\S*(?=/usr/share),,g' '{}' ';'
|