-
Notifications
You must be signed in to change notification settings - Fork 67
/
lemonlime.spec.in
89 lines (78 loc) · 2.5 KB
/
lemonlime.spec.in
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# disable debug packages, use explicit glibc-langpack follow openSUSE:Tools/obs-service-tar_scm
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
%global debug_package %{nil}
%define locale_package glibc-langpack-en
%endif
%define interface_version 3
Name: LemonLime
Version: @CPACK_PACKAGE_VERSION@
Release: 0
Summary: A tiny judging environment for OI contest based on Lemon + LemonPlus
License: GPL-3.0-only
Url: https://github.com/Project-LemonLime/Project_LemonLime
Source0: https://github.com/Project-LemonLime/Project_LemonLime/releases/download/@CPACK_PACKAGE_VERSION@/Lemon-@[email protected]
%if 0%{?suse_version}
# for openSUSE
BuildRequires: cmake >= 3.9
BuildRequires: libqt5-qtbase-common-devel >= 5.15
BuildRequires: libQt5Core-devel
BuildRequires: libQt5Gui-devel
BuildRequires: libQt5Network-devel
BuildRequires: libQt5Widgets-devel
BuildRequires: libQt5Concurrent-devel
BuildRequires: libqt5-linguist-devel
BuildRequires: libqt5-qtsvg-devel
BuildRequires: update-desktop-files
BuildRequires: ninja
BuildRequires: spdlog-devel
%else
# for Fedora/CentOS/ ...
%if 0%{?rhel}
BuildRequires: epel-rpm-macros
%endif
BuildRequires: cmake >= 3.9
BuildRequires: qt5-qtbase-devel >= 5.15
BuildRequires: qt5-linguist
BuildRequires: qt5-qtsvg-devel
#BuildRequires: %{locale_package}
BuildRequires: desktop-file-utils
BuildRequires: ninja-build
BuildRequires: spdlog
%endif
%description
A tiny judging environment for OI contest based on Lemon + LemonPlus.
%prep
#%setup -qn Lemon-%{version}
%define INSTALL_PREFIX %{buildroot}/usr
%define BUILD_SOURCE %{_builddir}/LemonLime-%{version}
%define BUILD_DIR %{_builddir}/LemonLime-%{version}/build
mkdir -p %{BUILD_DIR}
%build
# build
export _LEMON_BUILD_INFO_="LemonLime built by openSUSE Build Service"
export _LEMON_BUILD_EXTRA_INFO_="(Official Build) $(uname -a | cut -d ' ' -f3,13), Qt $(pkg-config --modversion Qt5Core)"
%if 0%{?centos_version}
cd %{BUILD_DIR}
cmake .. \
%else
cmake -S %{BUILD_SOURCE} -B %{BUILD_DIR} \
%endif
-DCMAKE_INSTALL_PREFIX="%{INSTALL_PREFIX}" \
-DCMAKE_BUILD_TYPE=Release \
-GNinja
ninja -C %{BUILD_DIR}
%install
ninja -C %{BUILD_DIR} install
%post
%postun
%files
%license LICENSE
%doc README.md
%{_bindir}/lemon-lime
%{_datadir}/applications/lemon-lime.desktop
%{_datadir}/icons/hicolor
#%{_datadir}/metainfo/lemon-lime.metainfo.xml
%{_datadir}/lemon-lime/lang/*.qm
%dir %{_datadir}/lemon-lime
%dir %{_datadir}/lemon-lime/lang
%changelog