wok-current view c_icap/receipt @ rev 19997
@depends: python-vte
author | hackdorte <hackdorte@yandex.com> |
---|---|
date | Thu Jul 27 09:23:34 2017 -0300 (2017-07-27) |
parents | dfef8de3d270 |
children | 0cf279b4394a |
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
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" -a ! -s /aufs-umount.sh ] && /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 chroot "$1/" /etc/init.d/c-icapd stop
71 fi
72 }
73 post_remove()
74 {
75 echo "Removing stalled files..."
76 test -d "$1/var/log/c-icap" && rm -rf "$1/var/log/c-icap"
77 test -d "$1/usr/run/c-icap" && rm -rf "$1/usr/run/c-icap"
78 }