wok-current view c_icap/receipt @ rev 25435

Up libarchive (3.6.1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 31 07:33:35 2022 +0000 (2022-08-31)
parents 267887cc84bf
children ad0bc3efbf37
line source
1 # SliTaz package receipt.
3 PACKAGE="c_icap" # rename as c-icap ?
4 VERSION="0.5.10"
5 CATEGORY="network"
6 SHORT_DESC="Implementation of an ICAP server."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="LGPL2.1"
9 WEB_SITE="https://sourceforge.net/projects/c-icap/"
10 REPOLOGY="c-icap"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="$SF_MIRROR/c-icap/$TARBALL"
15 DEPENDS=""
16 BUILD_DEPENDS=""
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - https://sourceforge.net/projects/c-icap/files/c-icap/ 2>/dev/null | \
22 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
23 sed '/scope="row/!d;s|.*/c_icap-||;s|.tar.*||;q'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 ./configure \
30 --sysconfdir=/etc/c-icap \
31 --enable-large-files \
32 $CONFIGURE_ARGS &&
33 make &&
34 make install
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/lib/$PACKAGE
41 mkdir -p $fs/etc/init.d
42 mkdir -p $fs/var/log/c-icap
44 cp -a $install/usr/bin $fs/usr
45 cp -a $install/usr/lib/*.so* $fs/usr/lib
46 cp -a $install/usr/lib/$PACKAGE/*.so* $fs/usr/lib/$PACKAGE
47 cp -pa $install/etc $fs/
48 cp -pa $stuff/c-icapd $fs/etc/init.d
50 # Cleanup
51 rm -f $fs/usr/bin/c-icap-config
53 # Fix configuration file
54 sed -i -e "s|YourServerName|localhost|" \
55 -e "s|/usr/var/log|/var/log/c-icap/|" \
56 -e "s|/usr/var/run/|/var/run/c-icap|" \
57 -e "s|/usr/etc|/etc/c-icap|" \
58 $fs/etc/c-icap/c-icap.conf
59 chmod -x $fs/etc/c-icap/*
60 }
62 post_install()
63 {
64 [ -z "$1" -a ! -s /aufs-umount.sh ] &&
65 /etc/init.d/c-icapd start
67 cat <<EOF
69 ----
70 To start c-icapd server you can run :
72 /etc/init.d/c-icapd start
74 Or add c-icapd to RUN_DAEMONS in /etc/rcS.conf
75 ----
76 EOF
77 }
79 pre_remove()
80 {
81 echo "Stopping daemon..."
82 if (ps | grep -q c-icap)
83 then
84 chroot "$1/" /etc/init.d/c-icapd stop
85 fi
86 }
88 post_remove()
89 {
90 echo "Removing stalled files..."
91 test -d "$1/var/log/c-icap" && rm -rf "$1/var/log/c-icap"
92 test -d "$1/usr/run/c-icap" && rm -rf "$1/usr/run/c-icap"
93 }