aboutsummaryrefslogblamecommitdiffstats
path: root/community/modemmanager/APKBUILD
blob: 85d45823e89cb9868df91a0be2681af5c8e1f862 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                           
             
        

                                                           
                                        
                                                
                        
                                                                
                                                                     

                                                                      





                        
                                
         
                                                                                     
                      
                       
                                       

         







                                           
                                                          
                                 
            


         
                      
                             




                                                                        


           

                                                      



                                                                          
                                                                                          

                                                   
                              

                                                                




                                                                                              

 
         


                  
                                                                                                                                                                        
                                                                                                                                                    
                                                                                                                                                     
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=modemmanager
pkgver=1.14.2
pkgrel=0
pkgdesc="ModemManager library"
url="http://www.freedesktop.org/wiki/Software/ModemManager"
arch="all !mips !mips64 !s390x" # polkit
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
depends_dev="libmm-glib"
makedepends="$depends_dev gobject-introspection-dev gtk-doc vala
	libgudev-dev polkit-dev libmbim-dev libqmi-dev linux-headers"
checkdepends="glib-dev"
options="!check" # https://bugs.freedesktop.org/show_bug.cgi?id=101197
subpackages="
	$pkgname-lang
	$pkgname-doc
	libmm-glib:libmm
	$pkgname-dev
	$pkgname-openrc
	$pkgname-bash-completion
	"
source="https://www.freedesktop.org/software/ModemManager/ModemManager-$pkgver.tar.xz
	$pkgname.rules
	$pkgname.initd"
builddir="$srcdir"/ModemManager-$pkgver

build() {
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-polkit=permissive \
		--enable-gtk-doc \
		--disable-static \
		--with-dbus-sys-dir=/etc/dbus-1/system.d \
		--enable-vala=yes
	make
}

libmm() {
	cd "$builddir"
	mkdir -p "$subpkgdir"
	make DESTDIR="$subpkgdir" -C libmm-glib install
	# move dev files to modemmnager-dev
	mv -f "$subpkgdir/usr/include/libmm-glib" "$pkgdir/usr/include/"
	mv -f "$subpkgdir/usr/share/gir-1.0" "$pkgdir/usr/share/"
	rmdir "$subpkgdir/usr/include" "$subpkgdir/usr/share"
}

package() {
	make DESTDIR="$pkgdir" install
	make DESTDIR="$pkgdir" -C libmm-glib uninstall
	rmdir "$pkgdir"/usr/lib/girepository-1.0 # in libmm-glib
	rm -rf "$pkgdir"/usr/share/dbus-1/system-services #systemd-service
	mkdir -p "$pkgdir/usr/share/polkit-1/rules.d"
	install -m644 -D "$srcdir/$pkgname.rules" \
		"$pkgdir/usr/share/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
	install -m755 -D "$srcdir/$pkgname.initd" \
		"$pkgdir/etc/init.d/$pkgname"
	# post-install message
	mkdir -p "$pkgdir/usr/share/doc/$pkgname"
	cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <<EOF
If your USB modem shows up as a Flash drive when you plug it in:

install 'usb-modeswitch' to automatically switch to USB modem mode whenever you plug it in.
To control your modem without the root password: add your user account to the 'plugdev' group.
EOF
}

check() {
	make check
}

sha512sums="850217895df92e4037e94afd0947de8079d2b49b085d96af7cdb5714ed87d40e9a892750c8392370c940a259b00bfccad67fa09a2a8861ce1e6d50aa355f7bc9  ModemManager-1.14.2.tar.xz
8d736f477649e42c05b34ac55391353c7f0c17138d039e049b16b07624d86fd9968ef1aa14672a63decf8b2c0ae984a34a0770322198b326775efba58f566685  modemmanager.rules
e2769401c52c3fff0b8057c13c6f7f2e5656c2963239ecbd647a01e66a344f6852cf2ba065358248315945bdf6ebbc4976903565b12ace2d15df6586dcc1de5b  modemmanager.initd"