summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 767d79481403f3fabaf9c95cc775e659a200ab06 (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
73
# Maintainer: Coelacanthus <liuhongwu2003@outlook.com>

pkgname=lemon-lime-git
_pkgname=lemon-lime
pkgver=v0.2.2.r0.30698de
pkgrel=2
epoch=1
pkgdesc="为了 OI 比赛而生的基于 Lemon 的轻量评测系统 | A tiny judging environment for OI contest based on Project_LemonPlus"
arch=(x86_64)
url="https://github.com/iotang/Project_LemonLime"
license=('GPL3')
groups=()
depends=('qt5-base')
makedepends=('git')
checkdepends=()
optdepends=()
provides=("lemon-lime")
conflicts=("lemon-lime")
replaces=()
backup=()
options=()
install=
changelog=
source=('Project_LemonLime::git+https://github.com/iotang/Project_LemonLime.git'
		"lemon-lime.desktop"
		)
noextract=()
md5sums=('SKIP'
         '707ae7795aab12effd83e92e394bccf4')
validpgpkeys=()

pkgver() {
	cd "$srcdir/Project_LemonLime"
	#git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
# Git, tags available
	printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
 #   printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"

# Git, no tags available
#	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

}

prepare() {
	cd "$srcdir/Project_LemonLime"
	sed -i '/unix:QMAKE_LFLAGS += -no-pie/d' lemon.pro
    git submodule update --init --recursive
}

build() {
	cd "$srcdir/Project_LemonLime"
	#./configure --prefix=/usr
	g++ watcher_unix.cpp -o watcher_unix -O2
	qmake lemon.pro
	make

}

check() {
	cd "$srcdir/Project_LemonLime"
	make -k check
}

package() {
	cd "$srcdir/Project_LemonLime"
	install -D -m755 lemon "$pkgdir/usr/bin/$_pkgname"

	install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
	install -D -m644 pics/icon.png "$pkgdir/usr/share/pixmaps/lemon-lime.png"
	install -D -m755 ../$_pkgname.desktop "$pkgdir/usr/share/applications/$_pkgname.desktop"
	install -D -m644 README.md "$pkgdir/usr/share/doc/$_pkgname/README.md"
	#install -D -m644 Changelog.md "$pkgdir/usr/share/doc/$pkgname/Changelog.md"
}