summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 52eb2ee923caae32599b6d3bb5ea1c6696ec5495 (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
71
72
# Maintainer: 0x9fff00 <0x9fff00+git@protonmail.ch>

_name=futurerestore
_fork=marijuanARM
_forkpkgname=$_name-${_fork,,}
pkgname=$_forkpkgname-git
pkgver=r189.3786d4c
pkgrel=2
pkgdesc="iOS upgrade and downgrade tool utilizing SHSH blobs - marijuanARM's fork (for A12 and below only) - git version"
arch=('x86_64')
url="https://github.com/$_fork/$_name"
license=('LGPL3')
depends=('libplist' 'libzip' 'libimobiledevice' 'libfragmentzip' 'libirecovery' 'curl' 'openssl' 'zlib' 'img4tool' 'libgeneral')
makedepends=('git')
provides=("$_name" "$_forkpkgname")
conflicts=("$_name")
source=("git+$url.git"
        'git+https://github.com/tihmstar/tsschecker.git'
        'git+https://github.com/marijuanARM/idevicerestore.git'
        'git+https://github.com/tihmstar/jssy.git'
        "$_name-0001-Ensure-CUSTOM_LOGGING-refers-to-a-file.patch"
        'idevicerestore-0001-configure.ac-check-for-pthreads.patch')
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            '6b50f455cfa5a60fcb77d9db55ce48186774b5cf9c5f04ad5fc911b8df7e047e'
            '7a1ac46309eab59763186fdb91e456bd77f703b0fe59fec968e0001349c24d78')

pkgver() {
  cd "$_name"
  printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$_name"

  git submodule deinit -f --all
  git submodule init
  git config submodule.external/tsschecker.url "$srcdir/tsschecker"
  git config submodule.external/idevicerestore.url "$srcdir/idevicerestore"
  git submodule update

  for p in "$srcdir"/$_name-*.patch; do
    patch -Np1 -i "$p"
  done

  cd external/tsschecker
  git submodule init
  git config submodule.external/jssy.url "$srcdir/jssy"
  git submodule update
  cd ../..

  cd external/idevicerestore
  for p in "$srcdir"/idevicerestore-*.patch; do
    patch -Np1 -i "$p"
  done
  cd ../..
}

build() {
  cd "$_name"

  ./autogen.sh --prefix=/usr
  make
}

package() {
  cd "$_name"

  make DESTDIR="$pkgdir/" install
}