File: rules

package info (click to toggle)
greetd 0.10.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 464 kB
  • sloc: sh: 68; makefile: 50
file content (49 lines) | stat: -rwxr-xr-x 1,523 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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/rustc/architecture.mk


%:
	dh $@ --buildsystem=cargo

# generate cargo-checksum file
_mkchecksum = printf '{"package":"%s","files":{}}\n' \
 $$(sha256sum $(or $2,$(dir $1)Cargo.toml) | grep -Po '^\S+') > $1;

execute_before_dh_auto_configure:
	$(call _mkchecksum,debian/cargo-checksum.json,Cargo.toml)

override_dh_auto_build:
	# actually does the build
	DEB_BUILD_OPTIONS= dh_auto_test -- --release
	make -C man all

# we ship the build result, skipping dh-cargo's test build
override_dh_auto_test:

override_dh_auto_install:
	dh_install target/$(DEB_HOST_RUST_TYPE)/release/greetd /usr/sbin/
	dh_install target/$(DEB_HOST_RUST_TYPE)/release/agreety /usr/sbin/

override_dh_installpam:
	dh_installpam --name=greetd
	dh_installpam --name=greetd-greeter

override_dh_installsystemd:
	dh_installsystemd --no-stop-on-upgrade --no-start

execute_after_dh_fixperms:
	chmod a-x debian/greetd/usr/lib/systemd/system/greetd.service

# similarly to https://bugzilla.redhat.com/show_bug.cgi?id=1564880
# and other cases (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016563)
# I got:
#   dwz: debian/greetd/usr/sbin/agreety: Couldn't find DIE at [2c8a] referenced by DW_AT_abstract_origin from DIE at [1ba4d]
#   dwz: debian/greetd/usr/sbin/greetd: Couldn't find DIE at [1036] referenced by DW_AT_abstract_origin from DIE at [e12b]
# Therefore I decide to skip it.
override_dh_dwz:

execute_after_dh_auto_clean:
	make -C man clean
	rm -f debian/cargo-checksum.json