| @@ -1,89 +1,91 @@ | | | @@ -1,89 +1,91 @@ |
1 | # $NetBSD: Makefile,v 1.2 2020/01/18 21:51:12 jperkin Exp $ | | 1 | # $NetBSD: Makefile,v 1.3 2020/01/23 14:49:09 jperkin Exp $ |
2 | | | 2 | |
3 | DISTNAME= squid-4.9 | | 3 | DISTNAME= squid-4.9 |
4 | PKGREVISION= 1 | | 4 | PKGREVISION= 1 |
5 | CATEGORIES= www | | 5 | CATEGORIES= www |
6 | MASTER_SITES= http://www.squid-cache.org/Versions/v4/ | | 6 | MASTER_SITES= http://www.squid-cache.org/Versions/v4/ |
7 | MASTER_SITES+= ftp://ftp.squid-cache.org/pub/squid/ | | 7 | MASTER_SITES+= ftp://ftp.squid-cache.org/pub/squid/ |
8 | MASTER_SITES+= ftp://ftp.squid-cache.org/pub/archive/4/ | | 8 | MASTER_SITES+= ftp://ftp.squid-cache.org/pub/archive/4/ |
9 | EXTRACT_SUFX= .tar.xz | | 9 | EXTRACT_SUFX= .tar.xz |
10 | | | 10 | |
11 | MAINTAINER= pkgsrc-users@NetBSD.org | | 11 | MAINTAINER= pkgsrc-users@NetBSD.org |
12 | HOMEPAGE= http://www.squid-cache.org/ | | 12 | HOMEPAGE= http://www.squid-cache.org/ |
13 | COMMENT= Post-Harvest_cached WWW proxy cache and accelerator | | 13 | COMMENT= Post-Harvest_cached WWW proxy cache and accelerator |
14 | LICENSE= gnu-gpl-v2 | | 14 | LICENSE= gnu-gpl-v2 |
15 | | | 15 | |
16 | USE_LANGUAGES= c c++11 | | 16 | USE_LANGUAGES= c c++11 |
17 | USE_TOOLS+= perl:run gmake | | 17 | USE_TOOLS+= perl:run gmake |
18 | GNU_CONFIGURE= yes | | 18 | GNU_CONFIGURE= yes |
19 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | | 19 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} |
20 | CONFIGURE_ARGS+= --localstatedir=${SQUID_DATADIR} | | 20 | CONFIGURE_ARGS+= --localstatedir=${SQUID_DATADIR} |
21 | CONFIGURE_ARGS+= --datarootdir=${PREFIX}/share/squid | | 21 | CONFIGURE_ARGS+= --datarootdir=${PREFIX}/share/squid |
22 | CONFIGURE_ARGS+= --disable-arch-native | | 22 | CONFIGURE_ARGS+= --disable-arch-native |
23 | CONFIGURE_ARGS+= --enable-cachemgr-hostname=localhost | | 23 | CONFIGURE_ARGS+= --enable-cachemgr-hostname=localhost |
24 | CONFIGURE_ARGS+= --enable-delay-pools | | 24 | CONFIGURE_ARGS+= --enable-delay-pools |
25 | CONFIGURE_ARGS+= --enable-icap-client | | 25 | CONFIGURE_ARGS+= --enable-icap-client |
26 | CONFIGURE_ARGS+= --enable-icmp | | 26 | CONFIGURE_ARGS+= --enable-icmp |
27 | CONFIGURE_ARGS+= --enable-poll | | 27 | CONFIGURE_ARGS+= --enable-poll |
28 | CONFIGURE_ARGS+= --enable-removal-policies=lru,heap | | 28 | CONFIGURE_ARGS+= --enable-removal-policies=lru,heap |
29 | CONFIGURE_ARGS+= --enable-storeio=${SQUID_BACKENDS:Q} | | 29 | CONFIGURE_ARGS+= --enable-storeio=${SQUID_BACKENDS:Q} |
30 | CONFIGURE_ARGS+= --with-aio | | 30 | CONFIGURE_ARGS+= --with-aio |
31 | CONFIGURE_ARGS+= --with-default-user=${SQUID_USER} | | 31 | CONFIGURE_ARGS+= --with-default-user=${SQUID_USER} |
32 | CONFIGURE_ARGS+= --with-pidfile=${VARBASE}/run/squid.pid | | 32 | CONFIGURE_ARGS+= --with-pidfile=${VARBASE}/run/squid.pid |
33 | | | 33 | |
34 | # Let 'purge' find correct config file by default. | | 34 | # Let 'purge' find correct config file by default. |
35 | CPPFLAGS+= -DDEFAULT_SQUID_CONF=\"${PKG_SYSCONFDIR}/squid.conf\" | | 35 | CPPFLAGS+= -DDEFAULT_SQUID_CONF=\"${PKG_SYSCONFDIR}/squid.conf\" |
36 | | | 36 | |
| | | 37 | BUILDLINK_TRANSFORM+= rm:-Werror |
| | | 38 | |
37 | BUILD_DEFS+= VARBASE | | 39 | BUILD_DEFS+= VARBASE |
38 | MAKE_ENV+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} | | 40 | MAKE_ENV+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} |
39 | MAKE_ENV+= PKG_PREFIX=${PREFIX} VARBASE=${VARBASE} | | 41 | MAKE_ENV+= PKG_PREFIX=${PREFIX} VARBASE=${VARBASE} |
40 | REPLACE_PERL+= contrib/url-normalizer.pl contrib/user-agents.pl \ | | 42 | REPLACE_PERL+= contrib/url-normalizer.pl contrib/user-agents.pl \ |
41 | scripts/AnnounceCache.pl scripts/access-log-matrix.pl \ | | 43 | scripts/AnnounceCache.pl scripts/access-log-matrix.pl \ |
42 | scripts/cache-compare.pl scripts/cachetrace.pl \ | | 44 | scripts/cache-compare.pl scripts/cachetrace.pl \ |
43 | scripts/calc-must-ids.pl scripts/check_cache.pl \ | | 45 | scripts/calc-must-ids.pl scripts/check_cache.pl \ |
44 | scripts/fileno-to-pathname.pl scripts/find-alive.pl \ | | 46 | scripts/fileno-to-pathname.pl scripts/find-alive.pl \ |
45 | scripts/flag_truncs.pl scripts/icp-test.pl \ | | 47 | scripts/flag_truncs.pl scripts/icp-test.pl \ |
46 | scripts/icpserver.pl scripts/tcp-banger.pl \ | | 48 | scripts/icpserver.pl scripts/tcp-banger.pl \ |
47 | scripts/trace-job.pl scripts/trace-master.pl \ | | 49 | scripts/trace-job.pl scripts/trace-master.pl \ |
48 | scripts/udp-banger.pl scripts/upgrade-1.0-store.pl \ | | 50 | scripts/udp-banger.pl scripts/upgrade-1.0-store.pl \ |
49 | tools/helper-ok-dying.pl tools/helper-ok.pl | | 51 | tools/helper-ok-dying.pl tools/helper-ok.pl |
50 | EGFILES= src/mime.conf.default src/squid.conf.default \ | | 52 | EGFILES= src/mime.conf.default src/squid.conf.default \ |
51 | errors/errorpage.css tools/cachemgr.conf | | 53 | errors/errorpage.css tools/cachemgr.conf |
52 | EGDIR= share/examples/squid | | 54 | EGDIR= share/examples/squid |
53 | .for f in cachemgr.conf errorpage.css mime.conf squid.conf | | 55 | .for f in cachemgr.conf errorpage.css mime.conf squid.conf |
54 | CONF_FILES+= ${PREFIX}/${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} | | 56 | CONF_FILES+= ${PREFIX}/${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} |
55 | .endfor | | 57 | .endfor |
56 | OWN_DIRS= ${SQUID_DATADIR} | | 58 | OWN_DIRS= ${SQUID_DATADIR} |
57 | OWN_DIRS_PERMS+= ${SQUID_DATADIR}/cache ${SQUID_USER} ${SQUID_GROUP} 0750 \ | | 59 | OWN_DIRS_PERMS+= ${SQUID_DATADIR}/cache ${SQUID_USER} ${SQUID_GROUP} 0750 \ |
58 | ${SQUID_DATADIR}/logs ${SQUID_USER} ${SQUID_GROUP} 0750 | | 60 | ${SQUID_DATADIR}/logs ${SQUID_USER} ${SQUID_GROUP} 0750 |
59 | | | 61 | |
60 | .include "Makefile.common" | | 62 | .include "Makefile.common" |
61 | .include "options.mk" | | 63 | .include "options.mk" |
62 | | | 64 | |
63 | # Incorrect check for <netinet/ip_icmp.h> on FreeBSD: | | 65 | # Incorrect check for <netinet/ip_icmp.h> on FreeBSD: |
64 | CONFIGURE_ENV.FreeBSD+= ac_cv_header_netinet_ip_icmp_h=yes | | 66 | CONFIGURE_ENV.FreeBSD+= ac_cv_header_netinet_ip_icmp_h=yes |
65 | | | 67 | |
66 | INSTALLATION_DIRS= ${EGDIR} | | 68 | INSTALLATION_DIRS= ${EGDIR} |
67 | | | 69 | |
68 | SPECIAL_PERMS+= libexec/pinger ${SETUID_ROOT_PERMS} | | 70 | SPECIAL_PERMS+= libexec/pinger ${SETUID_ROOT_PERMS} |
69 | | | 71 | |
70 | RCD_SCRIPTS= squid | | 72 | RCD_SCRIPTS= squid |
71 | RCD_SCRIPT_SRC.squid= files/squid.sh | | 73 | RCD_SCRIPT_SRC.squid= files/squid.sh |
72 | | | 74 | |
73 | SUBST_CLASSES+= confs | | 75 | SUBST_CLASSES+= confs |
74 | SUBST_STAGE.confs= pre-configure | | 76 | SUBST_STAGE.confs= pre-configure |
75 | SUBST_FILES.confs= src/cf.data.pre | | 77 | SUBST_FILES.confs= src/cf.data.pre |
76 | SUBST_SED.confs= -e "s/@USER@/${SQUID_USER}/" | | 78 | SUBST_SED.confs= -e "s/@USER@/${SQUID_USER}/" |
77 | SUBST_MESSAGE.confs= Fixing configuration files. | | 79 | SUBST_MESSAGE.confs= Fixing configuration files. |
78 | | | 80 | |
79 | post-build: | | 81 | post-build: |
80 | cd ${WRKSRC}/src && ${CP} -pf squid.conf.documented squid.conf.default | | 82 | cd ${WRKSRC}/src && ${CP} -pf squid.conf.documented squid.conf.default |
81 | | | 83 | |
82 | post-install: | | 84 | post-install: |
83 | .for f in ${EGFILES} | | 85 | .for f in ${EGFILES} |
84 | ${INSTALL_DATA} ${WRKSRC}/${f} \ | | 86 | ${INSTALL_DATA} ${WRKSRC}/${f} \ |
85 | ${DESTDIR}${PREFIX}/${EGDIR}/`basename ${f} .default` | | 87 | ${DESTDIR}${PREFIX}/${EGDIR}/`basename ${f} .default` |
86 | .endfor | | 88 | .endfor |
87 | | | 89 | |
88 | .include "../../devel/libltdl/buildlink3.mk" | | 90 | .include "../../devel/libltdl/buildlink3.mk" |
89 | .include "../../mk/bsd.pkg.mk" | | 91 | .include "../../mk/bsd.pkg.mk" |