summaryrefslogtreecommitdiff
path: root/security/pam-mysql/Makefile
blob: 918fe119a8f6af9f17941cd308838791720ace1a (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
# $NetBSD: Makefile,v 1.3 2006/01/08 18:35:11 xtraeme Exp $

DISTNAME=	pam_mysql-0.5
PKGNAME=	${DISTNAME:S/_/-/}
PKGREVISION=	1
CATEGORIES=	security
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=pam-mysql/}

MAINTAINER=	tech-pkg@NetBSD.org
HOMEPAGE=	http://pam-mysql.sourceforge.net/
COMMENT=	PAM module for authenticating with MySQL

WRKSRC=		${WRKDIR}/pam_mysql
DOCDIR=		${PREFIX}/share/doc/pam-mysql

INSTALLATION_DIRS=	lib

do-build:
	${CC} -fpic -DPIC -Wall -I${LOCALBASE}/include \
		-c ${WRKSRC}/pam_mysql.c -o ${WRKSRC}/pam_mysql.o
	${LD} -x --shared -o ${WRKSRC}/pam_mysql.so ${WRKSRC}/pam_mysql.o \
		-lpam -lcrypt -L${LOCALBASE}/lib/mysql \
		${COMPILER_RPATH_FLAG}${LOCALBASE}/lib/mysql -lmysqlclient \
		-L${LOCALBASE}/lib ${COMPILER_RPATH_FLAG}${LOCALBASE}/lib

do-install:
	${INSTALL_LIB} ${WRKSRC}/pam_mysql.so ${PREFIX}/lib
	${INSTALL_DATA_DIR} ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/Changelog ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/CREDITS ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/Readme ${DOCDIR}

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