wok-next diff antinat/receipt @ rev 20959

Fix minicom
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Sep 06 11:27:41 2018 +0200 (2018-09-06)
parents 835b3b8ce6ac
children d5aab818505e
line diff
     1.1 --- a/antinat/receipt	Fri Apr 13 07:14:16 2018 +0300
     1.2 +++ b/antinat/receipt	Thu Sep 06 11:27:41 2018 +0200
     1.3 @@ -9,31 +9,63 @@
     1.4  WEB_SITE="http://www.malsmith.net/antinat/"
     1.5  
     1.6  TARBALL="$PACKAGE-$VERSION.tar.bz2"
     1.7 -#WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
     1.8  WGET_URL="http://www.malsmith.net/download/?obj=antinat/$VERSION/antinat-source.tar.bz2"
     1.9  
    1.10 -BUILD_DEPENDS="gfortran expat-dev"
    1.11 -SPLIT="antinat-dev"
    1.12 +BUILD_DEPENDS="gfortran expat-dev pam-dev"
    1.13 +SPLIT="libantinat antinat antinat-dev antinat-pam:pam antinat-pam-dev:pam"
    1.14  
    1.15  compile_rules() {
    1.16 -	./configure $CONFIGURE_ARGS &&
    1.17 +	case $SET in
    1.18 +		'')  SET_ARGS='--disable-pam'; SET_CMD='s|#define ENABLE_PAM 1|#undef ENABLE_PAM|';;
    1.19 +		pam) SET_ARGS='--enable-pam';  SET_CMD='';;
    1.20 +	esac
    1.21 +
    1.22 +	export shrext_cmds='.so'	# shared libs lost their suffix without this
    1.23 +	./configure \
    1.24 +		$SET_ARGS \
    1.25 +		$CONFIGURE_ARGS &&
    1.26 +	sed -i "$SET_CMD" config.h &&
    1.27  	fix libtool &&
    1.28  	make &&
    1.29  	make install || return 1
    1.30  
    1.31  	# make file readable for web interface, revert file permissions in post-install
    1.32 -	chmod a+r $install/etc/antinat.xml
    1.33 +	chmod a+r $install/etc/antinat.xml $install/etc/pam.d/antinat
    1.34  }
    1.35  
    1.36  genpkg_rules() {
    1.37  	case $PACKAGE in
    1.38 +
    1.39 +		# common (pam and non-pam) libs
    1.40 +		libantinat)
    1.41 +			copy libantinat.so*
    1.42 +			CAT="libs|client library"
    1.43 +			;;
    1.44 +
    1.45 +		# non-pam
    1.46  		antinat)
    1.47 -			copy @std var/
    1.48 -			DEPENDS="expat"
    1.49 +			copy bin/antinat antinat.xml var/
    1.50 +			DEPENDS="expat libantinat"
    1.51  			CONFIG_FILES="/etc/antinat.xml"
    1.52  			;;
    1.53 -		*-dev)
    1.54 +		antinat-dev)
    1.55  			copy @dev
    1.56 +			DEPENDS="antinat"
    1.57 +			;;
    1.58 +
    1.59 +		# pam
    1.60 +		antinat-pam)
    1.61 +			copy bin/antinat antinat.xml var/ pam.d/
    1.62 +			DEPENDS="expat libantinat pam"
    1.63 +			CONFIG_FILES="/etc/antinat.xml"
    1.64 +			CAT="network|using PAM"
    1.65 +			PROVIDE="antinat:pam"
    1.66 +			;;
    1.67 +		antinat-pam-dev)
    1.68 +			copy @dev
    1.69 +			DEPENDS="antinat-pam"
    1.70 +			CAT="development|development files using PAM"
    1.71 +			PROVIDE="antinat-dev:pam"
    1.72  			;;
    1.73  	esac
    1.74  }
    1.75 @@ -41,3 +73,6 @@
    1.76  post_install_antinat() {
    1.77  	chmod 600 $1/etc/antinat.xml
    1.78  }
    1.79 +post_install_antinat_pam() {
    1.80 +	chmod 600 $1/etc/antinat.xml $1/etc/pam.d/antinat
    1.81 +}