diff options
Diffstat (limited to 'testing/hfsprogs/APKBUILD')
-rw-r--r-- | testing/hfsprogs/APKBUILD | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/testing/hfsprogs/APKBUILD b/testing/hfsprogs/APKBUILD new file mode 100644 index 0000000000..ec9140bad7 --- /dev/null +++ b/testing/hfsprogs/APKBUILD @@ -0,0 +1,68 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=hfsprogs +_pkgname=diskdev_cmds +pkgver=540.1_p3 +_pkgver=${pkgver/_p/.linux} +pkgrel=0 +pkgdesc="Tools to create/check Apple HFS+ filesystems" +# We use modified version provided by Fedora's dev, not directly from Apple. +url="https://src.fedoraproject.org/rpms/hfsplus-tools" +arch="all" +license="APSL-2.0" +makedepends="clang libbsd-dev libressl-dev linux-headers util-linux-dev" +provides="$_pkgname=$pkgver-r$pkgrel" +subpackages="$pkgname-doc" +# Tarball made by Matthew Garrett (mjg59). +# https://src.fedoraproject.org/rpms/hfsplus-tools/blob/f27/f/hfsplus-tools.spec +source="http://cavan.codon.org.uk/~mjg59/$_pkgname/$_pkgname-$_pkgver.tar.gz + http://www.opensource.org/licenses/apsl-2.0.txt + fix-stdarg.patch + musl-compat.patch" +builddir="$srcdir/$_pkgname-$_pkgver" + +prepare() { + default_prepare + cd "$builddir" + + sed -i 's/[F|f]sck_hfs/fsck.hfsplus/g' fsck_hfs.tproj/fsck_hfs.8 + sed -i 's/[N|n]ewfs_hfs/mkfs.hfsplus/g' newfs_hfs.tproj/newfs_hfs.8 + + # Remove errant execute bits. + find . -type f -name '*.[ch]' -exec chmod -c -x {} + +} + +build() { + cd "$builddir" + + make +} + +check() { + cd "$builddir" + + ./fsck_hfs.tproj/fsck_hfs 2>&1 | grep 'usage: fsck_hfs' + ./newfs_hfs.tproj/newfs_hfs 2>&1 | grep 'usage: newfs_hfs' +} + +package() { + cd "$builddir" + + install -D -m 755 fsck_hfs.tproj/fsck_hfs "$pkgdir"/usr/sbin/fsck.hfs + install -D -m 755 newfs_hfs.tproj/newfs_hfs "$pkgdir"/usr/sbin/mkfs.hfsplus + ln -s fsck.hfs "$pkgdir"/usr/sbin/fsck.hfsplus + + install -D -m 644 fsck_hfs.tproj/fsck_hfs.8 \ + "$pkgdir"/usr/share/man/man8/fsck.hfsplus.8 + install -D -m 644 newfs_hfs.tproj/newfs_hfs.8 \ + "$pkgdir"/usr/share/man/man8/mkfs.hfsplus.8 + ln -s fsck.hfs.8 "$pkgdir"/usr/share/man/man8/fsck.hfs.8 + + install -D -m 644 "$srcdir"/apsl-2.0.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/APSL-2.0.txt +} + +sha512sums="3d88fcdec4bfd32a75b6dc75899748d8585371b641be86cfdfe54ade738a0612662dd008c1506c7e216325303217d0b5f188a9c4fdccfb48b2ce50333f212d9e diskdev_cmds-540.1.linux3.tar.gz +6217c0ae844c4f8c7ba08abf255d8bd594d487f13bc6b52c7ec19fc48fa8f8d1d1afe7a0d939220e3a2d9756aa3235d51492d5c155ac7d68971ef79e837cd0f9 apsl-2.0.txt +cff25de690f5ecc418380e5cbda3615d38ef9583ace60be9b7696c50e46bc35a29855b216ddb4daae79ff5b40f66ffbc03f613ab0ae1935ee9df6e69caed2e0b fix-stdarg.patch +34c73b0b57c8e8fa64abf34a9396b6dc218b1a1f06fec98fd52e77c81421cff249f4a65d5f26e692b1cb5e2424a871ecbf5b35eab5d3509506f6710406ff7577 musl-compat.patch" |