File: rules

package info (click to toggle)
hexchat 2.16.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,572 kB
  • sloc: ansic: 60,287; xml: 3,988; perl: 1,144; python: 879; cs: 589; cpp: 307; sh: 154; makefile: 41
file content (44 lines) | stat: -rwxr-xr-x 1,134 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

export DH_VERBOSE=1
git_checkout = $(shell if [ -d .git ]; then echo true ; else echo false ; fi)


%:
	dh $@

patch:
	$(info patching in the default server…)
ifeq ($(shell dpkg-vendor --derives-from ubuntu && echo 1),1)
	patch -p1 < debian/default_servers/ubuntu
else
	patch -p1 < debian/default_servers/debian
endif
	touch $@

clean:
ifneq ($(wildcard patch),)
	$(info unpatching the default server…)
ifeq ($(shell dpkg-vendor --derives-from ubuntu && echo 1),1)
	patch -p1 -R < debian/default_servers/ubuntu
else
	patch -p1 -R < debian/default_servers/debian
endif
	rm -f patch
endif
	dh clean

override_dh_auto_configure: patch
	dh_auto_configure -- -Dinstall-plugin-metainfo=true -Dwith-lua=lua53

override_dh_installchangelogs:
	dh_installchangelogs debian/changelog.txt


udoc:
ifeq ($(git_checkout),true)
	wget https://github.com/hexchat/documentation/raw/master/changelog.rst -O debian/changelog.txt
	wget https://github.com/hexchat/documentation/raw/master/plugins.rst -O debian/plugins.txt
else
	$(error you are running this outside of a git checkout; this is not what the maintainer expects)
endif