-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
58 lines (51 loc) · 3.25 KB
/
Makefile
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
CFLAGS=-O2 -g0 -Wall -Wextra $$(pkg-config --cflags libargon2)
LDFLAGS=$$(pkg-config --libs libargon2)
CC=gcc
all:
sectpmctl-hash: src/usr/libexec/sectpmctl/sectpmctl-hash.c
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
compile: sectpmctl-hash
install:
install -d $(DESTDIR)/usr/sbin
install -m 0755 src/usr/sbin/sectpmctl $(DESTDIR)/usr/sbin
install -d $(DESTDIR)/usr/share/bash-completion/completions
install -m 0755 src/usr/share/bash-completion/completions/_sectpmctl $(DESTDIR)/usr/share/bash-completion/completions
install -d $(DESTDIR)/usr/share/sectpmctl/examples
install -m 0644 src/usr/share/sectpmctl/examples/kernel_extra_options.example $(DESTDIR)/usr/share/sectpmctl/examples/kernel_extra_options.example
install -d $(DESTDIR)/usr/lib/sectpmctl
install -m 0755 src/usr/lib/sectpmctl/boot.conf $(DESTDIR)/usr/lib/sectpmctl
install -d $(DESTDIR)/usr/lib/sectpmctl/keys
install -m 0644 src/usr/lib/sectpmctl/keys/canonical-master-public.pem $(DESTDIR)/usr/lib/sectpmctl/keys
install -m 0644 src/usr/lib/sectpmctl/keys/debian-prod-2022-linux.pem $(DESTDIR)/usr/lib/sectpmctl/keys
install -m 0644 src/usr/lib/sectpmctl/keys/dbxupdate_x64.bin $(DESTDIR)/usr/lib/sectpmctl/keys
install -m 0644 src/usr/lib/sectpmctl/keys/MicCorUEFCA2011_2011-06-27.crt $(DESTDIR)/usr/lib/sectpmctl/keys
install -m 0644 src/usr/lib/sectpmctl/keys/MicWinProPCA2011_2011-10-19.crt $(DESTDIR)/usr/lib/sectpmctl/keys
install -d $(DESTDIR)/usr/lib/sectpmctl/scripts
install -m 0755 src/usr/lib/sectpmctl/scripts/dkms_sign_helper.sh $(DESTDIR)/usr/lib/sectpmctl/scripts
install -m 0755 src/usr/lib/sectpmctl/scripts/kmodsign_obj.sh $(DESTDIR)/usr/lib/sectpmctl/scripts
install -m 0755 src/usr/lib/sectpmctl/scripts/sbsign_obj.sh $(DESTDIR)/usr/lib/sectpmctl/scripts
install -m 0755 src/usr/lib/sectpmctl/scripts/sectpmctl-boot $(DESTDIR)/usr/lib/sectpmctl/scripts
install -m 0755 src/usr/lib/sectpmctl/scripts/sectpmctl-key $(DESTDIR)/usr/lib/sectpmctl/scripts
install -m 0755 src/usr/lib/sectpmctl/scripts/sectpmctl-tpm $(DESTDIR)/usr/lib/sectpmctl/scripts
install -d $(DESTDIR)/usr/share/sectpmctl
install -m 0644 LICENSE $(DESTDIR)/usr/share/sectpmctl/LICENSE
install -m 0644 README.md $(DESTDIR)/usr/share/sectpmctl/README.md
install -d $(DESTDIR)/etc/sectpmctl
install -d $(DESTDIR)/etc/kernel/postinst.d
install -m 0755 src/etc/kernel/postinst.d/zz-update-sectpmctl-boot $(DESTDIR)/etc/kernel/postinst.d
install -d $(DESTDIR)/etc/kernel/postrm.d
ln -s ../postinst.d/zz-update-sectpmctl-boot $(DESTDIR)/etc/kernel/postrm.d/zz-update-sectpmctl-boot
install -d $(DESTDIR)/etc/initramfs/post-update.d
ln -s ../../kernel/postinst.d/zz-update-sectpmctl-boot $(DESTDIR)/etc/initramfs/post-update.d/zz-update-sectpmctl-boot
install -d $(DESTDIR)/usr/libexec/sectpmctl
install -m 0755 sectpmctl-hash $(DESTDIR)/usr/libexec/sectpmctl/sectpmctl-hash
package_build: package_clean generate_changelog compile
debuild -i -uc -us -b
generate_changelog:
wget -qO - https://raw.githubusercontent.com/telekom-mms/deb-builder-base/main/git-dch.sh | /usr/bin/bash -s -- $(DIST) $(TAG)
package_clean:
-rm sectpmctl-hash
-rm -Rf debian/.debhelper
-rm -Rf debian/$(firstword $(subst _, ,$(lastword $(subst /, ,$(shell pwd)))))*
-rm debian/debhelper-build-stamp debian/files
-rm ../$(lastword $(subst /, ,$(shell pwd)))?*