connman: convert to new package format

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-03 21:03:54 +02:00
parent 80a7920bf9
commit 8a7431104c
4 changed files with 118 additions and 207 deletions

View File

@ -1,78 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
if [ "$PPTP_SUPPORT" = yes ]; then
CONNMAN_PPTP="--enable-pptp"
export PPPD="/usr/sbin/pppd"
export PPTP="/usr/sbin/pptp"
else
CONNMAN_PPTP="--disable-pptp"
fi
if [ "$OPENVPN_SUPPORT" = yes ]; then
CONNMAN_OPENVPN="--enable-openvpn --with-openvpn=/usr/sbin/openvpn"
else
CONNMAN_OPENVPN="--disable-openvpn"
fi
export WPASUPPLICANT="/usr/bin/wpa_supplicant"
cd $PKG_BUILD
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
--enable-shared \
--disable-gtk-doc \
--disable-debug \
--disable-hh2serial-gps \
--disable-openconnect \
$CONNMAN_OPENVPN \
--disable-vpnc \
--disable-l2tp \
$CONNMAN_PPTP \
--disable-iospm \
--disable-tist \
--disable-session-policy-local \
--disable-test \
--disable-nmcompat \
--disable-polkit \
--disable-selinux \
--enable-loopback=builtin \
--enable-ethernet=builtin \
--enable-wifi=builtin \
--disable-bluetooth \
--disable-ofono \
--disable-dundee \
--disable-pacrunner \
--disable-neard \
--disable-wispr \
--disable-tools \
--enable-client \
--enable-datafiles \
--disable-silent-rules \
make storagedir=/storage/.cache/connman vpn_storagedir=/storage/.config/vpn-config statedir=/run/connman

View File

