summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 36a3e6eedc830ad3064bb4ab663475b33c9b2aea (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: NelloKudo <marshnelloosu@gmail.com>

pkgname=altlinux-git
_spkgname=AltLinux
_lpkgname=altlinux
pkgver=v0.4.2.2
pkgrel=1
pkgdesc="GUI for AltServer-Linux"
arch=('x86_64')
url="https://github.com/i-love-altlinux/AltLinux"
license=('GPL')
provides=("altlinux")
conflicts=("altlinux")
depends=('binutils'
         'wget'
         'curl'
         'git'
         'python-pip'
         'libappindicator-gtk3'
         'usbmuxd'
         'libimobiledevice'
         'avahi'
         'zlib'
         'libhandy'
         'unzip')
source=('git+https://github.com/i-love-altlinux/AltLinux'
        "${_lpkgname}.desktop"
        "${_lpkgname}.png")
sha256sums=('SKIP'
            'SKIP'
            'SKIP')

prepare() {
    # "Hacky" way to install PyInstaller since the AUR package
    # takes hours due to its check() function and various pytests.
    # Read more at here: https://github.com/samarthj/AUR/issues/8

    # Installing PyInstaller as user from pip.
    # That's to prevent conflicts with package manager
    pip install pyinstaller
}

build() {
    cd "$srcdir"/"$_spkgname"
    PATH=$HOME/.local/bin:$PATH pyinstaller altlinux.spec --clean
}

package() {
    cd "$srcdir"/"$_spkgname"

    # Install desktop file
    install -Dm 644 -o root "${srcdir}"/"${_lpkgname}".desktop -t "${pkgdir}/usr/share/applications"

    # Install icon file
    install -Dm 644 -o root "${srcdir}"/"${_lpkgname}".png -t "${pkgdir}/usr/share/icons"

    # Install files
    mkdir -p "${pkgdir}"/usr/lib/
    cp -R resources dist/altlinux
    cp -R dist/altlinux "${pkgdir}"/usr/lib/

    # Setting permissions
    chown -R $USER "${pkgdir}"/usr/lib/altlinux
}