aboutsummaryrefslogblamecommitdiffstats
path: root/community/networkmanager/APKBUILD
blob: 2df998aae484e53a6c9a8dd3d4b776e0bb4981c5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                               
                                                           
                                              
                      
              
        

                                                    

                                             
                          
                                                      
                                                   
                         
                

                     
                    
                                 
               
                



                   
               



                        
                  



                      
                   
            
             
                    
                  
               
         






                                                
                                                                                                     


                      
         
                                          
 
                                         
 
         
                      












                                                   
                                                

                             
                               

                                       
                              
                              
                                                            
                             
                        
                                       
                                                 
                                                   


         
                                            


           
                                                              
 

                                                                                                 

                                                   
                                                                                                                   
                                                       
                              
                                                                                  
                                                                  

                                                                                                                            



                                                                                                                                                      
   

 






                                                              
            
                                                                                                                                                               
                                                                                                                                                     
                                                                                                                                                      
                                                                                                                                                      
 
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=networkmanager
pkgver=1.32.12
pkgrel=1
pkgdesc="Network Management daemon"
url="https://wiki.gnome.org/Projects/NetworkManager"
# mips64, s390x and riscv64 blocked by polkit
arch="all !mips64 !s390x !riscv64"
license="GPL-2.0-or-later"
depends="iptables dbus mobile-broadband-provider-info"
install="$pkgname.pre-install $pkgname.pre-upgrade"
makedepends="$depends_dev
	curl-dev
	dbus-glib-dev
	eudev-dev
	libgudev-dev
	gobject-introspection-dev
	gtk-doc
	intltool
	libndp-dev
	libnl3-dev
	libsoup-dev
	libteam-dev
	libxslt
	linux-headers
	modemmanager-dev
	newt-dev
	nss-dev
	gnutls-dev
	polkit-dev
	ppp-dev
	readline-dev
	util-linux-dev
	jansson-dev
	vala
	meson
	py3-gobject3
	libpsl-dev
	python3
	"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-lang
	$pkgname-openrc
	$pkgname-bash-completion:bashcomp:noarch
	"
source="https://download.gnome.org/sources/NetworkManager/${pkgver:0:4}/NetworkManager-$pkgver.tar.xz
	$pkgname.conf
	$pkgname.initd
	$pkgname.rules
	"
options="!check" # fail to compile on musl

builddir="$srcdir"/NetworkManager-$pkgver

build() {
	abuild-meson \
		-Dsystemdsystemunitdir=no \
		-Dudev_dir=/lib/udev \
		-Diptables=/sbin/iptables \
		-Ddnsmasq=/usr/sbin/dnsmasq \
		-Dmodify_system=true \
		-Dselinux=false \
		-Dsystemd_journal=false \
		-Dlibaudit=no \
		-Diwd=true \
		-Dpppd=/usr/sbin/pppd \
		-Dconfig_plugins_default=ifupdown \
		-Difupdown=true \
		-Ddhcpcd=true \
		-Dconfig_dhcp_default=internal \
		-Dvapi=true \
		-Dtests=no \
		-Dpolkit=true \
		-Dsession_tracking=no \
		-Dqt=false \
		-Dofono=true \
		-Dcrypto=nss \
		-Ddbus_conf_dir=/usr/share/dbus-1/system.d \
		-Ddocs=true \
		. output
	# fix build with many buildjobs
	ninja -C output introspection/libnmdbus.a
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -m755 -D "$srcdir"/networkmanager.initd "$pkgdir"/etc/init.d/networkmanager
	install -m644 -D "$srcdir/$pkgname.conf" "$pkgdir"/etc/NetworkManager/NetworkManager.conf
	# allow plugdev users to modify connections
	install -m644 -D "$srcdir/$pkgname.rules" \
		"$pkgdir/usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
	mkdir -p "$pkgdir/usr/share/apk-tools/$pkgname"
	# post-install message
	mv "$pkgdir/usr/share/doc/NetworkManager" "$pkgdir/usr/share/doc/$pkgname"
	cat > "$pkgdir"/usr/share/doc/$pkgname/README.alpine <<EOF
To modify system network connections without the root password: add your user account to the 'plugdev' group, or use Polkit.

To use iwd instead of the default wpa_supplicant install iwd, start its service and add the following to your /etc/NetworkManager/NetworkManager.conf:

[device]
wifi.backend=iwd
EOF
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	amove usr/share/bash-completion
}
sha512sums="
b8dfa409302781fdab19790afeb7f4396875e282d6983e2c5775294c8c13d3c1036dee69a37bf6e4fb2a2e80504c8e792780b6a9c1262616e57860da5ebc0e61  NetworkManager-1.32.12.tar.xz
0f79016bf717dea43830962f524deae8d1cedc274376e40bd912ebe63208c5b1c3b7a5aa14379da19020c587dbd5588df2f0066ca1540070a226983a43e4159b  networkmanager.conf
5ac6d11b588c479de9c7e1fef79ed0a2c04dc159a2173636a6a77a2867c839cc1609860756109e9e794f23a02238a6d94834d8fb6fcb81a6be3ef1dbf4a34e6f  networkmanager.initd
9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6  networkmanager.rules
"