@ -1,81 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
add_user system x 430 430 "service" "/var/run/connman" "/bin/sh"
add_group system 430
mkdir -p $INSTALL/etc
ln -sf /var/cache/resolv.conf $INSTALL/etc/resolv.conf
mkdir -p $INSTALL/etc/connman
cp $PKG_BUILD/src/main.conf $INSTALL/etc/connman
sed -i $INSTALL/etc/connman/main.conf \
-e "s|^# BackgroundScanning.*|BackgroundScanning = true|g" \
-e "s|^# FallbackNameservers.*|FallbackNameservers = 8.8.8.8,8.8.4.4|g" \
-e "s|^# PreferredTechnologies.*|PreferredTechnologies = ethernet,wifi,cellular|g" \
-e "s|^# TetheringTechnologies.*|TetheringTechnologies = wifi|g" \
-e "s|^# PersistentTetheringMode.*|PersistentTetheringMode = true|g"
mkdir -p $INSTALL/etc/dbus-1/system.d
cp $PKG_BUILD/src/connman.conf $INSTALL/etc/dbus-1/system.d
mkdir -p $INSTALL/usr/bin
cp -P $PKG_BUILD/client/connmanctl $INSTALL/usr/bin
mkdir -p $INSTALL/usr/lib/connman
cp -P $PKG_BUILD/test/* $INSTALL/usr/lib/connman
mkdir -p $INSTALL/usr/lib/connman/plugins
cp -P $PKG_BUILD/plugins/.libs/*.so* $INSTALL/usr/lib/connman/plugins || true
mkdir -p $INSTALL/usr/lib/connman/scripts
cp -P $PKG_BUILD/scripts/.libs/*.so* $INSTALL/usr/lib/connman/scripts || true
mkdir -p $INSTALL/usr/sbin
cp -P $PKG_BUILD/src/connmand $INSTALL/usr/sbin
mkdir -p $INSTALL/usr/config
cp $PKG_DIR/config/hosts.conf $INSTALL/usr/config
mkdir -p $INSTALL/usr/share/connman/
cp $PKG_DIR/config/settings $INSTALL/usr/share/connman/
if [ "$PPTP_SUPPORT" = yes -o "$OPENVPN_SUPPORT" = yes ]; then
mkdir -p $INSTALL/etc/dbus-1/system.d
cp $PKG_BUILD/vpn/connman-vpn-dbus.conf $INSTALL/etc/dbus-1/system.d
mkdir -p $INSTALL/usr/lib/connman/plugins-vpn
cp -P $PKG_BUILD/vpn/plugins/.libs/*.so $INSTALL/usr/lib/connman/plugins-vpn || true
mkdir -p $INSTALL/usr/sbin
cp -P $PKG_BUILD/vpn/connman-vpnd $INSTALL/usr/sbin
mkdir -p $INSTALL/usr/share/dbus-1/system-services
cp -P $PKG_BUILD/vpn/net.connman.vpn.service $INSTALL/usr/share/dbus-1/system-services
fi
if [ "$OPENVPN_SUPPORT" = yes ]; then
mkdir -p $INSTALL/usr/lib/connman/scripts
cp -P $PKG_BUILD/scripts/openvpn-script $INSTALL/usr/lib/connman/scripts
fi

View File

@ -1,48 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="connman"
PKG_VERSION="d052eb3"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.connman.net"
#PKG_URL="http://www.kernel.org/pub/linux/network/connman/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS="glib readline dbus iptables wpa_supplicant ntp Python pygobject dbus-python"
PKG_BUILD_DEPENDS="toolchain glib readline dbus iptables"
PKG_PRIORITY="optional"
PKG_SECTION="network"
PKG_SHORTDESC="connman: Network manager daemon"
PKG_LONGDESC="The ConnMan project provides a daemon for managing internet connections within embedded devices running the Linux operating system. The Connection Manager is designed to be slim and to use as few resources as possible, so it can be easily integrated. It is a fully modular system that can be extended, through plug-ins, to support all kinds of wired or wireless technologies. Also, configuration methods, like DHCP and domain name resolving, are implemented using plug-ins. The plug-in approach allows for easy adaption and modification for various use cases."
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
if [ "$PPTP_SUPPORT" = yes ]; then
PKG_DEPENDS="$PKG_DEPENDS ppp pptp"
PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS ppp pptp"
fi
if [ "$OPENVPN_SUPPORT" = yes ]; then
PKG_DEPENDS="$PKG_DEPENDS openvpn"
PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS openvpn"
fi

View File

@ -0,0 +1,118 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="connman"
PKG_VERSION="d052eb3"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.connman.net"
#PKG_URL="http://www.kernel.org/pub/linux/network/connman/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS="glib readline dbus iptables wpa_supplicant ntp Python pygobject dbus-python"
PKG_BUILD_DEPENDS_TARGET="toolchain glib readline dbus iptables"
PKG_PRIORITY="optional"
PKG_SECTION="network"
PKG_SHORTDESC="connman: Network manager daemon"
PKG_LONGDESC="The ConnMan project provides a daemon for managing internet connections within embedded devices running the Linux operating system. The Connection Manager is designed to be slim and to use as few resources as possible, so it can be easily integrated. It is a fully modular system that can be extended, through plug-ins, to support all kinds of wired or wireless technologies. Also, configuration methods, like DHCP and domain name resolving, are implemented using plug-ins. The plug-in approach allows for easy adaption and modification for various use cases."
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
if [ "$PPTP_SUPPORT" = yes ]; then
PKG_DEPENDS="$PKG_DEPENDS ppp pptp"
PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET ppp pptp"
CONNMAN_PPTP="--enable-pptp PPPD=/usr/sbin/pppd PPTP=/usr/sbin/pptp"
else
CONNMAN_PPTP="--disable-pptp"
fi
if [ "$OPENVPN_SUPPORT" = yes ]; then
PKG_DEPENDS="$PKG_DEPENDS openvpn"
PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET openvpn"
CONNMAN_OPENVPN="--enable-openvpn --with-openvpn=/usr/sbin/openvpn"
else
CONNMAN_OPENVPN="--disable-openvpn"
fi
PKG_CONFIGURE_OPTS_TARGET="WPASUPPLICANT=/usr/bin/wpa_supplicant \
--disable-gtk-doc \
--disable-debug \
--disable-hh2serial-gps \
--disable-openconnect \
$CONNMAN_OPENVPN \
--disable-vpnc \
--disable-l2tp \
$CONNMAN_PPTP \
--disable-iospm \
--disable-tist \
--disable-session-policy-local \
--disable-test \
--disable-nmcompat \
--disable-polkit \
--disable-selinux \
--enable-loopback=builtin \
--enable-ethernet=builtin \
--enable-wifi=builtin \
--disable-bluetooth \
--disable-ofono \
--disable-dundee \
--disable-pacrunner \
--disable-neard \
--disable-wispr \
--disable-tools \
--enable-client \
--enable-datafiles \
--disable-silent-rules"
PKG_MAKE_OPTS_TARGET="storagedir=/storage/.cache/connman \
vpn_storagedir=/storage/.config/vpn-config \
statedir=/run/connman"
post_makeinstall_target() {
rm -rf $INSTALL/lib/systemd
mkdir $INSTALL/usr/bin
cp -P client/connmanctl $INSTALL/usr/bin
mkdir -p $INSTALL/etc
ln -sf /var/cache/resolv.conf $INSTALL/etc/resolv.conf
mkdir -p $INSTALL/etc/connman
cp ../src/main.conf $INSTALL/etc/connman
sed -i $INSTALL/etc/connman/main.conf \
-e "s|^# BackgroundScanning.*|BackgroundScanning = true|g" \
-e "s|^# FallbackNameservers.*|FallbackNameservers = 8.8.8.8,8.8.4.4|g" \
-e "s|^# PreferredTechnologies.*|PreferredTechnologies = ethernet,wifi,cellular|g" \
-e "s|^# TetheringTechnologies.*|TetheringTechnologies = wifi|g" \
-e "s|^# PersistentTetheringMode.*|PersistentTetheringMode = true|g"
mkdir -p $INSTALL/usr/config
cp $PKG_DIR/config/hosts.conf $INSTALL/usr/config
mkdir -p $INSTALL/usr/share/connman/
cp $PKG_DIR/config/settings $INSTALL/usr/share/connman/
}
post_install() {
add_user system x 430 430 "service" "/var/run/connman" "/bin/sh"
add_group system 430
}