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

                                                   

             
                                                                           
                                         
          
                           
                                                               
                      
                                                             
                                                                                                              
                                    

           
                                                                        
                                                      
 
                       

                      
                    
 

         

                      
                                  
                     


                                 

                                 
                               


                                         
                                          



                                  






                              


           

                      
                                                                   
                       
 
                                       
                                        
 





                                                          


                                                                



                                                             
 

                                      

 
                                                                                                                                                                   
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=procps
pkgver=3.3.15
pkgrel=0
pkgdesc="Utilities for monitoring your system and processes on your system"
url="https://gitlab.com/procps-ng/procps"
arch="all"
license="GPL-2.0 LGPL-2.1+"
makedepends="ncurses-dev gettext-dev autoconf automake libtool"
checkdepends="dejagnu"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang libproc"
source="$pkgname-$pkgver.tar.gz::https://gitlab.com/procps-ng/$pkgname/repository/archive.tar.gz?ref=v$pkgver"
builddir="$srcdir/$pkgname-v$pkgver"

prepare() {
	# NOTE: Name of the tarball's top-level directory contains SHA1.
	ln -fs $srcdir/$pkgname-v$pkgver-* "$builddir"

	default_prepare

	cd "$builddir"
	./autogen.sh
}

build() {
	cd "$builddir"

	export LIBS="$LIBS -lintl"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/ \
		--bindir=/bin \
		--sbindir=/sbin \
		--libdir=/lib \
		--mandir=/usr/share/man \
		--sysconfdir=/etc \
		--docdir=/usr/share/doc \
		--datarootdir=/usr/share \
		--disable-static \
		--disable-w-from \
		--disable-kill \
		--disable-rpath \
		--with-ncurses
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" ldconfig=true install="install -D" \
		install

	# These binaries are identical.
	ln -sf pgrep "$pkgdir"/bin/pkill

	# Override BusyBox symlinks
	mkdir -p "$pkgdir"/usr/bin
	for i in free pgrep pkill pmap pwdx top uptime; do
		mv "$pkgdir"/bin/$i "$pkgdir"/usr/bin/$i
	done

	install -d "$pkgdir"/usr/lib
	mv "$pkgdir"/include "$pkgdir"/usr/ \
		&& mv "$pkgdir"/lib/pkgconfig "$pkgdir"/usr/lib/
}

libproc() {
	pkgdesc="Library for monitoring system and processes"

	install -d "$subpkgdir"/
	mv "$pkgdir"/lib "$subpkgdir"/
}

sha512sums="61017c98827cb9c325fe51f74e9e912cb6b130abdc69742678968a45f4a6f1f033bac4adaed19908197bc97a7426a7a27e04be361edb74ebff3dc0383b71fa53  procps-3.3.15.tar.gz"