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