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

                                                                                     
                                                                                                      
                                                               
                                                                                            
                                                                                                
                                                                                           


                       
                       


         








                                           

                                   

                                 
            


           
                                      
                                                  




                                     
                                                        




                                 
                                              




                                       
                                                         



                                         
                         
                                     


                                                               


            






                                                            
                                                                                                                                                               
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=zfs
pkgver=2.0.1
pkgrel=0
pkgdesc="ZFS for Linux"
url="https://zfsonlinux.org"
arch="all !armhf !armv7"
license="CDDL-1.0"
provides="spl" # Mitigate upgrade conflicts
depends_dev="attr-dev e2fsprogs-dev glib-dev libtirpc-dev openssl-dev util-linux-dev"
makedepends="$depends_dev automake autoconf libtool linux-headers python3-dev py3-cffi py3-setuptools"
options="!check" # need to be run on live system w/ ZFS loaded.
subpackages="$pkgname-dev $pkgname-doc $pkgname-openrc $pkgname-libs $pkgname-dracut::noarch
	$pkgname-udev $pkgname-scripts $pkgname-utils-py:utils_py:noarch py3-pyzfs:pyzfs:noarch"
source="https://github.com/zfsonlinux/zfs/releases/download/zfs-$pkgver/zfs-$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	export LIBS="$LIBS -lintl"
	./configure --prefix=/usr \
		--with-tirpc \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-config=user \
		--with-udevdir=/lib/udev \
		--disable-systemd \
		--disable-static \
		--with-python=3 \
		--enable-pyzfs
	make
}

package() {
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/share/initramfs-tools
}

dracut() {
	pkgdesc="$pkgdesc (dracut)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/dracut "$subpkgdir"/usr/lib
}

udev() {
	pkgdesc="$pkgdesc (udev)"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/udev "$subpkgdir"/lib
}

scripts() {
	pkgdesc="$pkgdesc (scripts)"
	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/share/zfs "$subpkgdir"/usr/share
}

utils_py() {
	pkgdesc="$pkgdesc (python utils)"
	depends="python3"
	mkdir -p "$subpkgdir"/usr/bin
	local file
	for file in arc_summary arcstat dbufstat; do
		mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin
	done
}

pyzfs() {
	pkgdesc="$pkgdesc (Python lib to interact with ZFS)"
	depends="python3 $pkgname"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib
}

sha512sums="7e8f490605cb80747a2e471ac5bdd184038f514da379ea7cadf14d5635d5f4cd1b47a7c92c95c4c1b7b0cf5ec22ea905d0d3e8d24e71733484f34cc9429f0f94  zfs-2.0.1.tar.gz"