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

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents b84b01f3048e
children e19ff076dc63
line source
1 # SliTaz package receipt v2.
3 PACKAGE="c-icap"
4 VERSION="0.5.5"
5 CATEGORY="network"
6 SHORT_DESC="Implementation of an ICAP server"
7 MAINTAINER="devel@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="openssl-dev zlib-dev bzip2-dev brotli-dev openldap-dev pcre-dev"
15 SPLIT="$PACKAGE-dev"
17 compile_rules() {
18 ./configure \
19 --sysconfdir=/etc/c-icap \
20 --enable-large-files \
21 $CONFIGURE_ARGS &&
22 fix libtool &&
23 make &&
24 make install || return 1
26 mkdir -p $install/var/log/c-icap/
27 install -Dm755 $stuff/c-icapd $install/etc/init.d/c-icapd
29 # Fix config file
30 sed -i -e "s|YourServerName|localhost|;
31 s|/usr/var/log|/var/log/c-icap/|;
32 s|/usr/var/run/|/var/run/c-icap|;
33 s|/usr/etc|/etc/c-icap|" $install/etc/c-icap/c-icap.conf
34 chmod -x $install/etc/c-icap/*
35 }
37 genpkg_rules() {
38 case $PACKAGE in
39 c-icap)
40 copy @std var/log/c-icap/
41 DEPENDS="brotli bzlib libldap libpcre openssl zlib"
42 CONFIG_FILES="/etc/c-icap/"
43 ;;
44 *-dev)
45 copy @dev
46 ;;
47 esac
48 }
50 post_install_c_icap() {
51 [ -z "$1" -a ! -s /aufs-umount.sh ] && /etc/init.d/c-icapd start
53 [ -n "$quiet" ] || cat <<EOF
55 .------------------------------------------------.
56 | To start c-icap server you can run: |
57 | |
58 | /etc/init.d/c-icapd start |
59 | |
60 | or add c-icapd to RUN_DAEMONS in /etc/rcS.conf |
61 '------------------------------------------------'
62 EOF
63 }
65 pre_remove_c_icap() {
66 echo "Stopping daemon..."
67 if (ps | grep -q c-icap); then
68 chroot "$1/" /etc/init.d/c-icapd stop
69 fi
70 }
71 post_remove_c_icap() {
72 echo "Removing stalled files..."
73 [ -d "$1/var/log/c-icap" ] && rm -rf "$1/var/log/c-icap"
74 [ -d "$1/usr/run/c-icap" ] && rm -rf "$1/usr/run/c-icap"
75 }