# Description: Filesystem utilities for ReiserFS
# URL: https://en.wikipedia.org/wiki/ReiserFS
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: e2fsprogs

name=reiserfsprogs
version=3.6.27
release=2
source=(https://www.kernel.org/pub/linux/kernel/people/jeffm/$name/v$version/$name-$version.tar.xz
	$name-$version-loff_t.patch)

build () {
	cd $name-$version

	#fix build with glibc 2.28
	patch -p1 -i $SRC/$name-$version-loff_t.patch
	autoreconf -i

	./configure --prefix=/usr --sbindir=/sbin

	make
	make DESTDIR=$PKG install

	install -d $PKG/lib
	mv $PKG/usr/lib/libreiserfscore.so.* $PKG/lib
	ln -sf ../../lib/$(readlink $PKG/usr/lib/libreiserfscore.so) $PKG/usr/lib/libreiserfscore.so
}
