aboutsummaryrefslogtreecommitdiffstats
path: root/security/pam-mysql/Makefile
blob: fc7152a50dac903bad2a19ccbc969a6f467b618d (plain) (blame)
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
# New ports collection makefile for:    pam_mysql
# Date created:             29 August 2000
# Whom:                     Anders Nordby <anders@fix.no>
#
# $FreeBSD$
#

PORTNAME=   pam_mysql
PORTVERSION=    0.5
PORTREVISION=   1
CATEGORIES= security databases
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME:S/_/-/}

MAINTAINER= anders@FreeBSD.org
COMMENT=    A pam module for authenticating with MySQL

USE_REINPLACE=  yes
USE_MYSQL=  yes
BROKEN_WITH_MYSQL=  41
USE_GMAKE=  yes

WRKSRC=     ${WRKDIR}/${PORTNAME}

.include <bsd.port.pre.mk>

post-patch:
    ${REINPLACE_CMD} -e "s@^#define DEBUG@#undef DEBUG@" ${WRKSRC}/pam_mysql.c

pre-build:
    @cd ${WRKSRC} && ${GMAKE} clean

do-build:
    ${CC} -O -pipe -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 -lmysqlclient

do-install:
    @${INSTALL_DATA} ${WRKSRC}/pam_mysql.so ${PREFIX}/lib
.if !defined(NOPORTDOCS)
    @${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/Changelog ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/CREDITS ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/Readme ${DOCSDIR}
.endif

post-install:
    @${ECHO_MSG} "================================================================================"
    @${ECHO_MSG} "Copy/move/symlink ${PREFIX}/lib/pam_mysql.so to /usr/lib/pam_mysql.so"
    @${ECHO_MSG} "to be able to use it. Read files in ${PREFIX}/share/doc/pam_mysql"
    @${ECHO_MSG} "for info on how to set up."
    @${ECHO_MSG} "================================================================================"

.include <bsd.port.post.mk>