wok-next rev 15396

Up: ofono (1.12)
author Dominique Corbex <domcox@slitaz.org>
date Sat Nov 02 20:37:08 2013 +0100 (2013-11-02)
parents 3a2e435dc5e6
children 9eebdd11a143
files ofono/receipt ofono/stuff/etc/init.d/ofono
line diff
     1.1 --- a/ofono/receipt	Sat Nov 02 20:33:46 2013 +0100
     1.2 +++ b/ofono/receipt	Sat Nov 02 20:37:08 2013 +0100
     1.3 @@ -1,23 +1,21 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="ofono"
     1.7 -VERSION="0.28"
     1.8 +VERSION="1.12"
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Stack for mobile telephony (GSM/UMTS) applications."
    1.11  MAINTAINER="slaxemulator@gmail.com"
    1.12 -LICENSE="GPL2"
    1.13 -TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.14 +TARBALL="$PACKAGE-$VERSION.tar.xz"
    1.15  WEB_SITE="http://ofono.org"
    1.16 -WGET_URL="http://www.kernel.org/pub/linux/network/$PACKAGE/$TARBALL"
    1.17 +WGET_URL="http://linux-kernel.uio.no/pub/linux/network/$PACKAGE/$TARBALL"
    1.18  
    1.19  DEPENDS="dbus glib udev"
    1.20 -BUILD_DEPENDS="dbus-dev udev-dev glib-dev"
    1.21 +BUILD_DEPENDS="dbus-dev udev-dev glib-dev bluez-dev \
    1.22 +mobile-broadband-provider-info-dev"
    1.23  
    1.24  # Rules to configure and make the package.
    1.25  compile_rules()
    1.26  {
    1.27 -	cd $src
    1.28 -	find . -name '*.[ch]*' | xargs sed -i 's|<glib/.*h|<glib.h|'
    1.29  	./configure \
    1.30  		--prefix=/usr \
    1.31  		--sysconfdir=/etc \
    1.32 @@ -25,7 +23,7 @@
    1.33  		--infodir=/usr/share/info \
    1.34  		--mandir=/usr/share/man \
    1.35  		$CONFIGURE_ARGS &&
    1.36 -	make && make DESTDIR=$DESTDIR install
    1.37 +	make && make DESTDIR=$PWD/_pkg install
    1.38  }
    1.39  
    1.40  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.41 @@ -33,14 +31,8 @@
    1.42  {
    1.43  	# sysconfdir
    1.44  	mkdir -p $fs/etc
    1.45 -	cp -a $install/etc/* $fs/etc
    1.46 -	# udev rules
    1.47 -	mkdir -p $fs/lib
    1.48 -	cp -a $install/lib/udev $fs/lib
    1.49 -	# bin
    1.50 +	cp -a $_pkg/etc/* $fs/etc
    1.51 +	# sbin
    1.52  	mkdir -p $fs/usr
    1.53 -	cp -a $install/usr/sbin $fs/usr
    1.54 -	# var
    1.55 -	mkdir -p $fs/var
    1.56 -	cp -a $install/var/lib $fs/var
    1.57 +	cp -a $_pkg/usr/sbin $fs/usr
    1.58  }
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/ofono/stuff/etc/init.d/ofono	Sat Nov 02 20:37:08 2013 +0100
     2.3 @@ -0,0 +1,58 @@
     2.4 +#!/bin/sh
     2.5 +# /etc/init.d/ofono : Start, stop and restart the Mobile Telephony manager
     2.6 +# on SliTaz, at boot time or with the command line.
     2.7 +#
     2.8 +# To start the Mobile Telephony manager at boot time, just put ofono in the
     2.9 +# $RUN_DAEMONS variable of /etc/rcS.conf and configure options with
    2.10 +# /etc/daemons.conf
    2.11 +#
    2.12 +. /etc/init.d/rc.functions
    2.13 +. /etc/daemons.conf
    2.14 +
    2.15 +NAME=Ofono
    2.16 +DESC="Mobile telephony Manager"
    2.17 +DAEMON=/usr/sbin/ofonod
    2.18 +OPTIONS=$OFONO_OPTIONS
    2.19 +PIDFILE=/run/ofono
    2.20 +
    2.21 +case "$1" in
    2.22 +  start)
    2.23 +    if [ -d $PIDFILE ] ; then
    2.24 +      echo "$NAME already running."
    2.25 +      exit 1
    2.26 +    fi
    2.27 +    echo -n "Starting $DESC: $NAME... "
    2.28 +    $DAEMON $OPTIONS
    2.29 +    status
    2.30 +    ;;
    2.31 +  stop)
    2.32 +    if [ -z "$(pidof ofonod)" ] ; then
    2.33 +      echo "$NAME is not running."
    2.34 +	  rm -rf $PIDFILE
    2.35 +      exit 1
    2.36 +    fi
    2.37 +    echo -n "Stopping $DESC: $NAME... "
    2.38 +	rm -rf $PIDFILE
    2.39 +	kill $(pidof ofonod)
    2.40 +	status
    2.41 +    ;;
    2.42 +  restart)
    2.43 +    if [ -z "$(pidof ofonod)" ]; then
    2.44 +      echo "$NAME is not running."
    2.45 +      exit 1
    2.46 +    fi
    2.47 +    echo -n "Restarting $DESC: $NAME... "
    2.48 +	rm -rf $PIDFILE
    2.49 +    kill $(pidof ofonod) &&
    2.50 +    sleep 2 &&
    2.51 +    $DAEMON $OPTIONS
    2.52 +    status
    2.53 +    ;;
    2.54 +  *)
    2.55 +	printf "\n\033[1mUsage:\033[0m /etc/init.d/%b [start|stop|restart]\n" \
    2.56 +		"$(basename $0)"
    2.57 +    exit 1
    2.58 +    ;;
    2.59 +esac
    2.60 +
    2.61 +exit 0