wok-next annotate c_icap/receipt @ rev 20255

Up linux-cloop (4.12) again
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 07 14:55:55 2017 +0100 (2017-11-07)
parents 8f50006d2661
children 4c1ed6983d05
rev   line source
al@19810 1 # SliTaz package receipt v2.
erjo@11890 2
erjo@11890 3 PACKAGE="c_icap"
erjo@11890 4 VERSION="0.1.7"
erjo@11890 5 CATEGORY="network"
al@19810 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/"
al@19810 10
erjo@11890 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
erjo@11890 12 WGET_URL="$SF_MIRROR/c-icap/$TARBALL"
erjo@11890 13
al@19661 14 BUILD_DEPENDS="zlib-dev"
al@19810 15 SPLIT="c_icap-dev"
erjo@11890 16
erjo@11890 17 # Rules to configure and make the package.
erjo@11890 18 compile_rules()
erjo@11890 19 {
al@19810 20 ./configure \
al@19810 21 --sysconfdir=/etc/c-icap \
erjo@11890 22 --enable-large-files \
al@19810 23 $CONFIGURE_ARGS &&
al@19810 24 make && make install &&
al@19810 25
al@19810 26 mkdir -p $install/etc/init.d/ $install/var/log/c-icap/ &&
al@19810 27 install -m755 $stuff/c-icapd $install/etc/init.d &&
al@19810 28
al@19810 29 # Fix config file
al@19810 30 sed -i -e "s|YourServerName|localhost|;
al@19810 31 s|/usr/var/log|/var/log/c-icap/|;
al@19810 32 s|/usr/var/run/|/var/run/c-icap|;
al@19810 33 s|/usr/etc|/etc/c-icap|" $install/etc/c-icap/c-icap.conf &&
al@19810 34 chmod -x $install/etc/c-icap/*
erjo@11890 35 }
erjo@11890 36
erjo@11890 37 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@11890 38 genpkg_rules()
erjo@11890 39 {
al@19810 40 case $PACKAGE in
al@19810 41 c_icap)
al@19810 42 copy @std var/log/c-icap/
al@19810 43 ;;
al@19810 44 *-dev)
al@19810 45 copy @dev
al@19810 46 ;;
al@19810 47 esac
erjo@11890 48 }
erjo@11941 49
al@19810 50 post_install_c_icap() {
pascal@15660 51 [ -z "$1" -a ! -s /aufs-umount.sh ] && /etc/init.d/c-icapd start
al@19810 52
al@19810 53 [ -n "$quiet" ] || cat <<EOF
al@19810 54
erjo@11941 55 ----
erjo@11941 56 To start $PACKAGE server you can run :
erjo@11941 57
erjo@11941 58 /etc/init.d/$PACKAGE start
erjo@11941 59
erjo@11941 60 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
erjo@11941 61 ----
erjo@11941 62 EOF
erjo@11941 63 }
erjo@11941 64
al@19810 65 pre_remove_c_icap() {
al@19810 66 echo "Stopping daemon..."
al@19810 67 if (ps | grep -q c-icap); then
al@19810 68 chroot "$1/" /etc/init.d/c-icapd stop
al@19810 69 fi
erjo@11941 70 }
al@19810 71 post_remove_c_icap() {
erjo@11941 72 echo "Removing stalled files..."
al@19810 73 [ -d "$1/var/log/c-icap" ] && rm -rf "$1/var/log/c-icap"
al@19810 74 [ -d "$1/usr/run/c-icap" ] && rm -rf "$1/usr/run/c-icap"
erjo@11941 75 }