wok view c_icap/receipt @ rev 14657

Normalize LICENSE according to wok/licenses package (bsd part)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jun 05 16:21:04 2013 +0200 (2013-06-05)
parents 95e0d6cca290
children 76b72f1ad63c
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 \
28 $fs/var/log/c-icap \
29 $fs/var/run/c-icap
31 cp -a $install/usr/bin $fs/usr
32 cp -a $install/usr/lib/*.so* $fs/usr/lib
33 cp -a $install/usr/lib/$PACKAGE/*.so* $fs/usr/lib/$PACKAGE
35 cp -pa $install/etc $fs/
36 cp -pa $stuff/c-icapd $fs/etc/init.d
38 # Cleanup
39 rm -f $fs/usr/bin/c-icap-config
41 # Fix config file
42 sed -i -e "s|YourServerName|localhost|" \
43 -e "s|/usr/var/log|/var/log/c-icap/|" \
44 -e "s|/usr/var/run/|/var/run/c-icap|" \
45 -e "s|/usr/etc|/etc/c-icap|" $fs/etc/c-icap/c-icap.conf
46 chmod -x $fs/etc/c-icap/*
48 }
50 post_install()
51 {
52 [ -z $1 ] && /etc/init.d/c-icapd start
54 cat <<EOF
56 ----
57 To start $PACKAGE server you can run :
59 /etc/init.d/$PACKAGE start
61 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
62 ----
63 EOF
64 }
66 pre_remove(){
68 echo "Stopping daemon..."
69 if (ps | grep -q c-icap); then
70 /etc/init.d/c-icapd stop
71 fi
72 }
73 post_remove()
74 {
75 echo "Removing stalled files..."
76 test -d /var/log/c-icap && rm -rf /var/log/c-icap
77 test -d /usr/run/c-icap && rm -rf /usr/run/c-icap
78 }