File: rules

package info (click to toggle)
packagekit 1.1.12-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 15,992 kB
  • sloc: ansic: 55,865; cpp: 10,570; python: 7,642; xml: 6,388; sh: 4,610; perl: 1,738; makefile: 1,514; ruby: 1,341
file content (96 lines) | stat: -rwxr-xr-x 3,171 bytes parent folder | download
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/make -f
#export DH_VERBOSE=1

DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# Use this variable to set the PackageKit configure flags
PK_CONFIGURE_FLAGS = --libexecdir=/usr/lib/packagekit \
		--disable-static \
		--disable-local \
		--disable-silent-rules \
		--disable-cron \
		--enable-introspection \
		--enable-aptcc \
		--enable-gtk-module \
		--enable-gstreamer-plugin \
		--enable-gtk-doc

ifneq ($(DEB_HOST_ARCH_OS), linux)
	PK_CONFIGURE_FLAGS += --disable-systemd
endif

LDFLAGS += -Wl,--as-needed

# Define install target dir
INSTALLDIR = $(CURDIR)/debian/tmp

%:
	dh $@ --with gir

extrainstallfiles-stamp:
	grep -E -v 'lib/systemd|pk-offline-update|pk-trigger-offline-update|pk-clear-offline-update' debian/packagekit.install > debian/packagekit.install.kfreebsd
	grep -E -v 'lib/systemd|pk-offline-update|pk-trigger-offline-update|pk-clear-offline-update' debian/packagekit.install > debian/packagekit.install.hurd
	touch $@

override_dh_auto_configure:
	cp -dpr $(CURDIR)/docs/api $(CURDIR)/docs/api.orig
	dh_auto_configure -- $(PK_CONFIGURE_FLAGS)

# The testsuite needs some manual intervention and a special
# set-up, so we don't run it during build.
override_dh_auto_test:

override_dh_auto_install:
	dh_auto_install --destdir=$(INSTALLDIR)

	# We want the introduction pages
	cp $(CURDIR)/docs/api.orig/html/introduction* $(INSTALLDIR)/usr/share/gtk-doc/html/PackageKit/

	# These files do not need to be installed
	rm -f $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/packagekit-backend/*.la
	rm -f $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/gtk-?.0/modules/*.la
	rm -f $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/*.la
	rm -f $(INSTALLDIR)/usr/share/PackageKit/pk-upgrade-distro.sh
	rm -f $(INSTALLDIR)/usr/bin/packagekit-bugreport.sh
	rm -f $(INSTALLDIR)/var/lib/PackageKit/transactions.db
	rm -rf $(INSTALLDIR)/usr/lib/*/gtk-2.0/

	rm $(INSTALLDIR)/etc/PackageKit/Vendor.conf
ifeq ($(shell dpkg-vendor --query vendor),Ubuntu)
	cp $(CURDIR)/debian/vendor/Vendor.ubuntu.conf $(INSTALLDIR)/etc/PackageKit/Vendor.conf
else
	cp $(CURDIR)/debian/vendor/Vendor.debian.conf $(INSTALLDIR)/etc/PackageKit/Vendor.conf
endif

override_dh_install: extrainstallfiles-stamp
	dh_install

override_dh_missing:
	dh_missing --fail-missing

override_dh_makeshlibs:
	dh_makeshlibs -Xlibpk-gtk-module -Xlibpk_
	dh_girepository

override_dh_auto_clean:
	dh_auto_clean
	# Remove the autogenerated .install files for non-linux architectures
	rm -f debian/packagekit.install.kfreebsd
	rm -f debian/packagekit.install.hurd
	# Restore documentation
	if test -d $(CURDIR)/docs/api.orig; then \
		rm -rf $(CURDIR)/docs/api; \
		mv $(CURDIR)/docs/api.orig $(CURDIR)/docs/api; \
	fi

override_dh_gencontrol:
	dh_gencontrol -- $(SUBSTVARS)

override_dh_strip:
	dh_strip --dbgsym-migration='packagekit-dbg (<< 1.1.1-1~)'

override_dh_installsystemd:
	# the offline-updates service is enabled by tools like GNOME-Software when they need it,
	# but we do want to clear leftover symlinks upon removal of the package.
	dh_installsystemd --no-enable --no-start --no-restart-after-upgrade