From 2638c723dc92d082fda03496f0c06fd182484223 Mon Sep 17 00:00:00 2001 From: tibequadorian Date: Thu, 9 Jul 2020 02:57:24 +0200 Subject: [PATCH] New package: fatsort-1.6.2.605 --- srcpkgs/fatsort/template | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 srcpkgs/fatsort/template diff --git a/srcpkgs/fatsort/template b/srcpkgs/fatsort/template new file mode 100644 index 00000000000..cb344b28c30 --- /dev/null +++ b/srcpkgs/fatsort/template @@ -0,0 +1,28 @@ +# Template file for 'fatsort' +pkgname=fatsort +version=1.6.2.605 +revision=1 +build_style=gnu-makefile +build_helper="qemu" +hostmakedepends="help2man" +short_desc="Utility that sorts FAT12, FAT16, FAT32 and exFAT partitions" +maintainer="tibequadorian " +license="GPL-2.0-or-later" +homepage="https://fatsort.sourceforge.io/" +distfiles="${SOURCEFORGE_SITE}/project/fatsort/fatsort-${version}.tar.xz" +checksum=08cafa36f86ab89e7a3241d437df9af8a008549d7d13416256b7aaa006d5ffb7 + +post_patch() { + vsed -e 's|/usr/local|/usr|g' -i Makefile + vsed -e 's|/usr/local/sbin|/usr/bin|g' -i src/Makefile + + # help2man needs to run the target executable + if [ "$CROSS_BUILD" ]; then + cat > src/fatsort.qemu <<-EOF + #!/bin/sh + qemu-${XBPS_TARGET_QEMU_MACHINE}-static ${wrksrc}/src/fatsort "\$@" + EOF + chmod 755 src/fatsort.qemu + vsed -i man/Makefile -e 's|../src/fatsort|../src/fatsort.qemu|' + fi +}