File: rules

package info (click to toggle)
rust-ntpd 1.6.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,900 kB
  • sloc: sh: 57; makefile: 34
file content (50 lines) | stat: -rwxr-xr-x 1,430 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

%:
	dh $@ --buildsystem cargo

override_dh_installman:
	help2man \
		--name "ntp-ctl" \
		--no-info \
		--version-string $(DEB_VERSION_UPSTREAM) \
		debian/ntpd-rs/usr/bin/ntp-ctl > debian/ntp-ctl.1

	help2man \
		--name "ntp-daemon" \
		--no-info \
		--version-string $(DEB_VERSION_UPSTREAM) \
		debian/ntpd-rs/usr/bin/ntp-daemon > debian/ntp-daemon.1

	help2man \
		--name "ntp-metrics-exporter" \
		--no-info \
		--version-string $(DEB_VERSION_UPSTREAM) \
		debian/ntpd-rs-metrics/usr/bin/ntp-metrics-exporter > debian/ntp-metrics-exporter.1

	dh_installman -O--buildsystem=cargo

override_dh_auto_install-arch:
	dh_auto_install -plibrust-ntpd-dev
	# -f for dh-cargo < 0.33 compat
	dh_auto_install -pntpd-rs -- --bin ntp-ctl --bin ntp-daemon -f
	# -f for dh-cargo < 0.33 compat
	dh_auto_install -pntpd-rs-metrics -- --bin ntp-metrics-exporter -f

override_dh_install:
	mkdir -p debian/ntpd-rs/etc/ntpd-rs/
	cp docs/examples/conf/ntp.toml.default debian/ntpd-rs/etc/ntpd-rs/ntp.toml

	# dh-cargo < 0.33 compat in case it got installed into the wrong dir
	mkdir -p debian/ntpd-rs/usr/bin || true
	mv debian/ntpd-rs-metrics/usr/bin/ntp-ctl debian/ntpd-rs/usr/bin || true
	mv debian/ntpd-rs-metrics/usr/bin/ntp-daemon debian/ntpd-rs/usr/bin || true

	dh_install


override_dh_dwz:
	# Don't do anything. fails because of the
	# https://github.com/rust-lang/rust/issues/66118