summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1bf8f4be60d034c4afab899041a0c70b8955288a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: @RubenKelevra <cyrond@gmail.com>
# Contributor: Snogard <snogardb at gmail dot com>
# Contributor: Jose Riha <jose1711 [at] gmail (dot) com>

pkgname=ratarmount-git
_pkgname="${pkgname%-git}"
pkgver=0.15.1.r0.g078b769
pkgrel=2
epoch=1
pkgdesc="Mount tar files via fusepy. Supports Recursive Mounting, Compressed Files, Read-Only Bind Mounting, Union Mounting and Write Overlays. A fast random access alternative to archivemount."
arch=('any')
url="https://github.com/mxmlnkn/$_pkgname"
license=('MIT')
depends=(
	'python>=3.12'
	'python-fusepy'
	'python-msgpack'
	'python-rapidjson'
	'python-ujson'
	'python-simplejson'
)
makedepends=(
	'git'
	'python-build'
	'python-installer'
	'python-wheel'
)
optdepends=(
        'python-rapidgzip: Support for gzip and bzip2 compressed tar files'
        'python-indexed-gzip: Option 2 for support for gzip-compressed tar files'
        'python-xz: Support for xz-compressed tar files' 
        'python-indexed-zstd: Support for zstd-compressed tar files'
        'python-rarfile: Support for rar-compressed tar files'
        'python-libarchive-c: Support for 7z, ar, cab, compress, cpio, iso, lrzip, lzma, lz4, lzip, lzo, warc, xar; (no random access)'
)
conflicts=("$_pkgname")
provides=("$_pkgname")
source=("git+$url")
b2sums=('SKIP')

pkgver() {
	cd "$_pkgname"
	git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^v//g'
}

build() {
	cd "$srcdir/$_pkgname/core"
	python -m build --wheel --no-isolation
	cd "$srcdir/$_pkgname"
	python -m build --wheel --no-isolation
}


package() {
	cd "$srcdir/$_pkgname/core"
	python -m installer --compile-bytecode=2 --destdir="$pkgdir" dist/*.whl
	cd "$srcdir/$_pkgname"
	python -m installer --compile-bytecode=2 --destdir="$pkgdir" dist/*.whl
	install -Dm755 "README.md" "$pkgdir/usr/share/doc/$_pkgname/README.md"
	install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}