wok-next view connman/receipt @ rev 20236
linux-cloop: tiny patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 06 10:18:18 2017 +0100 (2017-11-06) |
parents | 6c12ac1293fc |
children | 757d032c55c7 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="connman"
4 VERSION="1.21"
5 CATEGORY="network"
6 SHORT_DESC="Daemon for managing internet connections"
7 MAINTAINER="slaxemulator@gmail.com"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.xz"
10 WEB_SITE="http://connman.net/"
11 WGET_URL="http://linux-kernel.uio.no/pub/linux/network/$PACKAGE/$TARBALL"
13 BUILD_DEPENDS="glib-dev dbus-dev iptables-dev iptables gnutls-dev libnl-dev
14 openconnect udev-dev wpa_supplicant readline-dev ncurses-dev openvpn
15 bluez-dev ppp-dev"
16 SPLIT="connman connman-dev connman-tools"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 # add dependency on libncurses.so,
22 sed -i 's/-lreadline/-lreadline -lncurses/' Makefile.in
23 cd $src
24 ./configure \
25 --prefix=/usr \
26 --sysconfdir=/etc \
27 --localstatedir=/var \
28 --infodir=/usr/share/info \
29 --mandir=/usr/share/man \
30 --disable-gtk-doc \
31 --disable-neard \
32 --enable-polkit \
33 --enable-openconnect \
34 --enable-vpnc \
35 --enable-openvpn \
36 --enable-client \
37 --enable-test \
38 $CONFIGURE_ARGS &&
39 make && make DESTDIR=$DESTDIR install
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 case $PACKAGE in
46 connman)
47 DEPENDS="glib dbus iptables gnutls libnl libgcrypt udev \
48 wpa_supplicant dbus-helper"
49 SUGGESTED="xl2tpd pptpclient openvpn"
50 # dbus conf
51 mkdir -p $fs/etc
52 cp -a $install/etc/dbus-1 $fs/etc
53 # conman exec
54 mkdir -p $fs/usr
55 cp -a $install/usr/sbin $fs/usr
56 # libs
57 mkdir -p $fs/usr/lib/connman/plugins-vpn
58 cp -a $install/usr/lib/connman/plugins-vpn/*.so \
59 $fs/usr/lib/connman/plugins-vpn
60 # vpn scripts
61 mkdir -p $fs/usr/lib/connman/scripts
62 cp -a $install/usr/lib/connman/scripts $fs/usr/lib/connman
63 # share
64 cp -a $install/usr/share $fs/usr
65 # init script
66 cp -a $stuff/etc $fs
67 ;;
68 connman-dev)
69 CAT="network|Daemon for managing internet connections, dev files."
70 # vpn
71 mkdir -p $fs/usr/lib/connman/plugins-vpn
72 cp -a $install/usr/lib/connman/plugins-vpn/*a \
73 $fs/usr/lib/connman/plugins-vpn
74 # include
75 cp -a $install/usr/include $fs/usr
76 # pkg-config
77 cp -a $install/usr/lib/pkgconfig $fs/usr/lib
78 # test tools
79 mkdir -p $fs/usr/sbin
80 install -Dm755 $src/tools/*-test $fs/usr/sbin
81 install -Dm755 $src/tools/*-tool $fs/usr/sbin
82 install -Dm755 $src/tools/*-unit $fs/usr/sbin
83 install -Dm755 $src/tools/wispr $fs/usr/sbin
84 # python tools
85 install -Dm755 $src/test/* $fs/usr/sbin
86 ;;
87 connman-tools)
88 CAT="network|Daemon for managing internet connections, dev tools."
89 DEPENDS="readline ncurses"
90 # client
91 mkdir -p $fs/usr/sbin
92 install -Dm755 $src/client/connmanctl $fs/usr/sbin
93 ;;
94 esac
95 }
97 # Pre and post remove commands for Tazpkg
98 post_install_connman()
99 {
100 if ! grep -qs ^CONNMAND_OPTIONS "$1/etc/daemons.conf"; then
101 echo '# Connman daemon options.' >> "$1/etc/daemons.conf"
102 echo 'CONNMAND_OPTIONS=""' >> "$1/etc/daemons.conf"
103 echo '' >> "$1/etc/daemons.conf"
104 fi
105 if [ -z "$1" -a -s /etc/network.conf ]; then
106 /etc/init.d/connman start || /etc/init.d/connman restart
107 fi
108 }
110 pre_remove_connman()
111 {
112 if [ -z "$1" ]; then
113 /etc/init.d/connman stop 2> /dev/null
114 fi
115 }