Skip to content

Commit ce627a0

Browse files
committed
Add libdmg-hfsplus
1 parent b86c327 commit ce627a0

5 files changed

Lines changed: 133 additions & 0 deletions

File tree

archlinux/libdmg-hfsplus/PKGBUILD

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Maintainer: glank <glank@practicerom.com>
2+
3+
_commit="fb17a7b"
4+
5+
pkgname="libdmg-hfsplus"
6+
pkgver=0
7+
pkgrel=1
8+
pkgdesc="Portable libraries and utilities that manipulate HFS+ volumes and Apple's DMG images"
9+
arch=("x86_64")
10+
url="https://github.com/glankk/libdmg-hfsplus"
11+
license=("GPL-3.0-or-later")
12+
depends=("bzip2" "glibc" "openssl" "xz" "zlib")
13+
makedepends=(
14+
"cmake" "git"
15+
"bzip2" "openssl" "xz" "zlib"
16+
)
17+
options=("!debug")
18+
source=("${pkgname}::git+${url}.git#commit=${_commit}")
19+
sha512sums=("SKIP")
20+
21+
pkgver() {
22+
rev=$(git -C "${pkgname}" rev-list --count "${_commit}")
23+
printf "r%s.%s" "${rev}" "${_commit}"
24+
}
25+
26+
prepare() {
27+
cmake -S "${pkgname}" -B build \
28+
-DCMAKE_BUILD_TYPE=Release \
29+
-DCMAKE_INSTALL_PREFIX=/usr
30+
}
31+
32+
build() {
33+
make -C build all
34+
}
35+
36+
package() {
37+
make DESTDIR="${pkgdir}" -C build install/strip
38+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
libdmg-hfsplus (0-1) unstable; urgency=medium
2+
3+
* Initial release
4+
5+
-- glank <glank@practicerom.com> Sat, 9 Aug 2025 10:43:00 +0200
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Source: libdmg-hfsplus
2+
Maintainer: glank <glank@practicerom.com>
3+
Section: devel
4+
Priority: optional
5+
Build-Depends: cmake, git, libbz2-dev, liblzma-dev, libssl-dev, zlib1g-dev
6+
Standards-Version: 4.5.1
7+
Homepage: https://github.com/glankk/libdmg-hfsplus
8+
9+
Package: libdmg-hfsplus
10+
Architecture: any
11+
Section: devel
12+
Priority: optional
13+
Depends: libc6, libbz2-1.0, liblzma5, libssl3, zlib1g
14+
Description: Portable libraries and utilities that manipulate HFS+ volumes and
15+
Apple's DMG images
16+
Homepage: https://github.com/glankk/libdmg-hfsplus

debian/libdmg-hfsplus/debian/rules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/make -f
2+
3+
%:
4+
@bash -ec ". debian/rules.sh; $(@);"
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
_commit="fb17a7b"
2+
3+
pkgname="libdmg-hfsplus"
4+
pkgrel=1
5+
url="https://github.com/glankk/libdmg-hfsplus"
6+
7+
pkgver() {
8+
rev=$(git -C "${pkgname}" rev-list --count "${_commit}")
9+
printf "0.r%s.%s" "${rev}" "${_commit}"
10+
}
11+
12+
clean() {
13+
rm -f debian/files
14+
rm -rf debian/tmp/
15+
rm -rf "${pkgname}"/
16+
}
17+
18+
prepare() {
19+
git clone -- "${url}.git" "${pkgname}"
20+
git -C "${pkgname}" checkout "${_commit}"
21+
22+
host=$(dpkg-architecture -q DEB_HOST_GNU_TYPE)
23+
cpu=$(dpkg-architecture -q DEB_HOST_GNU_CPU)
24+
25+
cmake -S "${pkgname}" -B build \
26+
-DCMAKE_BUILD_TYPE=Release \
27+
-DCMAKE_INSTALL_PREFIX=/usr \
28+
-DCMAKE_SYSTEM_PROCESSOR=${cpu} \
29+
-DCMAKE_C_COMPILER=${host}-gcc \
30+
-DCMAKE_CXX_COMPILER=${host}-g++ \
31+
-DCMAKE_SYSROOT=/usr/${host} \
32+
-DCMAKE_SYSROOT_COMPILE= \
33+
-DCMAKE_SYSROOT_LINK=
34+
}
35+
36+
build() {
37+
build-arch
38+
}
39+
40+
build-arch() {
41+
prepare
42+
43+
make -C build all
44+
}
45+
46+
build-indep() {
47+
return 0
48+
}
49+
50+
binary() {
51+
binary-arch
52+
}
53+
54+
binary-arch() {
55+
pkgdir="${PWD}"/debian/tmp
56+
pkgver=$(pkgver)
57+
58+
rm -rf "${pkgdir}"
59+
mkdir -p "${pkgdir}"
60+
mkdir -p "${pkgdir}"/DEBIAN
61+
62+
make DESTDIR="${pkgdir}" -C build install/strip
63+
64+
dpkg-gencontrol -v"${pkgver}-${pkgrel}" -p"${pkgname}"
65+
dpkg-deb -b "${pkgdir}" ..
66+
}
67+
68+
binary-indep() {
69+
return 0
70+
}

0 commit comments

Comments
 (0)