File: rules

package info (click to toggle)
click 0.5.2-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,372 kB
  • sloc: python: 7,135; ansic: 857; makefile: 441; sh: 236; perl: 26; xml: 11
file content (71 lines) | stat: -rwxr-xr-x 2,081 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
#! /usr/bin/make -f

NULL=

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# The advantages of -Wl,-Bsymbolic-functions are of limited value here, and
# they mean that the test suite's LD_PRELOAD tricks don't work properly.
export DEB_LDFLAGS_MAINT_STRIP := -Wl,-Bsymbolic-functions

%:
	dh $@ --with autoreconf,gir,python3,sphinxdoc \
	      --buildsystem autoconf $(EXTRA_DH_OPTIONS)

PY3REQUESTED := $(shell py3versions -r)
PY3DEFAULT := $(shell py3versions -d)
# Run setup.py with the default python3 last so that the scripts use
# #!/usr/bin/python3 and not #!/usr/bin/python3.X.
PY3 := $(filter-out $(PY3DEFAULT),$(PY3REQUESTED)) python3

confflags := \
	--with-python-interpreters='$(PY3)' \
	--with-systemdsystemunitdir=/usr/lib/systemd/system \
	--with-systemduserunitdir=/usr/lib/systemd/user \
	--with-default-root=/var/lib/clickpkg \
	$(NULL)

override_dh_autoreconf:
	dh_autoreconf -- ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- $(confflags)

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C doc subst DEFAULT_ROOT=/var/lib/clickpkg
	$(MAKE) -C doc html man

override_dh_auto_clean:
	dh_auto_clean
	if [ -f doc/Makefile ]; then $(MAKE) -C doc subst-clean; fi
	if [ -f doc/Makefile ]; then $(MAKE) -C doc clean; fi

PYTHON_INSTALL_FLAGS := \
	--force --root=$(CURDIR)/debian/tmp \
	--no-compile -O0 --install-layout=deb

override_dh_auto_install:
	dh_auto_install -- PYTHON_INSTALL_FLAGS='$(PYTHON_INSTALL_FLAGS)'
	rm -f debian/tmp/usr/lib/*/click/*.la
	mkdir -p debian/tmp/usr/share/click/frameworks/
	touch debian/tmp/usr/share/click/frameworks/.placeholder

override_dh_install:
	rm debian/tmp/usr/lib/*/libclick-0.4.la
	dh_install
	DH_AUTOSCRIPTDIR=debhelper debhelper/dh_click --name=click-desktop

override_dh_missing:
	dh_missing --fail-missing

# Sphinx documentation is architecture-independent.
override_dh_sphinxdoc-arch:

override_dh_makeshlibs:
	dh_makeshlibs -- -c4

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..