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

                                                                                                     
 
                                                                 

                                                      



                     
           
                       






                                                  








                                         

                             
 
                                  


                                          


           
                                      





                                                                                  



                                              
                          
 
                                  
                                         

 

                                                                                                                                                                     
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cfengine
pkgver=3.15.1
pkgrel=0
pkgdesc="A systems administration tool for networks"
url="https://www.cfengine.com/"
arch="all"
license="GPL-3.0-only"
install="$pkgname.post-install"
makedepends="$depends_dev lmdb-dev openssl-dev bison flex-dev
	acl-dev pcre-dev linux-headers"
subpackages="$pkgname-doc $pkgname-masterfiles::noarch"
source="https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-$pkgver.tar.gz
	https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-$pkgver.tar.gz"

_builddirmasterfiles="$srcdir"/cfengine-masterfiles-${pkgver%_p*}
options="!check" # testsuite shows some unknown errors

# secfixes:
#   3.12.2-r0:
#     - CVE-2019-9929

prepare() {
	default_prepare

	# Also extract masterfiles
	cd $srcdir
	tar xf $pkgname-masterfiles-$pkgver.tar.gz
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--with-pic \
		--prefix=/usr \
		--enable-fhs \
		--localstatedir=/var \
		--mandir=/usr/share/man \
		--with-lmdb \
		--without-pam
	make

	cd "$_builddirmasterfiles"
	./configure \
		--prefix=/var/lib/cfengine
	make
}

package() {
	make install DESTDIR="$pkgdir"

	# not FHS but the tools seems to require those
	install -d "$pkgdir"/var/lib/cfengine/bin
	for i in "$pkgdir"/usr/bin/*; do
		ln -s ../../../../usr/bin/${i##*/} "$pkgdir"/var/lib/cfengine/bin/
	done
}

masterfiles() {
	pkgdesc="Cfengine default masterfiles"
	depends="cfengine"

	cd "$_builddirmasterfiles"
	make install DESTDIR="$subpkgdir"
}

sha512sums="5a40386f71c40d3f12a0eb0015bcd3cd581bc8604841f5976efac980f400acf0bfcbf4e1e871cf2937f8639dd5905ac4161c53df22a412ec3b478e585a0f26e6  cfengine-3.15.1.tar.gz
efa38b1868c94f97bc8af4c247ec71a8f4e3809b2da2b32d3759010fbea46c369de3bcd4cfc3de318e1278d91d28cf0bea42e2807316c295e608aaebd61bf391  cfengine-masterfiles-3.15.1.tar.gz"