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


                                 
                             
                                       
                                                  
                                                   





                                         
                     
                  

                                                                        
                                 
 
           

                       
                                                       

 
         
                                       


           
                                                                 


                                                                 
 
 

                                                            
                                                                                           
 



                                                                


                                                           
 



                                                                        





                                               

                                                                                                                                                                                                  
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abuild
pkgver=3.6.0
_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"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="
	apkbuild-cpan:cpan:noarch
	apkbuild-gem-resolver:gems:noarch
	abuild-rootbld:_rootbld:noarch
	$pkgname-doc
	"
options="suid !check"
pkggroups="abuild"
source="https://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.bz2
	0001-abuild-fetch-retry-download-if-byte-range-is-unsuppo.patch"
builddir="$srcdir"/abuild-$pkgver

prepare() {
	default_prepare

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

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

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-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/
}

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

sha512sums="fd5b8326171c9ab8f975e147995520990e7e1210929662ce4687267dad68812721ee9eb019bf7430f01abebc9278e6be1c0358d5b9bb2918bc96ccd5e2f1b3df  abuild-3.6.0.tar.bz2
9e81f17ab6d19b85f53c12d664224467152c3c0abf3411a1249616508ce6c86d92ebd1af3b0265e24734c1b858b310d90220b091b2d135c4660e41e36f77909b  0001-abuild-fetch-retry-download-if-byte-range-is-unsuppo.patch"