summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 7b13e6c5e73fca61abde5d5b1c1270ecc921f197 (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
39
40
41
42
43
44
45
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,-O1 -Wl,--as-needed

# needed with the Ubuntu toolchain to avoid plugin issues
export DEB_LDFLAGS_MAINT_STRIP := -Wl,-Bsymbolic-functions

%:
	dh $@ --with gir,gnome,python3

override_dh_auto_configure:
	dh_auto_configure -- -Dgtk_doc=true

override_dh_python3:
	dh_python3
	dh_python3 /usr/lib/$(DEB_HOST_MULTIARCH)/gedit/plugins
	dh_python3 /usr/share/gedit/plugins

override_dh_girepository:
	dh_girepository	-ldebian/tmp/usr/share/gedit/gir-1.0 \
		/usr/lib/$(DEB_HOST_MULTIARCH)/gedit/girepository-1.0 \
		/usr/lib/$(DEB_HOST_MULTIARCH)/gedit

override_dh_install:
	# remove cruft
	find debian/tmp -name '*.la' -print -delete
	rm -rf debian/tmp/usr/lib/*/gedit/plugins/*/__pycache__/
	# remove gnome-text-editor symlink, it's registered in the
	# debian alternatives system instead. See postinst.
	rm -f debian/tmp/usr/bin/gnome-text-editor
	dh_install

override_dh_fixperms-indep:
	dh_fixperms -i
	chmod 0755 debian/gedit-common/usr/share/gedit/plugins/externaltools/tools/*

override_dh_missing:
	dh_missing --fail-missing

override_dh_shlibdeps:
	dh_shlibdeps -l/usr/lib/$(DEB_HOST_MULTIARCH)/gedit

override_dh_makeshlibs:
	dh_makeshlibs --no-scripts