Lines 7-12
Link Here
|
7 |
|
7 |
|
8 |
PORTNAME= phpldapadmin098 |
8 |
PORTNAME= phpldapadmin098 |
9 |
PORTVERSION= 0.9.8.4 |
9 |
PORTVERSION= 0.9.8.4 |
|
|
10 |
PORTREVISION= 1 |
10 |
PORTEPOCH= 1 |
11 |
PORTEPOCH= 1 |
11 |
CATEGORIES= net www |
12 |
CATEGORIES= net www |
12 |
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} |
13 |
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} |
Lines 20-57
Link Here
|
20 |
USE_PHP= gettext ldap openssl pcre session |
21 |
USE_PHP= gettext ldap openssl pcre session |
21 |
DEFAULT_PHP_VER= 4 |
22 |
DEFAULT_PHP_VER= 4 |
22 |
|
23 |
|
23 |
.if defined(WITH_SUPHP) |
24 |
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP) |
24 |
|
25 |
|
25 |
PKGNAMESUFFIX+= -suphp |
26 |
PKGNAMESUFFIX+= -suphp |
26 |
RUN_DEPENDS+= ${LOCALBASE}/sbin/suphp:${PORTSDIR}/www/suphp |
27 |
RUN_DEPENDS+= ${LOCALBASE}/sbin/suphp:${PORTSDIR}/www/suphp |
27 |
WANT_PHP_CGI= yes |
28 |
WANT_PHP_CGI= yes |
28 |
|
29 |
|
29 |
PLAUSR?= pldapadm |
|
|
30 |
|
31 |
SUB_LIST+= PLAUSR=${PLAUSR} \ |
32 |
PLAGRP=${PLAGRP} |
33 |
SUB_FILES+= pkg-install pkg-deinstall |
34 |
|
35 |
.else |
30 |
.else |
36 |
|
31 |
|
37 |
WANT_PHP_WEB= yes |
32 |
WANT_PHP_WEB= yes |
38 |
|
33 |
|
39 |
.endif |
34 |
.endif |
40 |
|
35 |
|
41 |
# PLAUSR is only used WITH_SUPHP |
36 |
# PLA_USR is only used WITH_SUPHP |
42 |
PLADIR?= www/${PORTNAME} |
37 |
PLA_GRP?= ${WWWGRP} |
43 |
PLADIRX?= ${PLADIR:S/098//} |
38 |
PLA_GID?= ${_PLA_GID} |
44 |
PLAGRP?= ${WWWGRP} |
|
|
45 |
CFGDIR= config |
39 |
CFGDIR= config |
46 |
CFGFILE= config.php |
40 |
CFGFILE= config.php |
47 |
|
41 |
|
48 |
SUB_LIST+= PKGNAME=${PKGNAME} \ |
42 |
PLIST= ${WRKDIR}/plist |
49 |
PLADIR=${PLADIR} \ |
43 |
PLIST_SUB+= PLA_GRP=${PLA_GRP} |
50 |
PLADIRX=${PLADIRX} |
44 |
|
|
|
45 |
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP) |
46 |
|
47 |
PLA_USR?= _pla |
48 |
PLA_UID?= 636 |
49 |
PLA_GCOS?= "phpLDAPAdmin Owner" |
50 |
PLA_HOME?= /nonexistent |
51 |
PLA_SHELL?= /usr/sbin/nologin |
52 |
|
53 |
SUB_LIST+= PLA_USR=${PLA_USR} \ |
54 |
PLA_UID=${PLA_UID} \ |
55 |
PLA_GRP=${PLA_GRP} \ |
56 |
PLA_GID=${PLA_GID} \ |
57 |
PLA_GCOS=${PLA_GCOS} \ |
58 |
PLA_HOME=${PLA_HOME} \ |
59 |
PLA_SHELL=${PLA_SHELL} |
60 |
SUB_FILES+= pkg-install pkg-deinstall |
61 |
|
62 |
.endif |
63 |
|
64 |
SUB_LIST+= PKGNAME=${PKGNAME} |
51 |
SUB_FILES+= pkg-message |
65 |
SUB_FILES+= pkg-message |
52 |
|
66 |
|
53 |
PLIST= ${WRKDIR}/plist |
67 |
.include <bsd.port.pre.mk> |
54 |
PLIST_SUB+= PLADIR=${PLADIR} PLAGRP=${PLAGRP} |
68 |
_PLA_GID!= /usr/sbin/pw group show -n ${PLA_GRP} | ${CUT} -d : -f 3 |
|
|
69 |
.if empty(_PLA_GID) |
70 |
_PLA_GID= 80 |
71 |
.endif |
55 |
|
72 |
|
56 |
.SILENT: |
73 |
.SILENT: |
57 |
|
74 |
|
Lines 66-81
Link Here
|
66 |
${ECHO_MSG} "However, for best results with PHP5 please use the" |
83 |
${ECHO_MSG} "However, for best results with PHP5 please use the" |
67 |
${ECHO_MSG} "net/phpldapadmin port instead." |
84 |
${ECHO_MSG} "net/phpldapadmin port instead." |
68 |
${ECHO_MSG} "" |
85 |
${ECHO_MSG} "" |
|
|
86 |
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP) |
87 |
@if /usr/sbin/pw show -n pldapadm >/dev/null 2>&1 ; then \ |
88 |
${ECHO_MSG} "===> WARNING ******************************" ; \ |
89 |
${ECHO_MSG} "The default username used by ${PKNAME} has changed"; \ |
90 |
${ECHO_MSG} "to ${PLA_USR} -- you should delete the old user:" ; \ |
91 |
${ECHO_MSG} " # /usr/sbin/pw user del -n pldapadm" ; \ |
92 |
${ECHO_MSG} "" ; \ |
93 |
fi |
94 |
.endif |
69 |
|
95 |
|
70 |
post-patch: |
96 |
post-patch: |
71 |
cd ${WRKSRC} ; \ |
97 |
cd ${WRKSRC} ; \ |
72 |
${FIND} . ! -type d ! -name ${CFGFILE}.example ! -name .cvsignore | \ |
98 |
${FIND} . ! -type d ! -name ${CFGFILE}.example ! -name .cvsignore | \ |
73 |
${SORT} | ${SED} -e "s!^\.!%%PLADIR%%!" >${PLIST} ; \ |
99 |
${SORT} | ${SED} -e "s!^\.!%%WWWDIR%%!" >${PLIST} ; \ |
74 |
${CAT} ${PKGDIR}/pkg-plist-chunk >>${PLIST} ; \ |
100 |
${CAT} ${PKGDIR}/pkg-plist-chunk >>${PLIST} ; \ |
75 |
${FIND} . -type d | ${SORT} -r | ${SED} \ |
101 |
${FIND} . -type d | ${SORT} -r | ${SED} \ |
76 |
-e 's!^\./${CFGDIR}$$!@dirrmtry %%PLADIR%%/${CFGDIR}!' \ |
102 |
-e 's!^\./${CFGDIR}$$!@dirrmtry %%WWWDIR%%/${CFGDIR}!' \ |
77 |
-e 's!^\.$$!@dirrmtry %%PLADIR%%!' \ |
103 |
-e 's!^\.$$!@dirrmtry %%WWWDIR%%!' \ |
78 |
-e 's!^\.!@dirrm %%PLADIR%%!' >>${PLIST} |
104 |
-e 's!^\.!@dirrm %%WWWDIR%%!' >>${PLIST} |
79 |
|
105 |
|
80 |
pre-install: |
106 |
pre-install: |
81 |
.if defined(WITH_SUPHP) |
107 |
.if defined(WITH_SUPHP) |
Lines 87-104
Link Here
|
87 |
install-app: |
113 |
install-app: |
88 |
cd ${WRKSRC} ; \ |
114 |
cd ${WRKSRC} ; \ |
89 |
for src in $$( ${FIND} . ! -name .cvsignore ) ; do \ |
115 |
for src in $$( ${FIND} . ! -name .cvsignore ) ; do \ |
90 |
dst=${PREFIX}/${PLADIR}$${src#.} ; \ |
116 |
dst=${WWWDIR}$${src#.} ; \ |
91 |
if ${TEST} -d $$src ; then \ |
117 |
if ${TEST} -d $$src ; then \ |
92 |
${MKDIR} $$dst ; \ |
118 |
${MKDIR} $$dst ; \ |
93 |
else \ |
119 |
else \ |
94 |
${INSTALL_DATA} $$src $$dst ; \ |
120 |
${INSTALL_DATA} $$src $$dst ; \ |
95 |
fi \ |
121 |
fi \ |
96 |
done |
122 |
done |
97 |
|
123 |
|
98 |
install-conf: |
124 |
install-conf: |
99 |
cd ${PREFIX}/${PLADIR}/${CFGDIR} ; \ |
125 |
cd ${WWWDIR}/${CFGDIR} ; \ |
100 |
${CHMOD} 0640 ${CFGFILE}.example ; \ |
126 |
${CHMOD} 0640 ${CFGFILE}.example ; \ |
101 |
${CHGRP} ${PLAGRP} ${CFGFILE}.example ; \ |
127 |
${CHGRP} ${PLA_GRP} ${CFGFILE}.example ; \ |
102 |
if ${TEST} ! -f ${CFGFILE} ; then \ |
128 |
if ${TEST} ! -f ${CFGFILE} ; then \ |
103 |
${CP} -p ${CFGFILE}.example ${CFGFILE} ; \ |
129 |
${CP} -p ${CFGFILE}.example ${CFGFILE} ; \ |
104 |
fi |
130 |
fi |
Lines 109-112
Link Here
|
109 |
.endif |
135 |
.endif |
110 |
${CAT} ${PKGMESSAGE} |
136 |
${CAT} ${PKGMESSAGE} |
111 |
|
137 |
|
112 |
.include <bsd.port.mk> |
138 |
.include <bsd.port.post.mk> |