wok-next view c-icap/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents 82b613cfd1e0
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="c-icap"
4 VERSION="0.5.6"
5 CATEGORY="network"
6 SHORT_DESC="Implementation of an ICAP server"
7 MAINTAINER="maintainer@slitaz.org"
8 LICENSE="LGPL2.1"
9 WEB_SITE="http://c-icap.sourceforge.net/"
11 TARBALL="c_icap-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/c-icap/$TARBALL"
14 BUILD_DEPENDS="brotli-dev bzip2-dev openldap-dev openssl-dev pcre-dev zlib-dev"
15 SPLIT="$PACKAGE-dev"
17 COOKOPTS="force-arch" # different configs, .h
19 compile_rules()
20 {
21 ./configure \
22 --sysconfdir=/etc/c-icap \
23 --enable-large-files \
24 $CONFIGURE_ARGS &&
25 fix libtool &&
26 make &&
27 make install || return 1
29 mkdir -p $install/var/log/c-icap/
30 install -Dm755 $stuff/c-icapd $install/etc/init.d/c-icapd
32 # Fix configuration file
33 sed -i -e "s|YourServerName|localhost|;
34 s|/usr/var/log|/var/log/c-icap/|;
35 s|/usr/var/run/|/var/run/c-icap|;
36 s|/usr/etc|/etc/c-icap|" \
37 $install/etc/c-icap/c-icap.conf
38 chmod -x $install/etc/c-icap/*
39 }
41 genpkg_rules()
42 {
43 case $PACKAGE in
44 c-icap)
45 copy @std var/log/c-icap/
46 DEPENDS="brotli libbzip2 libldap libpcre openssl zlib"
47 CONFIG_FILES="/etc/c-icap/"
48 ;;
49 *-dev)
50 copy @dev
51 ;;
52 esac
53 }
55 post_install_c_icap()
56 {
57 [ -z "$1" -a ! -s /aufs-umount.sh ] && /etc/init.d/c-icapd start
59 [ -n "$quiet" ] || cat <<EOF
61 .------------------------------------------------.
62 | To start c-icap server you can run: |
63 | |
64 | /etc/init.d/c-icapd start |
65 | |
66 | or add c-icapd to RUN_DAEMONS in /etc/rcS.conf |
67 '------------------------------------------------'
68 EOF
69 }
71 pre_remove_c_icap()
72 {
73 echo "Stopping daemon..."
74 if (ps | grep -q c-icap)
75 then
76 chroot "$1/" /etc/init.d/c-icapd stop
77 fi
78 }
80 post_remove_c_icap()
81 {
82 echo "Removing stalled files..."
83 [ -d "$1/var/log/c-icap" ] && rm -rf "$1/var/log/c-icap"
84 [ -d "$1/usr/run/c-icap" ] && rm -rf "$1/usr/run/c-icap"
85 }