distribution/packages/network/connman/package.mk

93 lines
4 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
2023-05-09 19:21:47 +00:00
# Copyright (C) 2023-present Fewtarius
2022-02-05 14:23:32 +00:00
PKG_NAME="connman"
2023-05-09 19:21:47 +00:00
PKG_VERSION="7a0bc35c4b2d9bd1c6fd76866a8a86807a626591"
2022-02-05 14:23:32 +00:00
PKG_LICENSE="GPL"
PKG_SITE="http://www.connman.net"
2023-02-24 13:53:43 +00:00
PKG_URL="https://git.kernel.org/pub/scm/network/connman/connman.git/snapshot/connman-${PKG_VERSION}.tar.gz"
2022-08-30 11:33:34 +00:00
PKG_DEPENDS_TARGET="toolchain glib ncurses readline dbus iptables wpa_supplicant"
2022-02-05 14:23:32 +00:00
PKG_LONGDESC="A modular network connection manager."
PKG_TOOLCHAIN="autotools"
PKG_CONFIGURE_OPTS_TARGET="WPASUPPLICANT=/usr/bin/wpa_supplicant \
--srcdir=.. \
--disable-debug \
--disable-hh2serial-gps \
--disable-openconnect \
--disable-openvpn \
--disable-vpnc \
--disable-l2tp \
--disable-pptp \
--disable-iospm \
--disable-tist \
--disable-session-policy-local \
--disable-test \
--disable-nmcompat \
--disable-polkit \
--disable-selinux \
--enable-loopback \
--enable-ethernet \
--disable-gadget \
--enable-wifi \
--disable-bluetooth \
--disable-ofono \
--disable-dundee \
--disable-pacrunner \
--disable-neard \
--disable-wispr \
--disable-tools \
--disable-stats \
--enable-client \
--enable-datafiles \
--with-dbusconfdir=/etc \
--with-systemdunitdir=/usr/lib/systemd/system \
--disable-silent-rules"
if [ "$WIREGUARD_SUPPORT" = "yes" ]; then
PKG_CONFIGURE_OPTS_TARGET+=" --enable-wireguard=builtin"
else
PKG_CONGIGURE_OPTS_TARGET+=" --disable-wireguard"
fi
PKG_MAKE_OPTS_TARGET="storagedir=/storage/.cache/connman \
vpn_storagedir=/storage/.config/wireguard \
statedir=/run/connman"
post_makeinstall_target() {
2023-02-24 13:53:43 +00:00
rm -rf ${INSTALL}/usr/lib/systemd
rm -rf ${INSTALL}/usr/lib/tmpfiles.d/connman_resolvconf.conf
2022-02-05 14:23:32 +00:00
2023-02-24 13:53:43 +00:00
mkdir -p ${INSTALL}/usr/bin
cp -P client/connmanctl ${INSTALL}/usr/bin
2022-02-05 14:23:32 +00:00
2023-02-24 13:53:43 +00:00
mkdir -p ${INSTALL}/usr/lib/connman
cp -P ${PKG_DIR}/scripts/connman-setup ${INSTALL}/usr/lib/connman
2022-02-05 14:23:32 +00:00
2023-02-24 13:53:43 +00:00
mkdir -p ${INSTALL}/etc/connman
cp ../src/main.conf ${INSTALL}/etc/connman
sed -i ${INSTALL}/etc/connman/main.conf \
2022-02-05 14:23:32 +00:00
-e "s|^# BackgroundScanning.*|BackgroundScanning = true|g" \
-e "s|^# UseGatewaysAsTimeservers.*|UseGatewaysAsTimeservers = false|g" \
-e "s|^# FallbackNameservers.*|FallbackNameservers = 8.8.8.8,8.8.4.4|g" \
-e "s|^# FallbackTimeservers.*|FallbackTimeservers = 0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org|g" \
-e "s|^# PreferredTechnologies.*|PreferredTechnologies = ethernet,wifi,cellular|g" \
-e "s|^# TetheringTechnologies.*|TetheringTechnologies = wifi|g" \
-e "s|^# AllowHostnameUpdates.*|AllowHostnameUpdates = false|g" \
-e "s|^# PersistentTetheringMode.*|PersistentTetheringMode = true|g" \
-e "s|^# SingleConnectedTechnology.*|SingleConnectedTechnology = true|g" \
-e "s|^# NetworkInterfaceBlacklist = vmnet,vboxnet,virbr,ifb|NetworkInterfaceBlacklist = vmnet,vboxnet,virbr,ifb,docker,veth,zt,p2p|g"
2022-02-05 14:23:32 +00:00
2023-02-24 13:53:43 +00:00
mkdir -p ${INSTALL}/usr/share/connman/
cp ${PKG_DIR}/config/settings ${INSTALL}/usr/share/connman/
2022-02-05 14:23:32 +00:00
}
post_install() {
add_user system x 430 430 "service" "/var/run/connman" "/bin/sh"
add_group system 430
enable_service connman.service
}