Lines 19-24
Link Here
|
19 |
USE_PHP= gettext ldap openssl pcre session |
19 |
USE_PHP= gettext ldap openssl pcre session |
20 |
DEFAULT_PHP_VER= 4 |
20 |
DEFAULT_PHP_VER= 4 |
21 |
|
21 |
|
|
|
22 |
OPTIONS= SUPHP "suPHP support" off |
23 |
|
24 |
.include <bsd.port.options.mk> |
25 |
|
22 |
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP) |
26 |
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP) |
23 |
|
27 |
|
24 |
PKGNAMESUFFIX+= -suphp |
28 |
PKGNAMESUFFIX+= -suphp |
Lines 31-60
Link Here
|
31 |
|
35 |
|
32 |
.endif |
36 |
.endif |
33 |
|
37 |
|
34 |
# PLA_USR is only used WITH_SUPHP |
38 |
# USERS is only used WITH_SUPHP |
35 |
PLA_GRP?= ${WWWGRP} |
39 |
GROUPS?= ${WWWGRP} |
36 |
PLA_GID?= ${_PLA_GID} |
|
|
37 |
CFGDIR= config |
40 |
CFGDIR= config |
38 |
CFGFILE= config.php |
41 |
CFGFILE= config.php |
39 |
|
42 |
|
40 |
PLIST= ${WRKDIR}/plist |
43 |
PLIST= ${WRKDIR}/plist |
41 |
PLIST_SUB+= PLA_GRP=${PLA_GRP} |
44 |
PLIST_SUB+= PLA_GRP=${GROUPS} |
42 |
|
45 |
|
43 |
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP) |
46 |
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP) |
44 |
|
47 |
|
45 |
PLA_USR?= _pla |
48 |
USERS?= _pla |
46 |
PLA_UID?= 636 |
49 |
|
47 |
PLA_GCOS?= "phpLDAPAdmin Owner" |
50 |
SUB_LIST+= PLA_USR=${USERS} \ |
48 |
PLA_HOME?= /nonexistent |
51 |
PLA_GRP=${GROUPS} |
49 |
PLA_SHELL?= /usr/sbin/nologin |
|
|
50 |
|
51 |
SUB_LIST+= PLA_USR=${PLA_USR} \ |
52 |
PLA_UID=${PLA_UID} \ |
53 |
PLA_GRP=${PLA_GRP} \ |
54 |
PLA_GID=${PLA_GID} \ |
55 |
PLA_GCOS=${PLA_GCOS} \ |
56 |
PLA_HOME=${PLA_HOME} \ |
57 |
PLA_SHELL=${PLA_SHELL} |
58 |
SUB_FILES+= pkg-install pkg-deinstall |
52 |
SUB_FILES+= pkg-install pkg-deinstall |
59 |
|
53 |
|
60 |
.endif |
54 |
.endif |
Lines 62-129
Link Here
|
62 |
SUB_LIST+= PKGNAME=${PKGNAME} |
56 |
SUB_LIST+= PKGNAME=${PKGNAME} |
63 |
SUB_FILES+= pkg-message |
57 |
SUB_FILES+= pkg-message |
64 |
|
58 |
|
65 |
.include <bsd.port.pre.mk> |
|
|
66 |
_PLA_GID!= ${PW} group show -n ${PLA_GRP} | ${CUT} -d : -f 3 |
67 |
.if empty(_PLA_GID) |
68 |
_PLA_GID= 80 |
69 |
.endif |
70 |
|
71 |
.SILENT: |
59 |
.SILENT: |
72 |
|
60 |
|
73 |
pre-everything:: |
61 |
pre-everything:: |
74 |
${ECHO_MSG} "" |
62 |
${ECHO_MSG} "" |
75 |
${ECHO_MSG} "You may use the following build options:" |
|
|
76 |
${ECHO_MSG} "" |
77 |
${ECHO_MSG} " WITH_SUPHP=yes Install appropriately for use with" |
78 |
${ECHO_MSG} " the www/suphp port [default: no]" |
79 |
${ECHO_MSG} "" |
80 |
${ECHO_MSG} "This port will operate with either PHP4 or PHP5." |
63 |
${ECHO_MSG} "This port will operate with either PHP4 or PHP5." |
81 |
${ECHO_MSG} "However, for best results with PHP5 please use the" |
64 |
${ECHO_MSG} "However, for best results with PHP5 please use the" |
82 |
${ECHO_MSG} "net/phpldapadmin port instead." |
65 |
${ECHO_MSG} "net/phpldapadmin port instead." |
83 |
${ECHO_MSG} "" |
66 |
${ECHO_MSG} "" |
84 |
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP) |
|
|
85 |
@if ${PW} show -n pldapadm >/dev/null 2>&1 ; then \ |
86 |
${ECHO_MSG} "===> WARNING ******************************" ; \ |
87 |
${ECHO_MSG} "The default username used by ${PKNAME} has changed"; \ |
88 |
${ECHO_MSG} "to ${PLA_USR} -- you should delete the old user:" ; \ |
89 |
${ECHO_MSG} " # ${PW} user del -n pldapadm" ; \ |
90 |
${ECHO_MSG} "" ; \ |
91 |
fi |
92 |
.endif |
93 |
|
67 |
|
94 |
post-patch: |
68 |
post-patch: |
95 |
cd ${WRKSRC} ; \ |
69 |
cd ${WRKSRC} ; \ |
96 |
${FIND} . ! -type d ! -name ${CFGFILE}.example ! -name .cvsignore | \ |
70 |
${FIND} . ! -type d ! -name ${CFGFILE}.example ! -name .cvsignore \ |
97 |
${SORT} | ${SED} -e "s!^\.!%%WWWDIR%%!" >${PLIST} ; \ |
71 |
! -name .gitignore | ${SORT} | ${SED} -e "s!^\.!%%WWWDIR%%!" \ |
|
|
72 |
>${PLIST} ; \ |
98 |
${CAT} ${PKGDIR}/pkg-plist-chunk >>${PLIST} ; \ |
73 |
${CAT} ${PKGDIR}/pkg-plist-chunk >>${PLIST} ; \ |
99 |
${FIND} . -type d | ${SORT} -r | ${SED} \ |
74 |
${FIND} . -type d | ${SORT} -r | ${SED} \ |
100 |
-e 's!^\./${CFGDIR}$$!@dirrmtry %%WWWDIR%%/${CFGDIR}!' \ |
75 |
-e 's!^\./${CFGDIR}$$!@dirrmtry %%WWWDIR%%/${CFGDIR}!' \ |
101 |
-e 's!^\.$$!@dirrmtry %%WWWDIR%%!' \ |
76 |
-e 's!^\.$$!@dirrmtry %%WWWDIR%%!' \ |
102 |
-e 's!^\.!@dirrm %%WWWDIR%%!' >>${PLIST} |
77 |
-e 's!^\.!@dirrm %%WWWDIR%%!' >>${PLIST} |
103 |
|
78 |
|
104 |
pre-install: |
|
|
105 |
.if defined(WITH_SUPHP) |
106 |
${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL |
107 |
.endif |
108 |
|
109 |
do-install: install-app install-conf |
79 |
do-install: install-app install-conf |
110 |
|
80 |
|
111 |
install-app: |
81 |
install-app: |
112 |
cd ${WRKSRC} ; \ |
82 |
cd ${WRKSRC} ; \ |
113 |
for src in $$( ${FIND} . ! -name .cvsignore ) ; do \ |
83 |
for src in $$( ${FIND} . ! -name .cvsignore \ |
114 |
dst=${WWWDIR}$${src#.} ; \ |
84 |
! -name .gitignore ) ; do \ |
115 |
if ${TEST} -d $$src ; then \ |
85 |
dst=${WWWDIR}$${src#.} ; \ |
116 |
${MKDIR} $$dst ; \ |
86 |
if ${TEST} -d $$src ; then \ |
117 |
else \ |
87 |
${MKDIR} $$dst ; \ |
118 |
${INSTALL_DATA} $$src $$dst ; \ |
88 |
else \ |
119 |
fi \ |
89 |
${INSTALL_DATA} $$src $$dst ; \ |
|
|
90 |
fi \ |
120 |
done |
91 |
done |
121 |
|
92 |
|
122 |
install-conf: |
93 |
install-conf: |
123 |
cd ${WWWDIR}/${CFGDIR} ; \ |
94 |
cd ${WWWDIR}/${CFGDIR} ; \ |
124 |
${CHMOD} 0640 ${CFGFILE}.example ; \ |
95 |
${CHMOD} 0640 ${CFGFILE}.example ; \ |
125 |
${CHGRP} ${PLA_GRP} ${CFGFILE}.example ; \ |
96 |
${CHGRP} ${GROUPS} ${CFGFILE}.example ; \ |
126 |
if ${TEST} ! -f ${CFGFILE} ; then \ |
97 |
if ${TEST} ! -f ${CFGFILE} ; then \ |
127 |
${CP} -p ${CFGFILE}.example ${CFGFILE} ; \ |
98 |
${CP} -p ${CFGFILE}.example ${CFGFILE} ; \ |
128 |
fi |
99 |
fi |
129 |
|
100 |
|
Lines 133-136
Link Here
|
133 |
.endif |
104 |
.endif |
134 |
${CAT} ${PKGMESSAGE} |
105 |
${CAT} ${PKGMESSAGE} |
135 |
|
106 |
|
136 |
.include <bsd.port.post.mk> |
107 |
.include <bsd.port.mk> |