summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorlizr20042018-10-29 23:01:07 +0800
committerlizr20042018-10-29 23:01:07 +0800
commit04539d8e52518b0ea43a79271717d5a603096ba8 (patch)
tree820cd71981d3b03cdc50ab3a0d2a2a4393476643 /PKGBUILD
downloadaur-04539d8e52518b0ea43a79271717d5a603096ba8.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..395cbed85869
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Lizr <oilizr2004@gmail.com>
+# Contributor: equation314 <https://github.com/equation314>
+pkgname=ccrplus
+pkgver=1.1.0
+pkgrel=1
+pkgdesc="A opensource and cross-platform judge environment for OI contest."
+arch=('x86_64')
+url="https://github.com/sxyzccr/CCR-Plus"
+license=('GPL')
+depends=('qt5-base')
+makedepends=('git' 'gcc' 'qt5-base')
+md5sums=() #autofill using updpkgsums
+
+prepare() {
+ cd "$srcdir"
+ if [ -e CCR-Plus ]; then
+ cd CCR-Plus
+ git pull
+ else
+ git clone https://github.com/sxyzccr/CCR-Plus
+ fi
+ # FIXME: Complie Error because of less header file
+ sed -i "4 i #include <QHeaderView>" "$srcdir/CCR-Plus/src/configure/configuredialog.h"
+}
+
+build() {
+ cd "$srcdir/CCR-Plus"
+ mkdir -p build && cd build
+ qmake-qt5 ..
+ make -j4
+}
+
+package() {
+ cd "$srcdir/CCR-Plus"
+ mkdir -p "$pkgdir/usr/bin"
+ mkdir -p "$pkgdir/usr/share/applications"
+ mkdir -p "$pkgdir/usr/share/ccrplus/checker"
+ mkdir -p "$pkgdir/usr/share/icons/hicolor/scalable/apps"
+ cp 'build/src/CCR-Plus' "$pkgdir/usr/share/ccrplus"
+ cp 'build/src/tools/checker/fulltext' "$pkgdir/usr/share/ccrplus/checker"
+ cp 'build/src/tools/monitor/monitor' "$pkgdir/usr/share/ccrplus"
+ cp 'resources/CCR.ico' "$pkgdir/usr/share/icons/hicolor/scalable/apps/ccrplus.ico"
+ cp "$pkgdir/../../ccrplus.desktop" "$pkgdir/usr/share/applications/"
+ ln -s "/usr/share/ccrplus/CCR-Plus" "$pkgdir/usr/bin/ccrplus"
+}