summaryrefslogblamecommitdiff
path: root/system/coreutils/APKBUILD
blob: 40d6c9fafb85febd52c0db39a7497417283b31c8 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                      
                                                 
                 
          
        
                                                            
                                             
          
                  
                                   
                                                                           
                                                                           
                          
                                                                        
                                 
                                                                 
                                        
                                  

                                                      
                                 
                                       
                                      
         
                                                


                                      
         
                                              

                                 
                            


                                           

                                           
                              
                                                                            
                                               
                                           
                                                                          
 



                                              




            


                                                                       


           

                                      
                                                
                                                                                      
                        
                                  


                                                                

 
                                                                                                                                                                  
                                                                                                                                                                  
                                                                                                                                                            
                                                                                                                                                                                
                                                                                                                                                         
                                                                                                                                                           

                                                                                                                                                                 
                                             


                                                                                                                                                                
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=coreutils
pkgver=9.1
pkgrel=0
pkgdesc="Basic file, shell, and text manipulation utilities"
url="https://www.gnu.org/software/coreutils/"
arch="all"
license="GPL-3.0+"
makedepends="bash acl-dev attr-dev"
[ "${CBUILD}" = "${CHOST}" ] && makedepends="$makedepends perl gettext-tiny
						gettext-tiny-dev utmps-dev"
subpackages="$pkgname-doc"
[ "${CBUILD}" = "${CHOST}" ] && subpackages="$subpackages $pkgname-lang"
install="$pkgname.post-deinstall"
source="https://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz
	disable-csplit-io-err-test.patch
	disable-mbrtowc-test.patch
	gnulib-tests-dont-require-gpg-passphrase.patch
	gnulib-test-fixes.patch
	localename-test-fix.patch
	test-df-symlink-bindmount.patch
	tests-cp-proc-short-read.patch
	"
[ "${CBUILD}" != "${CHOST}" ] && source="$source
	051_all_coreutils-mangen.patch
	"

build() {
	LIBS="-lutmps -lskarnet" ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/ \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--datarootdir=/usr/share \
		--libexecdir=/usr/libexec \
		--enable-nls \
		--enable-no-install-program=groups,hostname,su,kill,uptime \
		--enable-install-program=arch \
		--with-packager="Adélie" \
		--with-packager-bug-reports="https://bts.adelielinux.org/"

	if [ "${CBUILD}" != "${CHOST}" ]; then
		for i in man/*.x; do
			touch "${i%x}1"
		done
	fi
	make
}

check() {
	# This prevents 'chgrp' tests from breaking inside APK Foundry.
	env COREUTILS_GROUPS='build' make -C tests check
	# We can't run gnulb-tests because of multiple chown failures.
}

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

	# stdbuf(1) requires a /usr/libexec/ .so
	# env(1) needs to be in /usr/bin/ for compatibility with the rest of the world
	# install(1) " "
	mkdir -p "$pkgdir"/usr/bin
	for USR_PROGRAM in env install stdbuf; do
		mv "$pkgdir"/bin/$USR_PROGRAM "$pkgdir"/usr/bin/
	done
}

sha512sums="a6ee2c549140b189e8c1b35e119d4289ec27244ec0ed9da0ac55202f365a7e33778b1dc7c4e64d1669599ff81a8297fe4f5adbcc8a3a2f75c919a43cd4b9bdfa  coreutils-9.1.tar.xz
bd8b5cecba59eba30458c8afa895877d39a987b989bc06b70cd6836e0ef684677aaadcb4949b58a713779fe1df1e15e3903e9be14e306671b86b69018b75de8b  disable-csplit-io-err-test.patch
595be7f580f8906467624959c7eddbd6d7007571d92668b6a1ea5543b73764035b44b02ab5f352c67ec6562a368f220af445edd0a0965fb9826bccfd25ddbdba  disable-mbrtowc-test.patch
fd97fccd661befc558b3afb3e32c82dd2cef511a05e6129d49540599297c1b59ab1f109e63a12f585a2348c26c28fb98330c348829d1fe61cf8149d0dd1c989c  gnulib-tests-dont-require-gpg-passphrase.patch
eaba7ad1c5b43d25dc96baaf6f01be5976f9f64c26ea55e1c78d6a3f12825f2f0e998aae7f2ad6d9b2637a3d11586ffe21b87fbbd3c1bb6c9898c5963cb2a32c  gnulib-test-fixes.patch
b1509e5678a05f24d6e764c047546e5e34a7fbd5edb59c7debedb144a0096d8ac247c7e2722a5f68c90751e5280bec743c9a6ed3e1433c1916294d68d7bca109  localename-test-fix.patch
43bb4cb8a330dc785ff8f09685e4fb2879df49b6944e2f64f9fa34a36740f392b115b3af57d481703690b9ee6c6f48ffb385b35cd128b1b40955f69dbd68bb3d  test-df-symlink-bindmount.patch
7dfc5d37cc22c06c88a027102482b33f46a962b6f71d9adb80225d8f68d0be0760894e4480c3f80018a4f725bb7d0779987a6d28bceb7e141e01dbad78f84c2d  tests-cp-proc-short-read.patch"
[ "${CBUILD}" != "${CHOST}" ] && sha512sums="
bae804f057252c25452ac178c545dc2c4b4775cbfbdcfd4775edd1a4ed6507882bfac39e2b11ad01b74230ca48d761bf62f11bde5bcbc35a6e5a61cbe4a46e36  051_all_coreutils-mangen.patch
"
return 0