# HG changeset patch # User Dominique Corbex # Date 1365789410 -7200 # Node ID d8e8e6421a2cdd5192c849db9dce2c750b32f12a # Parent 45718bdd750852938d1e017dc178da7a5b0e6b6a Up: connman (1.12) diff -r 45718bdd7508 -r d8e8e6421a2c connman-plugin-3G/receipt --- a/connman-plugin-3G/receipt Fri Apr 12 19:23:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -# SliTaz package receipt. - -PACKAGE="connman-plugin-3G" -VERSION="0.64" -CATEGORY="network" -SHORT_DESC="Daemon for managing internet connections, 3G plugin" -MAINTAINER="slaxemulator@gmail.com" -DEPENDS="connman" -WANTED="connman" - - -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ - mkdir -p $fs/usr/lib/connman/plugins - for lib in ofono - do - cp -a $_pkg/usr/lib/connman/plugins/${lib}.so $fs/usr/lib/connman/plugins - done -} diff -r 45718bdd7508 -r d8e8e6421a2c connman-plugin-bluetooth/receipt --- a/connman-plugin-bluetooth/receipt Fri Apr 12 19:23:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -# SliTaz package receipt. - -PACKAGE="connman-plugin-bluetooth" -VERSION="0.64" -CATEGORY="network" -SHORT_DESC="Daemon for managing internet connections, bluetooth plugin" -MAINTAINER="slaxemulator@gmail.com" -DEPENDS="connman" -WANTED="connman" - - -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ - mkdir -p $fs/usr/lib/connman/plugins - for lib in bluetooth - do - cp -a $_pkg/usr/lib/connman/plugins/${lib}.so $fs/usr/lib/connman/plugins - done -} - diff -r 45718bdd7508 -r d8e8e6421a2c connman-plugin-wifi/receipt --- a/connman-plugin-wifi/receipt Fri Apr 12 19:23:54 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -# SliTaz package receipt. - -PACKAGE="connman-plugin-wifi" -VERSION="0.64" -CATEGORY="network" -SHORT_DESC="Daemon for managing internet connections, wifi plugin" -MAINTAINER="slaxemulator@gmail.com" -DEPENDS="connman" -WANTED="connman" - -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ - mkdir -p $fs/usr/lib/connman/plugins - for lib in wifi - do - cp -a $_pkg/usr/lib/connman/plugins/${lib}.so $fs/usr/lib/connman/plugins - done -} - diff -r 45718bdd7508 -r d8e8e6421a2c connman/receipt --- a/connman/receipt Fri Apr 12 19:23:54 2013 +0200 +++ b/connman/receipt Fri Apr 12 19:56:50 2013 +0200 @@ -1,20 +1,23 @@ # SliTaz package receipt. PACKAGE="connman" -VERSION="0.83" +VERSION="1.12" CATEGORY="network" SHORT_DESC="Daemon for managing internet connections" MAINTAINER="slaxemulator@gmail.com" +TARBALL="$PACKAGE-$VERSION.tar.xz" +WEB_SITE="http://connman.net/" +WGET_URL="http://linux-kernel.uio.no/pub/linux/network/$PACKAGE/$TARBALL" + DEPENDS="glib dbus iptables gnutls libnl udev wpa_supplicant" BUILD_DEPENDS="glib-dev dbus-dev iptables iptables-dev gnutls-dev libnl-dev \ -openconnect udev-dev wpa_supplicant" -TARBALL="$PACKAGE-$VERSION.tar.xz" -WEB_SITE="http://connman.net/" -WGET_URL="http://www.kernel.org/pub/linux/network/$PACKAGE/$TARBALL" +openconnect udev-dev wpa_supplicant readline-dev ncursesw-dev openvpn bluez-dev" # Rules to configure and make the package. compile_rules() { + # add dependency on libncurses.so, + sed -i 's/-lreadline/-lreadline -lncurses/' Makefile.in cd $src ./configure \ --prefix=/usr \ @@ -23,29 +26,13 @@ --infodir=/usr/share/info \ --mandir=/usr/share/man \ --disable-gtk-doc \ - --enable-ethernet \ - --enable-wifi \ - --enable-bluetooth \ - --enable-hh2serial-gps \ - --enable-ofono \ - --disable-dhclient \ + --disable-neard \ + --enable-threads \ --enable-openconnect \ - --disable-portal \ - --enable-loopback \ - --enable-dnsproxy \ - --disable-google \ - --disable-meego \ - --disable-iwmx \ - --enable-iospm \ - --disable-ntpd \ - --disable-polkit \ + --enable-vpnc \ + --enable-openvpn \ + --enable-polkit \ --enable-client \ - --enable-tools \ - --enable-test \ - --disable-fake \ - --disable-capng \ - --enable-udev \ - --enable-datafiles \ $CONFIGURE_ARGS && make && make DESTDIR=$DESTDIR install } @@ -55,14 +42,38 @@ { # dbus conf mkdir -p $fs/etc - cp -a $_pkg/etc/dbus-1 $fs/etc + cp -a $install/etc/dbus-1 $fs/etc # conman exec - mkdir -p $fs/usr/lib/connman/plugins - cp -a $_pkg/usr/sbin $fs/usr - # plugins - for lib in dnsproxy ethernet hh2serial-gps iospm loopback openconnect - do - cp -a $_pkg/usr/lib/connman/plugins/${lib}.so $fs/usr/lib/connman/plugins - done + mkdir -p $fs/usr + cp -a $install/usr/sbin $fs/usr + # libs + mkdir -p $fs/usr/lib/connman/plugins-vpn + cp -a $install/usr/lib/connman/plugins-vpn/*.so \ + $fs/usr/lib/connman/plugins-vpn + # vpn scripts + mkdir -p $fs/usr/lib/connman/scripts + cp -a $install/usr/lib/connman/scripts $fs/usr/lib/connman + # init script + cp -a $stuff/etc $fs } +# Pre and post remove commands for Tazpkg +post_install() +{ + local root=$1 + if ! grep -q ^CONNMAND_OPTIONS $root/etc/daemons.conf; then + echo '# Connman daemon options.' >> $root/etc/daemons.conf + echo 'CONNMAND_OPTIONS=""' >> $root/etc/daemons.conf + echo '' >> $root/etc/daemons.conf + fi + if [ -z "$root" ]; then + /etc/init.d/connmand start || continue + fi +} + +pre_remove() +{ + if [ -z "$1" ]; then + /etc/init.d/connmand stop + fi +} diff -r 45718bdd7508 -r d8e8e6421a2c connman/stuff/etc/init.d/connman --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connman/stuff/etc/init.d/connman Fri Apr 12 19:56:50 2013 +0200 @@ -0,0 +1,58 @@ +#!/bin/sh +# /etc/init.d/connman : Start, stop and restart the connexion manager +# on SliTaz, at boot time or with the command line. +# +# To start the connexion manager at boot time, just put connman in the +# $RUN_DAEMONS variable of /etc/rcS.conf and configure options with +# /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=Connman +DESC="Connexion Manager" +DAEMON=/usr/sbin/connmand +OPTIONS=$CONNMAN_OPTIONS +PIDFILE=/run/connman + +case "$1" in + start) + if [ -d $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if [ -z "$(pidof connmand)" ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + rm -rf $PIDFILE + kill $(pidof connmand) + status + ;; + restart) + if [ -z "$(pidof connmand)" ]; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + rm -rf $PIDFILE + kill $(pidof connmand) && + sleep 2 && + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/$(basename $0) [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0