summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a847f457f28d51c94a6e1dba6aaa8c7dac5edb37 (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
# Maintainer: Pierre Chapuis <catwell at archlinux dot us>

pkgname=lima
pkgver=1.1.0beta
pkgrel=2
pkgdesc="Personal Cloud software"
depends=(python2 fuse)
optdepends=(
    "python2-gnomekeyring: Gnome Keyring support"
    "kdebindings-python2: KWallet support"
)
makedepends=(prelink)
arch=("x86_64")
url="https://meetlima.com"
license=(custom)
install="lima.install"
source=(
    "https://static.meetlima.com/linux-client/$pkgname-$pkgver-amd64.tgz"
    "lima.service"
)
sha256sums=(
    "1b845f976c127c9abe0f46c51347e9c74afd69a1cda35289f470c861ca92f8db"
    "68662c1437f88403f38b0e80da3b2b546512fe524b791cba27791cd2d5033e7c"
)

package() {
    cd "$pkgname-$pkgver"

    # Copy lib directory.
    mkdir -p "$pkgdir/usr"
    cp -r lib "$pkgdir/usr"

    # Use python2 instead of python to make Namcap happy.
    sed -i -e "s|#!/usr/bin/env python$|#!/usr/bin/env python2|g" \
        $(find "$pkgdir" -name "*.py")

    # All .pyc files are OK.
    find "$pkgdir" -name "*.pyc" -exec touch {} \;

    # Mark stack of library as non-executable.
    execstack -c "$pkgdir/usr/lib/lima/pylima.so"

    # Systemd unit file
    install -Dm0644 "$srcdir/lima.service" \
        "$pkgdir/usr/lib/systemd/user/lima.service"

    # Executable and license file
    install -Dm755 lima "$pkgdir/usr/bin/lima"
    install -Dm0644 "lib/lima/TAC.txt" \
        "$pkgdir/usr/lib/licenses/$pkgname/TAC.txt"
}