summaryrefslogtreecommitdiffstats
path: root/debian/_base/applications/misc/fusion-icon/debian/rules
blob: af04bd7763beeea3a9defc5d9fdcfef970b14bf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/make -f

DEB_PYTHON3_MODULE_PACKAGES=fusion-icon-trinity

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

# The default gzip compressor has been changed in dpkg >= 1.17.0.
deb_default_compress = $(shell LANG=C dpkg-deb --version | head -n1 | \
                         sed -e "s|.*version ||" -e "s| .*||" | \
                         xargs -r dpkg --compare-versions 1.17.0 lt \
                         && echo xz || echo gzip)
ifeq ($(deb_default_compress),gzip)
DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
                               && echo xz || echo bzip2)
endif

binary-install/fusion-icon-trinity::
	mkdir -p debian/$(cdbs_curpkg)/usr/local/lib
	cp -Rp debian/$(cdbs_curpkg)/usr/local/* debian/$(cdbs_curpkg)/usr/
	rm -rf debian/$(cdbs_curpkg)/usr/local
	mkdir -p debian/$(cdbs_curpkg)/temp
	mv debian/$(cdbs_curpkg)/usr/lib debian/$(cdbs_curpkg)/temp
	mkdir -p debian/$(cdbs_curpkg)/opt/trinity
	cp -Rp debian/$(cdbs_curpkg)/usr/* debian/$(cdbs_curpkg)/opt/trinity/
	rm -rf debian/$(cdbs_curpkg)/usr
	dh_python3 -p $(cdbs_curpkg) --shebang=/usr/bin/python3 /opt/trinity/bin
	###
	# Must be done after invoking dh_pysupport, otherwise python scripts will
	# end up in /usr/share/pyshare instead of dist-packages
	mkdir -p debian/$(cdbs_curpkg)/usr
	mv debian/$(cdbs_curpkg)/temp/lib debian/$(cdbs_curpkg)/usr
	rm -rf debian/$(cdbs_curpkg)/temp
	###
	mkdir -p debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)
	mv debian/$(cdbs_curpkg)/opt/trinity/share/doc/$(cdbs_curpkg)/* debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/
	rmdir -p --ignore-fail-on-non-empty debian/$(cdbs_curpkg)/opt/trinity/share/doc/$(cdbs_curpkg)
	dh_icons