summaryrefslogblamecommitdiff
path: root/system/coreutils/APKBUILD
blob: 6201d14ed5e14f0ecea9a62af30827833faeb3e3 (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.2
pkgrel=1
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
	csplit-vm-test.patch
	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
	test-tee-avoid-eintr.patch
	revert-gnulib-getcwd-speedup-linux.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="7e3108fefba4ef995cc73c64ac5f4e09827a44649a97ddd624eb61d67ce82da5ed6dc8c0f79d3e269f5cdb7d43877a61ef5b93194dd905bec432a7e31f9f479c  coreutils-9.2.tar.xz
5f5eab0ae69b26d0906b890a7681b9b5bbfefdd87f3caf84e307d6764ec4a23ec764c18df3404d5ceda9b90b4b5fef150aac7a6d709afa0be6f90a25793fd62c  csplit-vm-test.patch
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
15a91b343b6c4d6ef31b322cd2787893eacccb81a7e0202aeac17c3aa18130e6feb5ddb32f39187b4cf2a5d6a9a536a0a6f992e4da90d954a72f158d0df6e4ba  test-df-symlink-bindmount.patch
43bf6a1934a22478c93f4680180f1d7f157c9a5f7320bd8efac3f6e850db08bb57d32f4658eca34ee711e61538ef1932bd6abf730b4d2371e1a128c6d148939f  test-tee-avoid-eintr.patch
84b8c141052a5db99f4d470a0f6f74ca01041f04e573ca0774f69a931bbe061c1b95cf5b09ab5f08f4322e04c6fc124449f368b51ccd6e837dec686b8521d86a  revert-gnulib-getcwd-speedup-linux.patch"
[ "${CBUILD}" != "${CHOST}" ] && sha512sums="
bae804f057252c25452ac178c545dc2c4b4775cbfbdcfd4775edd1a4ed6507882bfac39e2b11ad01b74230ca48d761bf62f11bde5bcbc35a6e5a61cbe4a46e36  051_all_coreutils-mangen.patch
"
return 0