File: rules

package info (click to toggle)
apparmor-profiles-extra 1.35
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 112 kB
  • sloc: sh: 135; makefile: 26
file content (32 lines) | stat: -rwxr-xr-x 920 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
#!/usr/bin/make -f

PROFILES_DIR = $(CURDIR)/profiles
PROFILES = $(shell find $(PROFILES_DIR) -type f -maxdepth 1 | LC_ALL=C sort)
PROFILE_NAMES = $(notdir $(PROFILES))
COMPLAIN_PROFILE_NAMES = usr.bin.irssi

%:
	dh $@

override_dh_clean:
	rm -rf tests
	dh_clean

override_dh_install:
	dh_install
	set -ex && for profile in $(PROFILE_NAMES); do \
	   dh_apparmor --profile-name=$$profile -papparmor-profiles-extra; \
	done
	for profile in $(COMPLAIN_PROFILE_NAMES); do \
	   sh $(CURDIR)/debian/scripts/put-profile-in-complain-mode \
	      $(CURDIR)/debian/apparmor-profiles-extra/etc/apparmor.d/$$profile; \
	done

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p tests/local
	set -ex && for profile in $(PROFILE_NAMES); do \
	   touch tests/local/$$profile; \
	   /sbin/apparmor_parser --add --skip-cache --skip-kernel-load -I profiles -I tests $(PROFILES_DIR)/$$profile; \
	done
endif