wok-current view squid/receipt @ rev 25623
Use default gcc 6.3 for jack-audio-connection-kit
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Mon Sep 04 18:47:50 2023 +0000 (14 months ago) |
parents | 6da7dbdbf74a |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="squid"
4 VERSION="5.6"
5 CATEGORY="network"
6 SHORT_DESC="The Squid proxy caching server."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.squid-cache.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}Versions/v${VERSION%.*}/$TARBALL"
14 SUGGESTED="iptables"
15 DEPENDS="expat gcc83-lib-base gnutls libatomic libldap libltdl libsasl libssl libxml2"
16 BUILD_DEPENDS="cyrus-sasl-dev expat-dev gcc83 gnutls-dev libcap-dev libdb
17 libxml2-dev openssl-dev openldap-dev perl"
19 CONFIG_FILES="/etc/squid"
21 current_version()
22 {
23 wget -O - $WEB_SITE/Versions 2>/dev/null | \
24 sed '1,/suitable for production use/d;/href/!d;s|.*[0-9]/">||;s|href.*||;s|.*[0-9]</td><td>||;s|<.*||;q'
25 }
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 ./configure \
31 CC=gcc-83 \
32 CXX=g++-83 \
33 --prefix=/usr \
34 --sysconfdir=/etc/squid \
35 --datadir=/usr/share/squid \
36 --libexecdir=/usr/lib/squid \
37 --localstatedir=/var \
38 --with-logdir=/var/log/squid \
39 --disable-icmp \
40 --disable-ident-lookups \
41 --disable-poll \
42 --disable-snmp \
43 --enable-basic-auth-helpers="NCSA,SMB,MSNT,LDAP" \
44 --enable-delay-pools \
45 --enable-http-violations \
46 --enable-icap-client \
47 --enable-linux-netfilter \
48 --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \
49 --enable-ntlm-fail-open \
50 --enable-referer-log \
51 --enable-removal-policies="heap,lru" \
52 --enable-ssl \
53 --enable-ssl-crtd \
54 --enable-storeio="aufs,diskd,ufs" \
55 --enable-underscores \
56 --enable-useragent-log \
57 --with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \
58 --with-openssl \
59 $CONFIGURE_ARGS &&
60 make $MAKEFLAGS &&
61 make install
62 }
64 # Rules to gen a SliTaz package suitable for Tazpkg.
65 genpkg_rules()
66 {
67 mkdir -p $fs/usr/share/squid/errors
68 mkdir -p $fs/var/cache/squid
69 mkdir -p $fs/var/log/squid
70 mkdir -p $fs/usr/lib/squid
71 mkdir -p $fs/etc/squid/conf.d
73 touch $fs/var/log/squid/cache.log
75 cp -a $install/etc $fs
76 rm -rf $fs/etc/squid/*.default
77 cp -a $stuff/etc $fs
79 cp -a $install/var $fs
80 cp -a $install/usr/bin $fs/usr
81 cp -a $install/usr/sbin $fs/usr
82 cp -a $install/usr/lib/squid/* $fs/usr/lib/squid
84 # Remove auth libs
85 rm -f $fs/usr/lib/squid/*_auth*
87 cp -a $install/usr/share/squid/mib.txt $fs/usr/share/squid
88 cp -a $install/usr/share/squid/icons $fs/usr/share/squid
89 cp -a $install/usr/share/squid/errors/templates \
90 $fs/usr/share/squid/errors
91 cp -a $install/usr/share/squid/errors/en* $fs/usr/share/squid/errors
92 cp -a $install/usr/share/squid/errors/fr* $fs/usr/share/squid/errors
94 sed -i \
95 -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
96 -e 's|^#cache_dir ufs /var/cache 100|cache_dir ufs /var/cache/squid 256|' \
97 -e 's|^#pid_filename /var/logs|pid_filename /var/run/squid.pid|' \
98 -e "s|^coredump_dir.*|coredump_dir /var/cache/squid|" \
99 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
100 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
101 $fs/etc/squid/squid.conf
103 cat <<EOF>>$fs/etc/squid/squid.conf
105 cache_effective_user squid
106 cache_effective_group squid
108 access_log /var/log/squid/access.log
109 cache_log /var/log/squid/cache.log
110 cache_store_log /var/log/squid/store.log
112 include /etc/squid/conf.d/*.conf
113 EOF
114 }
116 # Pre and post install commands for Tazpkg.
117 post_install()
118 {
119 local user
120 local group
122 user=squid
123 group=squid
125 if ! grep -q $user "$1/etc/passwd"
126 then
127 echo -n "Adding user/group $user..."
128 chroot "$1/" addgroup -S $group
129 chroot "$1/" adduser -S -D -H -G $group $user
130 status
131 fi
134 # Set permissions for files and directories
135 chroot "$1/" chown -R ${user}.${group} /var/log/squid
136 chroot "$1/" chown -R ${user}.${group} /var/cache/squid
138 cat <<EOF
139 ----
140 To start $PACKAGE server you can run :
142 /etc/init.d/$PACKAGE start
144 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
145 ----
146 EOF
147 }
150 post_remove()
151 {
152 echo "Removing stalled files..."
153 test -d /var/cache/squid &&
154 rm -rf /var/cache/squid
155 test -d /var/log/squid &&
156 rm -rf /var/log/squid
157 test -d /usr/share/squid &&
158 rm -rf /usr/share/squid
160 echo "Removing user and group squid"
161 deluser squid
162 }