aboutsummaryrefslogblamecommitdiffstats
path: root/community/polkit-elogind/APKBUILD
blob: b1590abce70ddd98241431582de8b56f07a6450d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                                              
            
        

                                                                                                  
                                      



                                                                              
                                                                                      
                                                                     
                                                                                  
                                   


                         







                                    




                       


















                                                



            



                  
                                              



                                                         
 



                                                                              

                                                                                                    

                                                                   

                                                                         

 




                             

                                                                                                                                                                 

                                                                                                                                                   
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=polkit-elogind
pkgver=0.118
pkgrel=1
pkgdesc="Application development toolkit for controlling system-wide privileges (elogind variant)"
url="https://www.freedesktop.org/wiki/Software/polkit/"
arch="all !mips !mips64 !s390x" # Rust
license="GPL-2.0-or-later"
options="suid !check"
depends_dev="dbus-glib-dev"
makedepends="$depends_dev expat-dev glib-dev gtk-doc gobject-introspection-dev
	intltool autoconf automake libtool bash mozjs78-dev elogind-dev linux-pam-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc"
source="https://www.freedesktop.org/software/polkit/releases/polkit-$pkgver.tar.gz
	make-innetgr-optional.patch
	alpine-polkit.pam
	polkit.initd
	"
install="polkit-elogind.pre-install"
pkgusers="polkitd"
pkggroups="polkitd"
provides="polkit"

builddir="$srcdir/polkit-$pkgver"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--libexecdir=/usr/lib/polkit-1 \
		--localstatedir=/var \
		--disable-static \
		--enable-introspection \
		--with-authfw=pam \
		--with-os-type=alpine \
		--disable-gtk-doc \
		--disable-gtk-doc-html \
		--disable-gtk-doc-pdf \
		--disable-libelogind \
		--disable-systemd \
		--enable-libsystemd-login
	make
}

check() {
	make check
}

package() {
	# Set SHELL as a workaround for #10081
	make SHELL=/bin/bash DESTDIR="$pkgdir" \
		 dbusconfdir=/usr/share/dbus-1/system.d \
		 rulesdir=/usr/share/polkit-1/rules.d \
		 install

	# Use our own polkit rules, upstream may change them
	install -m644 "$srcdir"/alpine-polkit.pam "$pkgdir"/etc/pam.d/polkit-1

	# See polkit's configure script which tells us what permissions to set
	chown -R polkitd:polkitd "$pkgdir"/etc/polkit-1/rules.d "$pkgdir"/usr/share/polkit-1/rules.d
	chmod -R 700 "$pkgdir"/etc/polkit-1/rules.d "$pkgdir"/usr/share/polkit-1/rules.d
	chmod 4755 "$pkgdir"/usr/lib/polkit-1/polkit-agent-helper-1
	chmod 4755 "$pkgdir"/usr/bin/pkexec

	install -Dm755 "$srcdir"/polkit.initd "$pkgdir"/etc/init.d/polkit
}

dev() {
	provides="polkit-dev"
	default_dev
}

sha512sums="3d412f40c903cfaf68530f9c0cb616106f8edf43bec6805de129f8bb9cb4e64c98da6bf02caa3ef5619974f3e2df7a70564f08b92901662453477e9005752b4e  polkit-0.118.tar.gz
0c47751e928a91ce3a477a330ef38b8f6f003b515c94e7fb9842e6f2043be43d749ab7390cc1dbcf1fa6128b62cf0eab353d4f8855d68e595bc53777512f4562  make-innetgr-optional.patch
f5102dc00d390b3a3c957b62e1712db778c7ffb7378f3d8e816c0757c11a308c5d5303e42595b0d6add9839247c773880cd34e56afacc89eb6efaadf9aae7826  alpine-polkit.pam
f6e5ac0ed41feb392dfd104979ec577c5936f3db2bd252b12b7b9b2609a0901dae38bebec1ea65ccf4f427860b520383ae4d2c66fb74ab986c715f6b0ad50473  polkit.initd"