[Bug 191673] New: [ staging ] www/squid32
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jul 6 21:28:56 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191673
Bug ID: 191673
Summary: [ staging ] www/squid32
Product: Ports Tree
Version: Latest
Hardware: Any
OS: Any
Status: Needs Triage
Severity: Affects Many People
Priority: Normal
Component: Individual Port(s)
Assignee: freebsd-ports-bugs at FreeBSD.org
Reporter: dan at obluda.cz
www/squid32 require staging or will be removed
Fix:
Patch is attached.
Note 1: the plist is generated dynamically, all handling is done in Makefile
Note 2: the upstreams install phase will create *.conf.default configuration
files as well as *.conf files. The second one is removed during
post-install and replaced by conditional "@exec if [ ! -f" copy logic
--- www/squid32/Makefile.orig 2014-07-06 16:28:30.000000000 +0200
+++ www/squid32/Makefile 2014-07-06 23:13:14.000000000 +0200
@@ -52,8 +52,8 @@
USERS= squid
GROUPS= squid
-MAN1= squidclient.1
-MAN8= cachemgr.cgi.8 squid.8
+PLIST_FILES+= man/man1/squidclient.1.gz
+PLIST_FILES+= man/man8/cachemgr.cgi.8.gz man/man8/squid.8.gz
docs= QUICKSTART README RELEASENOTES.html doc/debug-sections.txt
PORTDOCS= ${docs:T}
PORTEXAMPLES= *
@@ -103,13 +103,13 @@
ECAP_USES= pkgconfig:build
-etc_files= squid/cachemgr.conf.default \
- squid/errorpage.css.default \
- squid/mib.txt \
- squid/mime.conf.default \
- squid/msntauth.conf.default \
- squid/squid.conf.default \
- squid/squid.conf.documented
+etc_files= cachemgr.conf.default \
+ errorpage.css.default \
+ mib.txt \
+ mime.conf.default \
+ msntauth.conf.default \
+ squid.conf.default \
+ squid.conf.documented
icon_silk_files= application.png arrow_up.png bomb.png box.png \
bricks.png bullet_red.png cd.png chart_line.png \
@@ -203,7 +203,6 @@
--disable-linux-tproxy \
--disable-translation
-NO_STAGE= yes
.include <bsd.port.pre.mk>
.if ${CC:T:Mclang} == "clang" || ${CXX:T:Mclang++} == "clang++" ||
${OSVERSION} >= 1000024
@@ -231,15 +230,15 @@
ext_unix_group_acl \
ntlm_fake_auth \
ntlm_smb_lm_auth
-MAN8+= basic_getpwnam_auth.8 basic_ncsa_auth.8 basic_pam_auth.8 \
- basic_radius_auth.8 basic_db_auth.8 \
- digest_file_auth.8 \
- ext_file_userip_acl.8 ext_unix_group_acl.8
+PLIST_FILES+= man/man8/basic_getpwnam_auth.8.gz
man/man8/basic_ncsa_auth.8.gz man/man8/basic_pam_auth.8.gz \
+ man/man8/basic_radius_auth.8.gz man/man8/basic_db_auth.8.gz \
+ man/man8/digest_file_auth.8.gz \
+ man/man8/ext_file_userip_acl.8.gz man/man8/ext_unix_group_acl.8.gz
.if ${PORT_OPTIONS:MAUTH_LDAP}
USE_OPENLDAP= yes
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-MAN8+= basic_ldap_auth.8 ext_ldap_group_acl.8
+PLIST_FILES+= man/man8/basic_ldap_auth.8/gz
man/man8/ext_ldap_group_acl.8/gz
basic_auth+= LDAP
external_acl+= LDAP_group
libexec+= basic_ldap_auth ext_ldap_group_acl
@@ -249,7 +248,7 @@
CFLAGS+= -I${LOCALBASE}/include
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-MAN8+= basic_sasl_auth.8
+PLIST_FILES+= man/man8/basic_sasl_auth.8/gz
basic_auth+= SASL
libexec+= basic_sasl_auth
.endif
@@ -260,7 +259,7 @@
external_acl+= wbinfo_group
libexec+= basic_smb_auth basic_smb_auth.sh \
ext_wbinfo_group_acl
-MAN8+= ext_wbinfo_group_acl.8
+PLIST_FILES+= man/man8/ext_wbinfo_group_acl.8.gz
.endif
# POLA: allow the old global make.conf(5) (pre src.conf(5)) defines, too:
.if ${PORT_OPTIONS:MAUTH_NIS} && !defined(NO_NIS) && !defined(WITHOUT_NIS)
@@ -272,7 +271,7 @@
negotiate_auth= kerberos wrapper
libexec+= negotiate_kerberos_auth negotiate_kerberos_auth_test \
negotiate_wrapper_auth
-MAN8+= negotiate_kerberos_auth.8
+PLIST_FILES+= man/man8/negotiate_kerberos_auth.8.gz
# the kerberos_ldap_group external helper depends on LDAP and SASL:
.if ${PORT_OPTIONS:MAUTH_LDAP} && ${PORT_OPTIONS:MAUTH_SASL}
external_acl+= kerberos_ldap_group
@@ -280,7 +279,7 @@
cert_tool
# XXX: this manpage is present in Squid's source but is not being
# built/installed yet (Squid 3.2.3 as at 11/2012).
-#MAN8+= ext_kerberos_ldap_group_acl.8
+#PLIST_FILES+= man/man8/ext_kerberos_ldap_group_acl.8.gz
.endif
.else
negotiate_auth= none
@@ -466,20 +465,18 @@
# Finally, add additional user specified configuration options:
CONFIGURE_ARGS+= ${SQUID_CONFIGURE_ARGS}
-PLIST_DIRS= %%ETCDIR%%/icons/silk %%ETCDIR%%/icons libexec/squid
-PLIST_FILES= ${etc_files:S,^,etc/,} \
- %%ETCDIR%%/icons/SN.png \
- ${icon_silk_files:S,^,%%ETCDIR%%/icons/silk/,} \
+PLIST_DIRS= ${ETCDIR_REL}/icons/silk ${ETCDIR_REL}/icons libexec/squid
+PLIST_FILES+= ${ETCDIR_REL}/icons/SN.png \
+ ${icon_silk_files:S,^,${ETCDIR_REL}/icons/silk/,} \
${libexec:S,^,libexec/squid/,} ${sbin:S,^,sbin/,}
-PLIST_FILES+= %%ETCDIR%%/errors/COPYRIGHT %%ETCDIR%%/errors/TRANSLATORS
+PLIST_FILES+= ${ETCDIR_REL}/errors/COPYRIGHT
${ETCDIR_REL}/errors/TRANSLATORS
.for d in ${error_dirs}
-PLIST_DIRS+= %%ETCDIR%%/errors/${d}
-PLIST_FILES+= ${error_files:S,^,%%ETCDIR%%/errors/${d}/,}
+PLIST_DIRS+= ${ETCDIR_REL}/errors/${d}
+PLIST_FILES+= ${error_files:S,^,${ETCDIR_REL}/errors/${d}/,}
.endfor
-PLIST_FILES+= ${error_dir_links:S,^,%%ETCDIR%%/errors/,}
-PLIST_DIRS+= %%ETCDIR%%/errors
-PLIST_DIRSTRY+= %%ETCDIR%%
+PLIST_FILES+= ${error_dir_links:S,^,${ETCDIR_REL}/errors/,}
+PLIST_DIRS+= ${ETCDIR_REL}/errors
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
@@ -491,21 +488,37 @@
@${FIND} ${WRKSRC} -name '*.orig' -delete
pre-su-install:
- @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} \
+ @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${STAGEDIR}${PREFIX} \
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
+.for f in ${etc_files:M*.default}
+ @${RM} ${STAGEDIR}${PREFIX}/${ETCDIR_REL}/${f:R}
+ ${ECHO_CMD} "@exec if [ ! -f %D/${ETCDIR_REL}/${f:R} ]; then cp -p
%D/${ETCDIR_REL}/${f} %D/${ETCDIR_REL}/${f:R}; fi" >> ${TMPPLIST}
+ ${ECHO_CMD} "${ETCDIR_REL}/${f}" >> ${TMPPLIST}
+ ${ECHO_CMD} "@unexec if cmp -s %D/${ETCDIR_REL}/${f:R}
%D/${ETCDIR_REL}/${f}; then rm %D/${ETCDIR_REL}/${f:R}; fi" >> ${TMPPLIST}
+.endfor
+.for f in ${etc_files:N*.default}
+ ${ECHO_CMD} "${ETCDIR_REL}/${f}" >> ${TMPPLIST}
+.endfor
+ @${ECHO_CMD} "@dirrmtry ${ETCDIR_REL}" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir \"/var/log/squid\" >/dev/null 2>&1 || :" >>
${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir \"/var/run/squid\" >/dev/null 2>&1 || :" >>
${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir \"/var/squid/cache/squid\" >/dev/null 2>&1 ||
:" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir \"/var/squid/cache\" >/dev/null 2>&1 || :" >>
${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir \"/var/squid\" >/dev/null 2>&1 || :" >>
${TMPPLIST}
+
.if ${PORT_OPTIONS:MEXAMPLES}
- @${MKDIR} ${EXAMPLESDIR}
- ${INSTALL_DATA} ${WRKSRC}/helpers/basic_auth/DB/passwd.sql ${EXAMPLESDIR}
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/helpers/basic_auth/DB/passwd.sql
${STAGEDIR}${EXAMPLESDIR}
.endif
.if ${PORT_OPTIONS:MICMP}
- ${CHMOD} 4510 ${PREFIX}/libexec/squid/pinger; \
- ${CHGRP} squid ${PREFIX}/libexec/squid/pinger
+ ${CHMOD} 4510 ${STAGEDIR}${PREFIX}/libexec/squid/pinger; \
+ ${CHGRP} squid ${STAGEDIR}${PREFIX}/libexec/squid/pinger
.endif
.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} ${docs} ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${docs} ${STAGEDIR}${DOCSDIR}
.endif
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list