summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b41ae890b2f2a96d9235f37a3edd5ace1bfd69f9 (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
# Maintainer: ⭐️NINIKA⭐️ <nikita6@bk.ru>
pkgname=psvpfstools-git
_gitname=psvpfstools
pkgver=0.17.0.gfe2549cb
pkgrel=1
pkgdesc="Tools for decrypting PS Vita PFS filesystem (Vita3K fork)."
arch=('any')
url="https://github.com/Vita3K/psvpfstools"
license=('Unknown')
depends=(boost)
makedepends=(git cmake ninja)
source=(
  "git+https://github.com/Vita3K/psvpfstools.git"
  "git+https://github.com/KorewaWatchful/libb64.git"
  "git+https://github.com/KorewaWatchful/libtomcrypt.git"
  "git+https://github.com/KorewaWatchful/libzrif.git"
  "git+https://github.com/Vita3K/psvpfsparser.git"
  "git+https://github.com/KorewaWatchful/zlib.git"
  "build-examples.patch"
  "run-execute-in-example.patch"
)
sha256sums=(
  SKIP
  SKIP
  SKIP
  SKIP
  SKIP
  SKIP
  SKIP
  SKIP
)

_link_submodule() {
  git config "submodule.libs/$1.url" "$srcdir/$1"
}

prepare() {
  cd "${_gitname}"
  git submodule init
  
  _link_submodule libb64
  _link_submodule libtomcrypt
  _link_submodule libzrif
  _link_submodule svpfsparser
  _link_submodule zlib
  
  git -c protocol.file.allow=always submodule update
  
  patch -Nup1 --ignore-whitespace -i "${srcdir}/build-examples.patch"
  patch -Nup1 --ignore-whitespace -i "${srcdir}/run-execute-in-example.patch"
}

build() {
  mkdir -p build
  cd build
  cmake ../${_gitname} -DCMAKE_BUILD_TYPE=Release -G Ninja
  
  ninja
}

package() { 
  mkdir -p "${pkgdir}/usr/bin/"
  install -Dm755 "${srcdir}/build/psvpfsparser/cmake/example_project" "${pkgdir}/usr/bin/psvpfsparser"
}