aboutsummaryrefslogblamecommitdiffstats
path: root/main/abuild/APKBUILD
blob: 3252e9ce19922dfe83648dcd984438316f837a49 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                   
              
                
                    
        
                                         
                                              
          
                      
                                                                
                                    


                                 
                             
                                       
                                                  
                   
                                                   


                                         
                                 


                                      
              
                  
                                                                         
                                                              
         
                                 
 
           

                       
                                                       

 
         
                                       

 



                  
           
                                                                 


                                                                 
 
 

                                                            

                                                                                    
 



                                                                


                                                           
 



                                                                        

                                                               

                                                                                          




                                                                





                                               
            
                                                                                                                                                         
                                                                                                                                                                                        
 
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abuild
pkgver=3.8.0_rc2
_ver=${pkgver%_git*}
pkgrel=1
pkgdesc="Script to build Alpine Packages"
url="https://git.alpinelinux.org/cgit/abuild/"
arch="all"
license="GPL-2.0-only"
depends="fakeroot scanelf openssl apk-tools>=2.0.7-r1 libc-utils
	attr tar pkgconf patch lzip"
if [ "$CBUILD" = "$CHOST" ]; then
	depends="$depends curl"
fi
makedepends_build="pkgconfig"
makedepends_host="openssl-dev zlib-dev"
makedepends="$makedepends_host $makedepends_build"
checkdepends="bats"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="
	apkbuild-cpan:cpan:noarch
	apkbuild-gem-resolver:gems:noarch
	apkbuild-pypi:pypi:noarch
	abuild-rootbld:_rootbld:noarch
	$pkgname-doc
	"
options="suid"
pkggroups="abuild"
source="https://git.alpinelinux.org/abuild/snapshot/abuild-$pkgver.tar.xz
	0001-feat-abuild-add-support-for-pyX.Y-providers.patch
	"
builddir="$srcdir"/abuild-$pkgver

prepare() {
	default_prepare

	sed -i -e "/^CHOST=/s/=.*/=$CHOST/" abuild.conf
}

build() {
	make VERSION="$pkgver-r$pkgrel"
}

check() {
	make check
}

package() {
	make install VERSION="$pkgver-r$pkgrel" DESTDIR="$pkgdir"

	install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf
	install -d -m 775 -g abuild "$pkgdir"/var/cache/distfiles
}

cpan() {
	pkgdesc="Script to generate perl APKBUILD from CPAN"
	depends="perl perl-libwww perl-json perl-module-build perl-module-build-tiny
		perl-lwp-protocol-https"

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/apkbuild-cpan "$subpkgdir"/usr/bin/
}

gems() {
	pkgdesc="APKBUILD dependency resolver for RubyGems"
	depends="ruby ruby-augeas"

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/apkbuild-gem-resolver "$subpkgdir"/usr/bin/
}

pypi() {
	pkgdesc="Script to generate python3 APKBUILD from PYPI"
	depends="perl perl-libwww perl-json perl-module-build-tiny perl-lwp-protocol-https
	perl-ipc-system-simple"

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/apkbuild-pypi "$subpkgdir"/usr/bin/
}

_rootbld() {
	pkgdesc="Build packages in chroot"
	depends="abuild bubblewrap gettext git"
	mkdir -p "$subpkgdir"
}

sha512sums="
8e272666403ffb11a6d565e271754fa7b7ce90f5e746c8f5bd80694ece6786a12d27372d25880fe07e03bef18b3690e89e7a5a761766599a575c8db07e365b65  abuild-3.8.0_rc2.tar.xz
3cb6d4f5ad4f68924115562a20c9ea5cc728f1378a5c884a923b4dcb8260d0b9126c47f69d6b3588abba7cfdb3c45b857d757d4f82437d94ab022be4ed1b0c06  0001-feat-abuild-add-support-for-pyX.Y-providers.patch
"