summaryrefslogtreecommitdiff
path: root/security/PAM/Makefile
blob: 1ce5cfcbea3444d3f66aad0f29efb62f427f443b (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
# $NetBSD: Makefile,v 1.4 2001/02/17 17:49:38 wiz Exp $
#

DISTNAME=	Linux-${PKGNAME}
PKGNAME=	PAM-0.72
CATEGORIES=	security
MASTER_SITES=	ftp://ftp.kernel.org/pub/linux/libs/pam/pre/library/

MAINTAINER=	rh@netbsd.org
HOMEPAGE=	http://www.kernel.org/pub/linux/libs/pam/
COMMENT=	Pluggable Authentication Modules

BUILD_DEPENDS+=	bison:../../devel/bison
DEPENDS+=	libcrack-*:../../security/libcrack

USE_GMAKE=	YES

MAKE_ENV+=	LOWER_OPSYS="${LOWER_OPSYS}"
MAKE_ENV+=	MACHINE_GNU_ARCH="${MACHINE_GNU_ARCH}"
MAKE_ENV+=	MKDIR="${MKDIR}"
MAKE_ENV+=	ARPRG="${AR}"
MAKE_ENV+=	RANLIB="${RANLIB}"
MAKE_ENV+=	BSD_INSTALL="${INSTALL}"
MAKE_ENV+=	CONFIGED="${PREFIX}/etc"
MAKE_ENV+=	CONFD="${PREFIX}/etc"

do-configure:
	cd ${WRKSRC} && ${TOUCH} .quiet_install &&			\
	for i in `${FIND} . -type f` ; do				\
		if ${GREP} -q '\/etc\/' $$i ; then			\
			${CP} $$i $$i.old &&				\
			${SED} < $$i.old > $$i				\
			    -e 's:/etc/security:${PREFIX}/etc/pam:g' 	\
			    -e 's:/etc/pam:${PREFIX}/etc/pam:g' &&	\
			${RM} $$i.old ;					\
		fi ;							\
		if ${GREP} -q 'bash' $$i ; then				\
			${CP} $$i $$i.old &&				\
			${SED} < $$i.old > $$i				\
			    -e 's:bash:sh:g' &&				\
			${RM} $$i.old ;					\
		fi ;							\
	done

# for OBJECT_FMT
.include "../../mk/bsd.prefs.mk"

post-install:
	for doc in ${WRKSRC}/doc/man/*.3 ; do				\
		${INSTALL_MAN} $$doc ${PREFIX}/man/man3 ;		\
	done
	for doc in ${WRKSRC}/doc/man/*.8 ; do				\
		${INSTALL_MAN} $$doc ${PREFIX}/man/man8 ;		\
	done
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/PAM/modules
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/PAM/sgml
	for doc in ${WRKSRC}/doc/modules/* ; do				\
		${INSTALL_DATA} $$doc ${PREFIX}/share/doc/PAM/modules ; \
	done
	${INSTALL_DATA} ${WRKSRC}/doc/figs/pam_orient.txt 		\
		${PREFIX}/share/doc/PAM
.for doc in draft-morgan-pam.raw rfc86.0.txt
	${INSTALL_DATA} ${WRKSRC}/doc/specs/${doc} ${PREFIX}/share/doc/PAM
.endfor
.for doc in appl modules source
	${INSTALL_DATA} ${WRKSRC}/doc/pam_${doc}.sgml			\
		${PREFIX}/share/doc/PAM/sgml
.endfor
.if (${OBJECT_FMT} == "ELF")
	${LN} -fs ${PREFIX}/lib/libpam.so.0.72 ${PREFIX}/lib/libpam.so.0
	${LN} -fs ${PREFIX}/lib/libpam_misc.so.0.72 ${PREFIX}/lib/libpam_misc.so.0
	${LN} -fs ${PREFIX}/lib/libpamc.so.0.72 ${PREFIX}/lib/libpamc.so.0
.endif

.include "../../mk/bsd.pkg.mk"