summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a69fc4c506474a7c5d6a5c1a0fca4472b6e66adf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Based on the files created for Arch Linux by:
# Christian Rebischke <Chris.Rebischke[at]archlinux[dot]org>
# Daniel Wallace <danielwallace at gtmanfred dot com>
# Lucas De Marchi <lucas.de.marchi@gmail.com>
# Tailinchu <tailinchu at gmail dot com>
# tormen <quickhelp@gmail.com>
# Maintainer: Andrey Vetrov <vetrov at mail dot ru>

pkgname=connman-git
pkgver=1.42.r10.g53964711
pkgrel=1
pkgdesc="Intel's modular network connection manager. Git version."
url="https://01.org/connman"
arch=('x86_64')
license=('GPL2')
provides=("connman=$pkgver")
conflicts=('connman')
makedepends=('bluez' 'wpa_supplicant' 'openconnect' 'openvpn' 'ppp' 'iwd' 'git')
depends=('dbus' 'iptables' 'gnutls' 'glib2')
optdepends=('bluez: Support for Bluetooth devices'
            'wpa_supplicant: for WiFi devices'
            'pptpclient: for ppp support'
            'openvpn: for VPN Support'
            'iwd: for WiFi devices')
source=("git+https://git.kernel.org/pub/scm/network/connman/connman.git"
        'allow_group_network.diff')
sha512sums=('SKIP' 'SKIP')

pkgver() {
    cd ${pkgname%-*}
    git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare(){
  cd ${pkgname%-*}
  patch -Np1 -i "${srcdir}/allow_group_network.diff"
}

build() {
	cd "$srcdir/${pkgname%-*}"
        autoreconf --install
        autoconf

        ./configure --prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --bindir=/usr/bin \
            --sbindir=/usr/bin \
            --with-systemdunitdir=/usr/lib/systemd/system \
            --enable-pptp \
            --enable-openconnect \
            --enable-vpnc \
            --enable-openvpn \
            --enable-polkit \
            --enable-client \
            --enable-nmcompat \
            --enable-pie \
            --enable-iwd
	make
}

package() {
  cd "$srcdir/${pkgname%-*}"
  make DESTDIR="$pkgdir" install
  install -Dm644 "${srcdir}/${pkgname%-*}/src/main.conf" "${pkgdir}/etc/connman/main.conf"
  find "${pkgdir}/usr" -name \*.service -exec sed -i 's/s\(bin\)/\1/' {} +
# See FS#48044
  sed -i 's/ProtectSystem=full/ProtectSystem=true/' "${pkgdir}"/usr/lib/systemd/system/connman.service
  rm -r "${pkgdir}"/usr/lib/tmpfiles.d

}