summaryrefslogtreecommitdiff
path: root/package/squid
diff options
context:
space:
mode:
Diffstat (limited to 'package/squid')
-rw-r--r--package/squid/Config.in1
-rw-r--r--package/squid/Makefile15
-rw-r--r--package/squid/files/squid.conf16
-rw-r--r--package/squid/files/squid.init37
-rw-r--r--package/squid/files/squid.postinst6
5 files changed, 69 insertions, 6 deletions
diff --git a/package/squid/Config.in b/package/squid/Config.in
index c0cc8f818..c597986d8 100644
--- a/package/squid/Config.in
+++ b/package/squid/Config.in
@@ -4,6 +4,7 @@ config ADK_PACKAGE_SQUID
tristate
default n
select ADK_PACKAGE_LIBOPENSSL
+ select ADK_PACKAGE_LIBPTHREAD
help
Squid is a high-performance proxy caching server for web clients,
supporting FTP, gopher, and HTTP data objects. Unlike traditional
diff --git a/package/squid/Makefile b/package/squid/Makefile
index 80f97c032..cfc35061c 100644
--- a/package/squid/Makefile
+++ b/package/squid/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= squid
PKG_VERSION:= 3.0.STABLE20
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= b69577cfc5cfb6808ec426e3a933220d
PKG_DESCR:= squid web and cache proxy
PKG_SECTION:= net
@@ -113,12 +113,9 @@ CONFIGURE_ARGS+= --datadir=/usr/share/squid \
--enable-x-accelerator-vary \
--with-pthreads \
--with-dl \
- --enable-icmp \
--enable-kill-parent-hack \
--enable-arp-acl \
--enable-ssl \
- --disable-htcp \
- --disable-esi \
--enable-err-languages=English \
--enable-default-err-language=English \
--enable-linux-netfilter \
@@ -128,6 +125,9 @@ CONFIGURE_ARGS+= --datadir=/usr/share/squid \
--enable-cache-digests \
--enable-referer-log \
--enable-delay-pools \
+ --disable-snmp \
+ --disable-esi \
+ --disable-htcp \
--disable-wccp \
--disable-wccpv2 \
--enable-useragent-log \
@@ -146,11 +146,14 @@ post-configure:
${SED} 's#postdeps="-lstdc.*#postdeps="-lm"#' \
${WRKBUILD}/libtool
endif
+post-configure:
+ ${SED} 's#\(hardcode_into_libs=\).*$$#\1no#' \
+ ${WRKBUILD}/libtool
post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
- ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \
- ${WRKINST}/etc/squid/squid.conf ${IDIR_SQUID}/etc/squid/
+ ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf ${IDIR_SQUID}/etc/squid/
+ ${INSTALL_DATA} ./files/squid.conf ${IDIR_SQUID}/etc/squid/
${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid
${CP} ${WRKINST}/usr/share/squid/* ${IDIR_SQUID}/usr/share/squid/
${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid
diff --git a/package/squid/files/squid.conf b/package/squid/files/squid.conf
new file mode 100644
index 000000000..9e6571192
--- /dev/null
+++ b/package/squid/files/squid.conf
@@ -0,0 +1,16 @@
+visible_hostname linux
+# for transparent proxy use following
+# http_port 3128 transparent
+http_port 3128
+pid_filename /var/run/squid.pid
+# logging
+access_log syslog
+cache_store_log none
+cache_log /var/log/squid-cache.log
+# security
+cache_effective_user squid
+cache_effective_group squid
+# cache dir
+cache_dir ufs /var/squid/cache 10M 16 256
+# allow all
+http_access allow all
diff --git a/package/squid/files/squid.init b/package/squid/files/squid.init
new file mode 100644
index 000000000..5fd8e4c13
--- /dev/null
+++ b/package/squid/files/squid.init
@@ -0,0 +1,37 @@
+#!/bin/sh
+#PKG squid
+#INIT 70
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${squid:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ if [ ! -f /var/log/squid-cache.log ];then
+ touch /var/log/squid-cache.log
+ chown squid:squid /var/log/squid-cache.log
+ fi
+ if [ ! -d /var/squid/cache ];then
+ mkdir -p /var/squid/cache
+ chown squid:squid /var/squid/cache
+ squid -z
+ fi
+ squid
+ ;;
+stop)
+ squid -k kill
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?
diff --git a/package/squid/files/squid.postinst b/package/squid/files/squid.postinst
new file mode 100644
index 000000000..6a08126c9
--- /dev/null
+++ b/package/squid/files/squid.postinst
@@ -0,0 +1,6 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+gid=$(get_next_gid)
+add_user squid $(get_next_uid) $gid /var/squid/cache
+add_group squid $gid
+add_rcconf squid squid NO