wok-next diff c_icap/receipt @ rev 20122

cyrus-sasl-pam: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Oct 31 09:03:51 2017 +0100 (2017-10-31)
parents 8f50006d2661
children 4c1ed6983d05
line diff
     1.1 --- a/c_icap/receipt	Fri Mar 10 14:31:18 2017 +0200
     1.2 +++ b/c_icap/receipt	Tue Oct 31 09:03:51 2017 +0100
     1.3 @@ -1,58 +1,57 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="c_icap"
     1.8  VERSION="0.1.7"
     1.9  CATEGORY="network"
    1.10 -SHORT_DESC="Implementation of an ICAP server."
    1.11 +SHORT_DESC="Implementation of an ICAP server"
    1.12  MAINTAINER="erjo@slitaz.org"
    1.13  LICENSE="LGPL2.1"
    1.14  WEB_SITE="http://c-icap.sourceforge.net/"
    1.15 +
    1.16  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.17  WGET_URL="$SF_MIRROR/c-icap/$TARBALL"
    1.18  
    1.19 -DEPENDS=""
    1.20  BUILD_DEPENDS="zlib-dev"
    1.21 +SPLIT="c_icap-dev"
    1.22  
    1.23  # Rules to configure and make the package.
    1.24  compile_rules()
    1.25  {
    1.26 -	./configure  --sysconfdir=/etc/c-icap \
    1.27 +	./configure \
    1.28 +		--sysconfdir=/etc/c-icap \
    1.29  		--enable-large-files \
    1.30 -		$CONFIGURE_ARGS && make && make install
    1.31 +		$CONFIGURE_ARGS &&
    1.32 +	make && make install &&
    1.33 +
    1.34 +	mkdir -p $install/etc/init.d/ $install/var/log/c-icap/ &&
    1.35 +	install -m755 $stuff/c-icapd $install/etc/init.d &&
    1.36 +
    1.37 +	# Fix config file
    1.38 +	sed -i -e "s|YourServerName|localhost|;
    1.39 +		s|/usr/var/log|/var/log/c-icap/|;
    1.40 +		s|/usr/var/run/|/var/run/c-icap|;
    1.41 +		s|/usr/etc|/etc/c-icap|" $install/etc/c-icap/c-icap.conf &&
    1.42 +	chmod -x $install/etc/c-icap/*
    1.43  }
    1.44  
    1.45  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.46  genpkg_rules()
    1.47  {
    1.48 -	mkdir -p $fs/usr/lib/$PACKAGE \
    1.49 -		$fs/etc/init.d \
    1.50 -		$fs/var/log/c-icap
    1.51 -						
    1.52 -	cp -a $install/usr/bin $fs/usr
    1.53 -	cp -a $install/usr/lib/*.so* $fs/usr/lib
    1.54 -	cp -a $install/usr/lib/$PACKAGE/*.so* $fs/usr/lib/$PACKAGE
    1.55 -	
    1.56 -	cp -pa $install/etc $fs/
    1.57 -	cp -pa $stuff/c-icapd $fs/etc/init.d
    1.58 -	
    1.59 -	# Cleanup
    1.60 -	rm -f $fs/usr/bin/c-icap-config
    1.61 -	
    1.62 -	# Fix config file
    1.63 -	sed -i -e "s|YourServerName|localhost|" \
    1.64 -		-e "s|/usr/var/log|/var/log/c-icap/|" \
    1.65 -		-e "s|/usr/var/run/|/var/run/c-icap|" \
    1.66 -		-e "s|/usr/etc|/etc/c-icap|" $fs/etc/c-icap/c-icap.conf
    1.67 -	chmod -x $fs/etc/c-icap/*
    1.68 -		
    1.69 +	case $PACKAGE in
    1.70 +		c_icap)
    1.71 +			copy @std var/log/c-icap/
    1.72 +			;;
    1.73 +		*-dev)
    1.74 +			copy @dev
    1.75 +			;;
    1.76 +	esac
    1.77  }
    1.78  
    1.79 -post_install()
    1.80 -{
    1.81 +post_install_c_icap() {
    1.82  	[ -z "$1" -a ! -s /aufs-umount.sh ] && /etc/init.d/c-icapd start
    1.83 -			
    1.84 -	cat <<EOF
    1.85 -	
    1.86 +
    1.87 +	[ -n "$quiet" ] || cat <<EOF
    1.88 +
    1.89  ----
    1.90  To start $PACKAGE server you can run :
    1.91  
    1.92 @@ -63,16 +62,14 @@
    1.93  EOF
    1.94  }
    1.95  
    1.96 -pre_remove(){
    1.97 -		
    1.98 -		echo "Stopping daemon..."
    1.99 -		if (ps | grep -q c-icap); then
   1.100 -			chroot "$1/" /etc/init.d/c-icapd stop
   1.101 -		fi
   1.102 +pre_remove_c_icap() {
   1.103 +	echo "Stopping daemon..."
   1.104 +	if (ps | grep -q c-icap); then
   1.105 +		chroot "$1/" /etc/init.d/c-icapd stop
   1.106 +	fi
   1.107  }
   1.108 -post_remove()
   1.109 -{
   1.110 +post_remove_c_icap() {
   1.111  	echo "Removing stalled files..."
   1.112 -	test -d "$1/var/log/c-icap" && rm -rf "$1/var/log/c-icap"
   1.113 -	test -d "$1/usr/run/c-icap" && rm -rf "$1/usr/run/c-icap"
   1.114 +	[ -d "$1/var/log/c-icap" ] && rm -rf "$1/var/log/c-icap"
   1.115 +	[ -d "$1/usr/run/c-icap" ] && rm -rf "$1/usr/run/c-icap"
   1.116  }