summaryrefslogtreecommitdiff
path: root/security/pam-pwauth_suid/Makefile
blob: ff85ec78217ceb574bc0bbcef7d9dcbc07599c1b (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
# $NetBSD: Makefile,v 1.7 2012/10/23 18:16:48 asau Exp $

DISTNAME=	pam-pwauth_suid-1.2
CATEGORIES=	security
DISTFILES=	# empty

MAINTAINER=	drochner@NetBSD.org
COMMENT=	PAM authentication module for unprivileged users

WRKSRC=		${WRKDIR}

PAMDEF+= -DPATH_HELPER=\"${PREFIX}/libexec/pwauth_suid_helper\"
PAMDEF+= -DNO_STATIC_MODULES

INSTALLATION_DIRS=	lib/security libexec share/examples/pam-pwauth_suid

do-extract:
	${CP} ${FILESDIR}/pam_pwauth_suid.c ${FILESDIR}/pwauth_suid_helper.c \
		${WRKSRC}

do-build:
	(cd ${WRKSRC} && \
	 ${CC} ${CFLAGS} -c -fPIC ${PAMDEF} pam_pwauth_suid.c && \
	 ${LD} -shared pam_pwauth_suid.o -o pam_pwauth_suid.so && \
	 ${CC} ${CFLAGS} pwauth_suid_helper.c -o pwauth_suid_helper -lcrypt)

do-install:
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/security
	${INSTALL_DATA} ${WRKSRC}/pam_pwauth_suid.so \
		${DESTDIR}${PREFIX}/lib/security
	${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/libexec
	${INSTALL_PROGRAM} ${WRKSRC}/pwauth_suid_helper \
		${DESTDIR}${PREFIX}/libexec
	${CHMOD} 04555 ${DESTDIR}${PREFIX}/libexec/pwauth_suid_helper
	sed -e 's|@PREFIX@|${PREFIX}|g' ${FILESDIR}/xscreensaver > \
		${DESTDIR}${PREFIX}/share/examples/pam-pwauth_suid/xscreensaver

.include "../../mk/pam.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"