summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5dcb7e666a7534281132e5dbfbaa434eb7415205 (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
# Maintainer: water_lift <0xWATERx0@gmail.com>
# Maintainer: Dust1404 <unknown>
pkgname=lemonplus-git
pkgver=20190721
pkgrel=1
epoch=1
pkgdesc="A tiny judging environment for OI contest based on Project_Lemon"
arch=(x86_64)
url="https://github.com/Dust1404/Project_LemonPlus"
license=('GPL3')
groups=()
depends=('qt5-base')
makedepends=('git' 'qt5-base')
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=('git+https://github.com/Dust1404/Project_LemonPlus' 'LemonPlus.desktop')
noextract=()
md5sums=('SKIP' '321fca1aae094e762cd46bbf9eea83ef')

pkgver() {
    cd "$srcdir/Project_LemonPlus"
    git log -1 --format="%cd" --date=short | sed 's|-||g'
}

build() {
    cd "$srcdir/Project_LemonPlus"
    gcc watcher_unix.c -o watcher_unix -O2
    gcc realjudge.c -o realjudge_linux -O2
    qmake lemon.pro
    make
}

package() {
    cd "$pkgdir"
    mkdir -p usr/bin

    install -Dm644 "$srcdir/Project_LemonPlus/icon.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/lemon.png"
    install -Dm644 "$srcdir/LemonPlus.desktop" "$pkgdir/usr/share/applications/LemonPlus.desktop"
    install -Dm644 "$srcdir/Project_LemonPlus/lemon" "$pkgdir/usr/bin/lemon"
}