wok rev 14329

Up: connman (1.12)
author Dominique Corbex <domcox@slitaz.org>
date Fri Apr 12 19:56:50 2013 +0200 (2013-04-12)
parents 45718bdd7508
children b9fe5b87a4de
files connman-plugin-3G/receipt connman-plugin-bluetooth/receipt connman-plugin-wifi/receipt connman/receipt connman/stuff/etc/init.d/connman
line diff
     1.1 --- a/connman-plugin-3G/receipt	Fri Apr 12 19:23:54 2013 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,20 +0,0 @@
     1.4 -# SliTaz package receipt.
     1.5 -
     1.6 -PACKAGE="connman-plugin-3G"
     1.7 -VERSION="0.64"
     1.8 -CATEGORY="network"
     1.9 -SHORT_DESC="Daemon for managing internet connections, 3G plugin"
    1.10 -MAINTAINER="slaxemulator@gmail.com"
    1.11 -DEPENDS="connman"
    1.12 -WANTED="connman"
    1.13 -
    1.14 -
    1.15 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.16 -genpkg_rules()
    1.17 -{
    1.18 -	mkdir -p $fs/usr/lib/connman/plugins
    1.19 -	for lib in ofono
    1.20 -	do
    1.21 -		cp -a $_pkg/usr/lib/connman/plugins/${lib}.so $fs/usr/lib/connman/plugins
    1.22 -	done
    1.23 -}
     2.1 --- a/connman-plugin-bluetooth/receipt	Fri Apr 12 19:23:54 2013 +0200
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,21 +0,0 @@
     2.4 -# SliTaz package receipt.
     2.5 -
     2.6 -PACKAGE="connman-plugin-bluetooth"
     2.7 -VERSION="0.64"
     2.8 -CATEGORY="network"
     2.9 -SHORT_DESC="Daemon for managing internet connections, bluetooth plugin"
    2.10 -MAINTAINER="slaxemulator@gmail.com"
    2.11 -DEPENDS="connman"
    2.12 -WANTED="connman"
    2.13 -
    2.14 -
    2.15 -# Rules to gen a SliTaz package suitable for Tazpkg.
    2.16 -genpkg_rules()
    2.17 -{
    2.18 -	mkdir -p $fs/usr/lib/connman/plugins
    2.19 -	for lib in bluetooth
    2.20 -	do
    2.21 -		cp -a $_pkg/usr/lib/connman/plugins/${lib}.so $fs/usr/lib/connman/plugins
    2.22 -	done
    2.23 -}
    2.24 -
     3.1 --- a/connman-plugin-wifi/receipt	Fri Apr 12 19:23:54 2013 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,20 +0,0 @@
     3.4 -# SliTaz package receipt.
     3.5 -
     3.6 -PACKAGE="connman-plugin-wifi"
     3.7 -VERSION="0.64"
     3.8 -CATEGORY="network"
     3.9 -SHORT_DESC="Daemon for managing internet connections, wifi plugin"
    3.10 -MAINTAINER="slaxemulator@gmail.com"
    3.11 -DEPENDS="connman"
    3.12 -WANTED="connman"
    3.13 -
    3.14 -# Rules to gen a SliTaz package suitable for Tazpkg.
    3.15 -genpkg_rules()
    3.16 -{
    3.17 -    mkdir -p $fs/usr/lib/connman/plugins
    3.18 -    for lib in wifi
    3.19 -    do
    3.20 -        cp -a $_pkg/usr/lib/connman/plugins/${lib}.so $fs/usr/lib/connman/plugins
    3.21 -    done
    3.22 -}
    3.23 -
     4.1 --- a/connman/receipt	Fri Apr 12 19:23:54 2013 +0200
     4.2 +++ b/connman/receipt	Fri Apr 12 19:56:50 2013 +0200
     4.3 @@ -1,20 +1,23 @@
     4.4  # SliTaz package receipt.
     4.5  
     4.6  PACKAGE="connman"
     4.7 -VERSION="0.83"
     4.8 +VERSION="1.12"
     4.9  CATEGORY="network"
    4.10  SHORT_DESC="Daemon for managing internet connections"
    4.11  MAINTAINER="slaxemulator@gmail.com"
    4.12 +TARBALL="$PACKAGE-$VERSION.tar.xz"
    4.13 +WEB_SITE="http://connman.net/"
    4.14 +WGET_URL="http://linux-kernel.uio.no/pub/linux/network/$PACKAGE/$TARBALL"
    4.15 +
    4.16  DEPENDS="glib dbus iptables gnutls libnl udev wpa_supplicant"
    4.17  BUILD_DEPENDS="glib-dev dbus-dev iptables iptables-dev gnutls-dev libnl-dev \
    4.18 -openconnect udev-dev wpa_supplicant"
    4.19 -TARBALL="$PACKAGE-$VERSION.tar.xz"
    4.20 -WEB_SITE="http://connman.net/"
    4.21 -WGET_URL="http://www.kernel.org/pub/linux/network/$PACKAGE/$TARBALL"
    4.22 +openconnect udev-dev wpa_supplicant readline-dev ncursesw-dev openvpn bluez-dev"
    4.23  
    4.24  # Rules to configure and make the package.
    4.25  compile_rules()
    4.26  {
    4.27 +	# add dependency on libncurses.so,
    4.28 +	sed -i 's/-lreadline/-lreadline -lncurses/' Makefile.in
    4.29  	cd $src
    4.30  	./configure \
    4.31  		--prefix=/usr \
    4.32 @@ -23,29 +26,13 @@
    4.33  		--infodir=/usr/share/info \
    4.34  		--mandir=/usr/share/man \
    4.35  		--disable-gtk-doc \
    4.36 -		--enable-ethernet \
    4.37 -		--enable-wifi \
    4.38 -		--enable-bluetooth \
    4.39 -		--enable-hh2serial-gps \
    4.40 -		--enable-ofono \
    4.41 -		--disable-dhclient \
    4.42 +		--disable-neard \
    4.43 +		--enable-threads \
    4.44  		--enable-openconnect \
    4.45 -		--disable-portal \
    4.46 -		--enable-loopback \
    4.47 -		--enable-dnsproxy \
    4.48 -		--disable-google \
    4.49 -		--disable-meego \
    4.50 -	--disable-iwmx \
    4.51 -		--enable-iospm \
    4.52 -		--disable-ntpd \
    4.53 -		--disable-polkit \
    4.54 +		--enable-vpnc \
    4.55 +		--enable-openvpn \
    4.56 +		--enable-polkit \
    4.57  		--enable-client \
    4.58 -		--enable-tools \
    4.59 -		--enable-test \
    4.60 -		--disable-fake \
    4.61 -		--disable-capng \
    4.62 -		--enable-udev \
    4.63 -		--enable-datafiles \
    4.64  		$CONFIGURE_ARGS &&
    4.65  	make && make DESTDIR=$DESTDIR install
    4.66  }
    4.67 @@ -55,14 +42,38 @@
    4.68  {
    4.69  	# dbus conf
    4.70  	mkdir -p $fs/etc
    4.71 -	cp -a $_pkg/etc/dbus-1 $fs/etc
    4.72 +	cp -a $install/etc/dbus-1 $fs/etc
    4.73  	# conman exec
    4.74 -	mkdir -p $fs/usr/lib/connman/plugins
    4.75 -	cp -a $_pkg/usr/sbin $fs/usr
    4.76 -	# plugins
    4.77 -	for lib in dnsproxy ethernet hh2serial-gps iospm loopback openconnect
    4.78 -	do
    4.79 -		cp -a $_pkg/usr/lib/connman/plugins/${lib}.so $fs/usr/lib/connman/plugins
    4.80 -	done
    4.81 +	mkdir -p $fs/usr
    4.82 +	cp -a $install/usr/sbin $fs/usr
    4.83 +	# libs
    4.84 +	mkdir -p $fs/usr/lib/connman/plugins-vpn
    4.85 +	cp -a $install/usr/lib/connman/plugins-vpn/*.so \
    4.86 +		$fs/usr/lib/connman/plugins-vpn
    4.87 +	# vpn scripts
    4.88 +	mkdir -p $fs/usr/lib/connman/scripts
    4.89 +	cp -a $install/usr/lib/connman/scripts $fs/usr/lib/connman
    4.90 +	# init script
    4.91 +	cp -a $stuff/etc $fs
    4.92  }
    4.93  
    4.94 +# Pre and post remove commands for Tazpkg
    4.95 +post_install()
    4.96 +{
    4.97 +	local root=$1
    4.98 +	if ! grep -q ^CONNMAND_OPTIONS $root/etc/daemons.conf; then
    4.99 +		echo '# Connman daemon options.' >> $root/etc/daemons.conf
   4.100 +		echo 'CONNMAND_OPTIONS=""' >> $root/etc/daemons.conf
   4.101 +		echo '' >> $root/etc/daemons.conf
   4.102 +	fi
   4.103 +	if [ -z "$root" ]; then
   4.104 +		/etc/init.d/connmand start || continue
   4.105 +	fi
   4.106 +}
   4.107 +
   4.108 +pre_remove()
   4.109 +{
   4.110 +	if [ -z "$1" ]; then
   4.111 +		/etc/init.d/connmand stop
   4.112 +	fi
   4.113 +}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/connman/stuff/etc/init.d/connman	Fri Apr 12 19:56:50 2013 +0200
     5.3 @@ -0,0 +1,58 @@
     5.4 +#!/bin/sh
     5.5 +# /etc/init.d/connman : Start, stop and restart the connexion manager
     5.6 +# on SliTaz, at boot time or with the command line.
     5.7 +#
     5.8 +# To start the connexion manager at boot time, just put connman in the
     5.9 +# $RUN_DAEMONS variable of /etc/rcS.conf and configure options with
    5.10 +# /etc/daemons.conf
    5.11 +#
    5.12 +. /etc/init.d/rc.functions
    5.13 +. /etc/daemons.conf
    5.14 +
    5.15 +NAME=Connman
    5.16 +DESC="Connexion Manager"
    5.17 +DAEMON=/usr/sbin/connmand
    5.18 +OPTIONS=$CONNMAN_OPTIONS
    5.19 +PIDFILE=/run/connman
    5.20 +
    5.21 +case "$1" in
    5.22 +  start)
    5.23 +    if [ -d $PIDFILE ] ; then
    5.24 +      echo "$NAME already running."
    5.25 +      exit 1
    5.26 +    fi
    5.27 +    echo -n "Starting $DESC: $NAME... "
    5.28 +    $DAEMON $OPTIONS
    5.29 +    status
    5.30 +    ;;
    5.31 +  stop)
    5.32 +    if [ -z "$(pidof connmand)" ] ; then
    5.33 +      echo "$NAME is not running."
    5.34 +      exit 1
    5.35 +    fi
    5.36 +    echo -n "Stopping $DESC: $NAME... "
    5.37 +	rm -rf $PIDFILE
    5.38 +	kill $(pidof connmand)
    5.39 +	status
    5.40 +    ;;
    5.41 +  restart)
    5.42 +    if [ -z "$(pidof connmand)" ]; then
    5.43 +      echo "$NAME is not running."
    5.44 +      exit 1
    5.45 +    fi
    5.46 +    echo -n "Restarting $DESC: $NAME... "
    5.47 +	rm -rf $PIDFILE
    5.48 +    kill $(pidof connmand) &&
    5.49 +    sleep 2 &&
    5.50 +    $DAEMON $OPTIONS
    5.51 +    status
    5.52 +    ;;
    5.53 +  *)
    5.54 +    echo ""
    5.55 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/$(basename $0) [start|stop|restart]"
    5.56 +    echo ""
    5.57 +    exit 1
    5.58 +    ;;
    5.59 +esac
    5.60 +
    5.61 +exit 0