wok-current annotate c_icap/receipt @ rev 24935

updated mxml and mxml-dev (3.1 -> 3.3)
author Hans-G?nter Theisgen
date Thu Apr 14 07:26:00 2022 +0100 (2022-04-14)
parents 267887cc84bf
children ad0bc3efbf37
rev   line source
erjo@11890 1 # SliTaz package receipt.
erjo@11890 2
Hans-G?nter@24390 3 PACKAGE="c_icap" # rename as c-icap ?
Hans-G?nter@24390 4 VERSION="0.5.10"
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"
Hans-G?nter@24390 9 WEB_SITE="https://sourceforge.net/projects/c-icap/"
Hans-G?nter@24390 10 REPOLOGY="c-icap"
Hans-G?nter@20757 11
erjo@11890 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
erjo@11890 13 WGET_URL="$SF_MIRROR/c-icap/$TARBALL"
erjo@11890 14
erjo@11890 15 DEPENDS=""
erjo@11890 16 BUILD_DEPENDS=""
erjo@11890 17
pascal@24373 18 # What is the latest version available today?
pascal@24373 19 current_version()
pascal@24373 20 {
pascal@24373 21 wget -O - https://sourceforge.net/projects/c-icap/files/c-icap/ 2>/dev/null | \
pascal@24373 22 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24373 23 sed '/scope="row/!d;s|.*/c_icap-||;s|.tar.*||;q'
pascal@24373 24 }
pascal@24373 25
erjo@11890 26 # Rules to configure and make the package.
erjo@11890 27 compile_rules()
erjo@11890 28 {
Hans-G?nter@22576 29 ./configure \
Hans-G?nter@22576 30 --sysconfdir=/etc/c-icap \
Hans-G?nter@22576 31 --enable-large-files \
Hans-G?nter@20757 32 $CONFIGURE_ARGS &&
Hans-G?nter@20757 33 make &&
Hans-G?nter@20757 34 make install
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 {
Hans-G?nter@22576 40 mkdir -p $fs/usr/lib/$PACKAGE
Hans-G?nter@22576 41 mkdir -p $fs/etc/init.d
Hans-G?nter@22576 42 mkdir -p $fs/var/log/c-icap
Hans-G?nter@22576 43
Hans-G?nter@22576 44 cp -a $install/usr/bin $fs/usr
Hans-G?nter@22576 45 cp -a $install/usr/lib/*.so* $fs/usr/lib
Hans-G?nter@22576 46 cp -a $install/usr/lib/$PACKAGE/*.so* $fs/usr/lib/$PACKAGE
Hans-G?nter@22576 47 cp -pa $install/etc $fs/
Hans-G?nter@22576 48 cp -pa $stuff/c-icapd $fs/etc/init.d
Hans-G?nter@22576 49
erjo@11890 50 # Cleanup
Hans-G?nter@24390 51 rm -f $fs/usr/bin/c-icap-config
Hans-G?nter@22576 52
Hans-G?nter@22576 53 # Fix configuration file
Hans-G?nter@22576 54 sed -i -e "s|YourServerName|localhost|" \
Hans-G?nter@22576 55 -e "s|/usr/var/log|/var/log/c-icap/|" \
Hans-G?nter@22576 56 -e "s|/usr/var/run/|/var/run/c-icap|" \
Hans-G?nter@22576 57 -e "s|/usr/etc|/etc/c-icap|" \
Hans-G?nter@24390 58 $fs/etc/c-icap/c-icap.conf
Hans-G?nter@24390 59 chmod -x $fs/etc/c-icap/*
erjo@11890 60 }
erjo@11941 61
erjo@11941 62 post_install()
erjo@11941 63 {
Hans-G?nter@22576 64 [ -z "$1" -a ! -s /aufs-umount.sh ] &&
Hans-G?nter@22576 65 /etc/init.d/c-icapd start
Hans-G?nter@22576 66
erjo@11941 67 cat <<EOF
erjo@11941 68
erjo@11941 69 ----
Hans-G?nter@24392 70 To start c-icapd server you can run :
erjo@11941 71
Hans-G?nter@24392 72 /etc/init.d/c-icapd start
erjo@11941 73
Hans-G?nter@24392 74 Or add c-icapd to RUN_DAEMONS in /etc/rcS.conf
erjo@11941 75 ----
erjo@11941 76 EOF
erjo@11941 77 }
erjo@11941 78
Hans-G?nter@22576 79 pre_remove()
Hans-G?nter@22576 80 {
erjo@11941 81 echo "Stopping daemon..."
Hans-G?nter@22576 82 if (ps | grep -q c-icap)
Hans-G?nter@22576 83 then
pascal@17552 84 chroot "$1/" /etc/init.d/c-icapd stop
erjo@11941 85 fi
erjo@11941 86 }
Hans-G?nter@22576 87
erjo@11941 88 post_remove()
erjo@11941 89 {
erjo@11941 90 echo "Removing stalled files..."
pascal@18730 91 test -d "$1/var/log/c-icap" && rm -rf "$1/var/log/c-icap"
pascal@18730 92 test -d "$1/usr/run/c-icap" && rm -rf "$1/usr/run/c-icap"
erjo@11941 93 }