wok-next annotate c_icap/receipt @ rev 20669

vde2: up / fix build
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri May 11 14:21:30 2018 +0300 (2018-05-11)
parents 757d032c55c7
children 22ac97725527
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
al@20492 17 compile_rules() {
al@19810 18 ./configure \
al@19810 19 --sysconfdir=/etc/c-icap \
erjo@11890 20 --enable-large-files \
al@19810 21 $CONFIGURE_ARGS &&
al@20569 22 fix libtool &&
al@20534 23 make &&
al@20534 24 make install || return 1
al@19810 25
al@20492 26 mkdir -p $install/etc/init.d/ $install/var/log/c-icap/
al@20492 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@20492 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
al@20492 37 genpkg_rules() {
al@19810 38 case $PACKAGE in
al@19810 39 c_icap)
al@19810 40 copy @std var/log/c-icap/
al@19810 41 ;;
al@19810 42 *-dev)
al@19810 43 copy @dev
al@19810 44 ;;
al@19810 45 esac
erjo@11890 46 }
erjo@11941 47
al@19810 48 post_install_c_icap() {
pascal@15660 49 [ -z "$1" -a ! -s /aufs-umount.sh ] && /etc/init.d/c-icapd start
al@19810 50
al@19810 51 [ -n "$quiet" ] || cat <<EOF
al@19810 52
al@20492 53 .----------------------------------------------.
al@20492 54 | To start c_icap server you can run: |
al@20492 55 | |
al@20492 56 | /etc/init.d/c_icap start |
al@20492 57 | |
al@20492 58 |Or add c_icap to RUN_DAEMONS in /etc/rcS.conf |
al@20492 59 '----------------------------------------------'
erjo@11941 60 EOF
erjo@11941 61 }
erjo@11941 62
al@19810 63 pre_remove_c_icap() {
al@19810 64 echo "Stopping daemon..."
al@19810 65 if (ps | grep -q c-icap); then
al@19810 66 chroot "$1/" /etc/init.d/c-icapd stop
al@19810 67 fi
erjo@11941 68 }
al@19810 69 post_remove_c_icap() {
erjo@11941 70 echo "Removing stalled files..."
al@19810 71 [ -d "$1/var/log/c-icap" ] && rm -rf "$1/var/log/c-icap"
al@19810 72 [ -d "$1/usr/run/c-icap" ] && rm -rf "$1/usr/run/c-icap"
erjo@11941 73 }