blob: 39f0082d8383bfed838f5cb4427a0fa0961b3dfe (
plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
# Reset this to 'cpp' so it gets traditional syntax; cc -E will not work
# properly.
CPP=cpp
# The pam.d file to create
PAMD=login passwd su system-auth system-login system-local-login system-remote-login system-services other
# command for git (the DVCS); set this to "true" to ignore GIT support
# (i.e.: in the ebuild)
GIT=git
PAMFLAGS = -include linux-pam-conf -include basic-conf -DLINUX_PAM_VERSION=$(LINUX_PAM_VERSION)
ifeq "$(CRACKLIB)" "yes"
PAMFLAGS += -DHAVE_CRACKLIB=1
endif
ifeq "$(PASSWDQC)" "yes"
PAMFLAGS += -DHAVE_PASSWDQC=1
endif
ifeq "$(CONSOLEKIT)" "yes"
PAMFLAGS += -DHAVE_CONSOLEKIT=1
endif
ifeq "$(SYSTEMD)" "yes"
PAMFLAGS += -DHAVE_SYSTEMD=1
endif
ifeq "$(ELOGIND)" "yes"
PAMFLAGS += -DHAVE_ELOGIND=1
endif
ifeq "$(GNOME_KEYRING)" "yes"
PAMFLAGS += -DHAVE_GNOME_KEYRING=1
endif
ifeq "$(SECURETTY)" "yes"
PAMFLAGS += -DHAVE_SECURETTY=1
endif
ifeq "$(SELINUX)" "yes"
PAMFLAGS += -DHAVE_SELINUX=1
endif
ifeq "$(MKTEMP)" "yes"
PAMFLAGS += -DHAVE_MKTEMP=1
endif
ifeq "$(PAM_SSH)" "yes"
PAMFLAGS += -DHAVE_PAM_SSH=1
endif
ifeq "$(KRB5)" "yes"
PAMFLAGS += -DHAVE_KRB5=1
endif
ifeq "$(NULLOK)" "yes"
PAMFLAGS += -DWANT_NULLOK=1
endif
ifeq "$(SHA512)" "yes"
PAMFLAGS += -DWANT_SHA512=1
endif
ifeq "$(DEBUG)" "yes"
PAMFLAGS += -DDEBUG=debug
endif
ifeq "$(MINIMAL)" "yes"
PAMFLAGS += -DMINIMAL
endif
ifeq "$(LIBCAP)" "yes"
PAMFLAGS += -DHAVE_LIBCAP=1
endif
all: $(PAMD)
install: $(PAMD)
install -d "$(DESTDIR)/etc/pam.d"
install -m0644 $(PAMD) "$(DESTDIR)/etc/pam.d"
PACKAGE=pambase
ifeq "$(VERSION)" ""
VERSION = $(shell date +"%Y%m%d")
endif
dist: $(PACKAGE)-$(VERSION).tar.xz
$(PACKAGE)-$(VERSION).tar.xz: $(shell $(GIT) ls-files)
$(GIT) tag $(PACKAGE)-$(VERSION)
$(GIT) archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ HEAD | xz > $@
$(PAMD): %: %.in
$(CPP) -traditional-cpp -P $(PAMFLAGS) $< -o $@
sed -i -e '/^$$/d' -e '/^\/\//d' $@
clean:
rm -f $(PAMD) *~
|