wok-6.x annotate connman/receipt @ rev 25507

plop: cleanup
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 11 10:36:59 2023 +0000 (21 months ago)
parents 2a0479881723
children
rev   line source
slaxemulator@9315 1 # SliTaz package receipt.
slaxemulator@9315 2
slaxemulator@9315 3 PACKAGE="connman"
Hans-G?nter@22614 4 VERSION="1.37"
slaxemulator@9315 5 CATEGORY="network"
Hans-G?nter@22614 6 SHORT_DESC="Daemon for managing internet connections."
slaxemulator@9315 7 MAINTAINER="slaxemulator@gmail.com"
domcox@15384 8 LICENSE="GPL2"
pascal@24893 9 WEB_SITE="https://git.kernel.org/pub/scm/network/connman/connman.git/"
Hans-G?nter@22614 10
domcox@14329 11 TARBALL="$PACKAGE-$VERSION.tar.xz"
domcox@14329 12 WGET_URL="http://linux-kernel.uio.no/pub/linux/network/$PACKAGE/$TARBALL"
domcox@14329 13
domcox@15975 14 SUGGESTED="xl2tpd pptpclient openvpn"
Hans-G?nter@22614 15 DEPENDS="dbus dbus-helper glib gnutls iptables libgcrypt libnl
Hans-G?nter@22614 16 udev wpa_supplicant"
Hans-G?nter@22614 17 BUILD_DEPENDS="bluez-dev dbus-dev glib-dev gnutls-dev iptables
Hans-G?nter@22614 18 iptables-dev libgnutls libnl-dev ncursesw-dev openconnect
Hans-G?nter@22614 19 openvpn ppp-dev readline-dev udev-dev wpa_supplicant"
slaxemulator@9315 20
pascal@24436 21 # What is the latest version available today?
pascal@24436 22 current_version()
pascal@24436 23 {
pascal@24436 24 wget -O - ${WGET_URL%/*} 2>/dev/null | \
pascal@24436 25 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
pascal@24436 26 }
pascal@24436 27
slaxemulator@9315 28 # Rules to configure and make the package.
slaxemulator@9315 29 compile_rules()
slaxemulator@9315 30 {
domcox@14329 31 # add dependency on libncurses.so,
Hans-G?nter@22614 32 sed -i 's/-lreadline/-lreadline -lncurses/' \
Hans-G?nter@22614 33 Makefile.in
Hans-G?nter@22614 34
Hans-G?nter@22614 35 # not recognised after 1.21
Hans-G?nter@22614 36 # --disable-gtk-doc
Hans-G?nter@22614 37
Hans-G?nter@22614 38 ./configure \
Hans-G?nter@22614 39 --prefix=/usr \
Hans-G?nter@22614 40 --sysconfdir=/etc \
Hans-G?nter@22614 41 --localstatedir=/var \
Hans-G?nter@22614 42 --infodir=/usr/share/info \
Hans-G?nter@22614 43 --mandir=/usr/share/man \
Hans-G?nter@22614 44 --disable-neard \
Hans-G?nter@22614 45 --enable-polkit \
Hans-G?nter@22614 46 --enable-openconnect \
Hans-G?nter@22614 47 --enable-vpnc \
Hans-G?nter@22614 48 --enable-openvpn \
Hans-G?nter@22614 49 --enable-client \
Hans-G?nter@22614 50 --enable-test \
slaxemulator@9315 51 $CONFIGURE_ARGS &&
Hans-G?nter@22614 52 make &&
Hans-G?nter@22614 53 make DESTDIR=$DESTDIR install
slaxemulator@9315 54 }
slaxemulator@9315 55
slaxemulator@9315 56 # Rules to gen a SliTaz package suitable for Tazpkg.
slaxemulator@9315 57 genpkg_rules()
slaxemulator@9315 58 {
Hans-G?nter@22614 59 # dbus configuration
Hans-G?nter@22614 60 mkdir -p $fs/etc/dbus-1
Hans-G?nter@22614 61 cp -a $install/usr/share/dbus-1/system.d \
Hans-G?nter@22614 62 $fs/etc/dbus-1
Hans-G?nter@22614 63
Hans-G?nter@22614 64 # connman exec
domcox@14329 65 mkdir -p $fs/usr
Hans-G?nter@22614 66 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@22614 67
Hans-G?nter@22614 68 # libraries
domcox@14329 69 mkdir -p $fs/usr/lib/connman/plugins-vpn
domcox@14329 70 cp -a $install/usr/lib/connman/plugins-vpn/*.so \
Hans-G?nter@22614 71 $fs/usr/lib/connman/plugins-vpn
domcox@14329 72 # vpn scripts
domcox@14329 73 mkdir -p $fs/usr/lib/connman/scripts
Hans-G?nter@22614 74 cp -a $install/usr/lib/connman/scripts \
Hans-G?nter@22614 75 $fs/usr/lib/connman
Hans-G?nter@22614 76
domcox@15787 77 # share
Hans-G?nter@22614 78 mkdir -p $fs/usr/share
Hans-G?nter@22614 79 cp -a $install/usr/share/man $fs/usr/share
Hans-G?nter@22614 80 cp -a $install/usr/share/polkit-1 \
Hans-G?nter@22614 81 $fs/usr/share
Hans-G?nter@22614 82
domcox@14329 83 # init script
Hans-G?nter@22614 84 cp -a $stuff/etc $fs
slaxemulator@9315 85 }
slaxemulator@9315 86
domcox@14329 87 # Pre and post remove commands for Tazpkg
domcox@14329 88 post_install()
domcox@14329 89 {
Hans-G?nter@22614 90 if ! grep -qs ^CONNMAND_OPTIONS "$1/etc/daemons.conf"
Hans-G?nter@22614 91 then
pascal@18730 92 echo '# Connman daemon options.' >> "$1/etc/daemons.conf"
pascal@18730 93 echo 'CONNMAND_OPTIONS=""' >> "$1/etc/daemons.conf"
pascal@18730 94 echo '' >> "$1/etc/daemons.conf"
domcox@14329 95 fi
Hans-G?nter@22614 96
Hans-G?nter@22614 97 if [ -z "$1" -a -s /etc/network.conf ]
Hans-G?nter@22614 98 then
domcox@14383 99 /etc/init.d/connman start || /etc/init.d/connman restart
domcox@14329 100 fi
domcox@14329 101 }
domcox@14329 102
domcox@14329 103 pre_remove()
domcox@14329 104 {
Hans-G?nter@22614 105 if [ -z "$1" ]
Hans-G?nter@22614 106 then
pascal@15646 107 /etc/init.d/connman stop 2> /dev/null
domcox@14329 108 fi
domcox@14329 109 }