wok view c_icap/receipt @ rev 24384

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