wok-6.x view c_icap/receipt @ rev 15976

Up connman-tools (1.21)
author Dominique Corbex <domcox@slitaz.org>
date Fri Feb 28 21:53:25 2014 +0100 (2014-02-28)
parents cd23435b5d94
children 0d8a1a3edc72
line source
1 # SliTaz package receipt.
3 PACKAGE="c_icap"
4 VERSION="0.1.7"
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/"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WGET_URL="$SF_MIRROR/c-icap/$TARBALL"
13 DEPENDS=""
14 BUILD_DEPENDS=""
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 ./configure --sysconfdir=/etc/c-icap \
20 --enable-large-files \
21 $CONFIGURE_ARGS && make && make install
22 }
24 # Rules to gen a SliTaz package suitable for Tazpkg.
25 genpkg_rules()
26 {
27 mkdir -p $fs/usr/lib/$PACKAGE \
28 $fs/etc/init.d \
29 $fs/var/log/c-icap \
30 $fs/var/run/c-icap
32 cp -a $install/usr/bin $fs/usr
33 cp -a $install/usr/lib/*.so* $fs/usr/lib
34 cp -a $install/usr/lib/$PACKAGE/*.so* $fs/usr/lib/$PACKAGE
36 cp -pa $install/etc $fs/
37 cp -pa $stuff/c-icapd $fs/etc/init.d
39 # Cleanup
40 rm -f $fs/usr/bin/c-icap-config
42 # Fix config file
43 sed -i -e "s|YourServerName|localhost|" \
44 -e "s|/usr/var/log|/var/log/c-icap/|" \
45 -e "s|/usr/var/run/|/var/run/c-icap|" \
46 -e "s|/usr/etc|/etc/c-icap|" $fs/etc/c-icap/c-icap.conf
47 chmod -x $fs/etc/c-icap/*
49 }
51 post_install()
52 {
53 [ -z "$1" -a ! -s /aufs-umount.sh ] && /etc/init.d/c-icapd start
55 cat <<EOF
57 ----
58 To start $PACKAGE server you can run :
60 /etc/init.d/$PACKAGE start
62 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
63 ----
64 EOF
65 }
67 pre_remove(){
69 echo "Stopping daemon..."
70 if (ps | grep -q c-icap); then
71 /etc/init.d/c-icapd stop
72 fi
73 }
74 post_remove()
75 {
76 echo "Removing stalled files..."
77 test -d /var/log/c-icap && rm -rf /var/log/c-icap
78 test -d /usr/run/c-icap && rm -rf /usr/run/c-icap
79 }