wok view c_icap/receipt @ rev 11957

Up: slitaz-configs (4.8.1)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Mar 01 17:57:06 2012 +0100 (2012-03-01)
parents 055d964cbc4c
children 2142911d2464
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 WEB_SITE="http://c-icap.sourceforge.net/"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WGET_URL="$SF_MIRROR/c-icap/$TARBALL"
12 DEPENDS=""
13 BUILD_DEPENDS=""
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 ./configure --sysconfdir=/etc/c-icap \
19 --enable-large-files \
20 $CONFIGURE_ARGS && make && make install
21 }
23 # Rules to gen a SliTaz package suitable for Tazpkg.
24 genpkg_rules()
25 {
26 mkdir -p $fs/usr/lib/$PACKAGE \
27 $fs/etc/init.d
29 cp -a $install/usr/bin $fs/usr
30 cp -a $install/usr/lib/*.so* $fs/usr/lib
31 cp -a $install/usr/lib/$PACKAGE/*.so* $fs/usr/lib/$PACKAGE
33 cp -pa $install/etc $fs/
34 cp -pa $stuff/c-icapd $fs/etc/init.d
36 # Cleanup
37 rm -f $fs/usr/bin/c-icap-config
39 # Fix config file
40 sed -i -e "s|YourServerName|localhost|" \
41 -e "s|/usr/var/log/|/var/log/c-icap|" \
42 -e "s|/usr/etc|/etc/c-icap|" $fs/etc/c-icap/c-icap.conf
43 chmod -x $fs/etc/c-icap/*
45 }
47 post_install()
48 {
49 [ -z $1 ] && /etc/init.d/c-icapd start
51 cat <<EOF
53 ----
54 To start $PACKAGE server you can run :
56 /etc/init.d/$PACKAGE start
58 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
59 ----
60 EOF
61 }
63 pre_remove(){
65 echo "Stopping daemon..."
66 if (ps | grep -q c-icap); then
67 /etc/init.d/c-icapd stop
68 fi
69 }
70 post_remove()
71 {
72 echo "Removing stalled files..."
73 test -d /var/log/c-icap && rm -rf /var/log/c-icap
74 test -d /usr/run/c-icap && rm -rf /usr/run/c-icap
75 }