wok-6.x annotate c_icap/receipt @ rev 15719
Up: lrzip (0.616)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Dec 26 11:51:16 2013 +0000 (2013-12-26) |
parents | cd23435b5d94 |
children | 0d8a1a3edc72 |
rev | line source |
---|---|
erjo@11890 | 1 # SliTaz package receipt. |
erjo@11890 | 2 |
erjo@11890 | 3 PACKAGE="c_icap" |
erjo@11890 | 4 VERSION="0.1.7" |
erjo@11890 | 5 CATEGORY="network" |
erjo@11890 | 6 SHORT_DESC="Implementation of an ICAP server." |
erjo@11890 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@14996 | 8 LICENSE="LGPL2.1" |
erjo@11890 | 9 WEB_SITE="http://c-icap.sourceforge.net/" |
erjo@11890 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
erjo@11890 | 11 WGET_URL="$SF_MIRROR/c-icap/$TARBALL" |
erjo@11890 | 12 |
erjo@11890 | 13 DEPENDS="" |
erjo@11890 | 14 BUILD_DEPENDS="" |
erjo@11890 | 15 |
erjo@11890 | 16 # Rules to configure and make the package. |
erjo@11890 | 17 compile_rules() |
erjo@11890 | 18 { |
erjo@11890 | 19 ./configure --sysconfdir=/etc/c-icap \ |
erjo@11890 | 20 --enable-large-files \ |
erjo@11890 | 21 $CONFIGURE_ARGS && make && make install |
erjo@11890 | 22 } |
erjo@11890 | 23 |
erjo@11890 | 24 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@11890 | 25 genpkg_rules() |
erjo@11890 | 26 { |
erjo@11941 | 27 mkdir -p $fs/usr/lib/$PACKAGE \ |
erjo@11998 | 28 $fs/etc/init.d \ |
erjo@11998 | 29 $fs/var/log/c-icap \ |
erjo@11998 | 30 $fs/var/run/c-icap |
erjo@11998 | 31 |
erjo@11890 | 32 cp -a $install/usr/bin $fs/usr |
erjo@11890 | 33 cp -a $install/usr/lib/*.so* $fs/usr/lib |
erjo@11890 | 34 cp -a $install/usr/lib/$PACKAGE/*.so* $fs/usr/lib/$PACKAGE |
erjo@11890 | 35 |
erjo@11890 | 36 cp -pa $install/etc $fs/ |
erjo@11941 | 37 cp -pa $stuff/c-icapd $fs/etc/init.d |
erjo@11890 | 38 |
erjo@11890 | 39 # Cleanup |
erjo@11890 | 40 rm -f $fs/usr/bin/c-icap-config |
erjo@11941 | 41 |
erjo@11941 | 42 # Fix config file |
erjo@11941 | 43 sed -i -e "s|YourServerName|localhost|" \ |
erjo@11998 | 44 -e "s|/usr/var/log|/var/log/c-icap/|" \ |
erjo@11998 | 45 -e "s|/usr/var/run/|/var/run/c-icap|" \ |
erjo@11941 | 46 -e "s|/usr/etc|/etc/c-icap|" $fs/etc/c-icap/c-icap.conf |
erjo@11941 | 47 chmod -x $fs/etc/c-icap/* |
erjo@11941 | 48 |
erjo@11890 | 49 } |
erjo@11941 | 50 |
erjo@11941 | 51 post_install() |
erjo@11941 | 52 { |
pascal@15660 | 53 [ -z "$1" -a ! -s /aufs-umount.sh ] && /etc/init.d/c-icapd start |
erjo@11941 | 54 |
erjo@11941 | 55 cat <<EOF |
erjo@11941 | 56 |
erjo@11941 | 57 ---- |
erjo@11941 | 58 To start $PACKAGE server you can run : |
erjo@11941 | 59 |
erjo@11941 | 60 /etc/init.d/$PACKAGE start |
erjo@11941 | 61 |
erjo@11941 | 62 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf |
erjo@11941 | 63 ---- |
erjo@11941 | 64 EOF |
erjo@11941 | 65 } |
erjo@11941 | 66 |
erjo@11941 | 67 pre_remove(){ |
erjo@11941 | 68 |
erjo@11941 | 69 echo "Stopping daemon..." |
erjo@11941 | 70 if (ps | grep -q c-icap); then |
erjo@11941 | 71 /etc/init.d/c-icapd stop |
erjo@11941 | 72 fi |
erjo@11941 | 73 } |
erjo@11941 | 74 post_remove() |
erjo@11941 | 75 { |
erjo@11941 | 76 echo "Removing stalled files..." |
erjo@11941 | 77 test -d /var/log/c-icap && rm -rf /var/log/c-icap |
erjo@11941 | 78 test -d /usr/run/c-icap && rm -rf /usr/run/c-icap |
erjo@11941 | 79 } |