wok annotate c_icap/receipt @ rev 22365

kdelibs: fix kdeui/CMakeLists.txt
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 22 10:49:44 2019 +0100 (2019-11-22)
parents 9e01bc6321ea
children 59a032355c05
rev   line source
erjo@11890 1 # SliTaz package receipt.
erjo@11890 2
erjo@11890 3 PACKAGE="c_icap"
Hans-G?nter@20757 4 VERSION="0.5.5"
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/"
Hans-G?nter@20757 10
erjo@11890 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
erjo@11890 12 WGET_URL="$SF_MIRROR/c-icap/$TARBALL"
erjo@11890 13
erjo@11890 14 DEPENDS=""
erjo@11890 15 BUILD_DEPENDS=""
erjo@11890 16
erjo@11890 17 # Rules to configure and make the package.
erjo@11890 18 compile_rules()
erjo@11890 19 {
Hans-G?nter@20757 20 ./configure \
Hans-G?nter@20757 21 --sysconfdir=/etc/c-icap \
erjo@11890 22 --enable-large-files \
Hans-G?nter@20757 23 $CONFIGURE_ARGS &&
Hans-G?nter@20757 24 make &&
Hans-G?nter@20757 25 make install
erjo@11890 26 }
erjo@11890 27
erjo@11890 28 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@11890 29 genpkg_rules()
erjo@11890 30 {
erjo@11941 31 mkdir -p $fs/usr/lib/$PACKAGE \
erjo@11998 32 $fs/etc/init.d \
pascal@16681 33 $fs/var/log/c-icap
erjo@11998 34
erjo@11890 35 cp -a $install/usr/bin $fs/usr
erjo@11890 36 cp -a $install/usr/lib/*.so* $fs/usr/lib
erjo@11890 37 cp -a $install/usr/lib/$PACKAGE/*.so* $fs/usr/lib/$PACKAGE
erjo@11890 38
erjo@11890 39 cp -pa $install/etc $fs/
erjo@11941 40 cp -pa $stuff/c-icapd $fs/etc/init.d
erjo@11890 41
erjo@11890 42 # Cleanup
erjo@11890 43 rm -f $fs/usr/bin/c-icap-config
erjo@11941 44
erjo@11941 45 # Fix config file
erjo@11941 46 sed -i -e "s|YourServerName|localhost|" \
erjo@11998 47 -e "s|/usr/var/log|/var/log/c-icap/|" \
erjo@11998 48 -e "s|/usr/var/run/|/var/run/c-icap|" \
erjo@11941 49 -e "s|/usr/etc|/etc/c-icap|" $fs/etc/c-icap/c-icap.conf
erjo@11941 50 chmod -x $fs/etc/c-icap/*
erjo@11941 51
erjo@11890 52 }
erjo@11941 53
erjo@11941 54 post_install()
erjo@11941 55 {
pascal@15660 56 [ -z "$1" -a ! -s /aufs-umount.sh ] && /etc/init.d/c-icapd start
erjo@11941 57
erjo@11941 58 cat <<EOF
erjo@11941 59
erjo@11941 60 ----
erjo@11941 61 To start $PACKAGE server you can run :
erjo@11941 62
erjo@11941 63 /etc/init.d/$PACKAGE start
erjo@11941 64
erjo@11941 65 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
erjo@11941 66 ----
erjo@11941 67 EOF
erjo@11941 68 }
erjo@11941 69
erjo@11941 70 pre_remove(){
erjo@11941 71
erjo@11941 72 echo "Stopping daemon..."
erjo@11941 73 if (ps | grep -q c-icap); then
pascal@17552 74 chroot "$1/" /etc/init.d/c-icapd stop
erjo@11941 75 fi
erjo@11941 76 }
erjo@11941 77 post_remove()
erjo@11941 78 {
erjo@11941 79 echo "Removing stalled files..."
pascal@18730 80 test -d "$1/var/log/c-icap" && rm -rf "$1/var/log/c-icap"
pascal@18730 81 test -d "$1/usr/run/c-icap" && rm -rf "$1/usr/run/c-icap"
erjo@11941 82 }