blob: 8e1eee8bd2f7d1d358557808aed9cb85dc0a559b (
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
62
63
64
65
66
67
68
69
70
|
# Maintainer: absrdspc <repom2@riseup.net>
pkgname=arc_unpacker-git
_pkgname=arc_unpacker
pkgver=r2428.456834ec
pkgrel=7
pkgdesc="CLI tool for extracting images and sounds from visual novels."
arch=(x86_64)
url="https://github.com/vn-tools/arc_unpacker"
license=('GPL-3.0-or-later')
depends=('boost-libs' 'libpng' 'libjpeg-turbo' 'openssl' 'libwebp' 'zlib')
makedepends=('boost' 'cmake' 'git')
provides=('arc_unpacker-git' 'arc_unpacker')
conflicts=('arc_unpacker')
source=("$pkgname::git+https://github.com/vn-tools/arc_unpacker.git"
'catch.hpp::https://raw.githubusercontent.com/catchorg/Catch2/v2.13.8/single_include/catch2/catch.hpp'
'etc.patch'
'include.patch'
'failing_tests.patch')
sha256sums=('SKIP'
'f5adf6a4c3237920421d51a11112904084043b015acf2c9058e8f36b92ab2921'
'e8c02f338aca81df79f6d5c0e302322abd776b2aeb36eb0a57ee93335c0da216'
'd2270c915ace563cd695532be5bd559c606dd061460b64945c606e8869c2622d'
'61244eb2ec5ef7ccfb0a0532d51c256d2e99304098b143522f2bee8da3b8eac0')
pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "$pkgname"
# fix sources path
sed -i "s|\/\.\.\/|\/|g" CMakeLists.txt
# fix etc/ path
git apply "$srcdir/etc.patch"
# fix includes
git apply "$srcdir/include.patch"
# fix tests
cp "$srcdir/catch.hpp" tests/test_support/catch.h
# disable failing tests
git apply "$srcdir/failing_tests.patch"
sed CMakeLists.txt -i -e "/^find_package(Boost/ s, system , ,g"
}
build() {
cd "$pkgname"
cmake -DCMAKE_INSTALL_PREFIX=/usr/bin/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .
make
}
check() {
cd "$pkgname"
env _ARC_UNPACKER_TESTS=1 ./run_tests
}
package() {
cd "$srcdir/$pkgname/"
install -D -m 755 ${_pkgname} ${pkgdir}/usr/bin/${_pkgname}
mkdir -p ${pkgdir}/usr/share/${_pkgname}
cp -r etc ${pkgdir}/usr/share/${_pkgname}
}
# vim: set ai et ts=2 sts=2 sw=2:
|