This commit is contained in:
Tru Huynh 2018-02-24 17:35:46 +00:00 committed by GitHub
commit f1e3bfb15e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 1 deletions

View File

@ -5,7 +5,7 @@ mkdir build || exit 1
cd build || exit 1 cd build || exit 1
# some environments have cmake v2 as 'cmake' and v3 as 'cmake3' # some environments have cmake v2 as 'cmake' and v3 as 'cmake3'
# check for cmake3 first then fallback to just cmake # check for cmake3 first then fallback to just cmake
B_CMAKE=`which cmake3 2>/dev/null` `type cmake3 >> /dev/null` && B_CMAKE=`type cmake3 | cut -d ' ' -f 3`
[ $? -ne 0 -o "x$B_CMAKE" = "x" ] && B_CMAKE=cmake [ $? -ne 0 -o "x$B_CMAKE" = "x" ] && B_CMAKE=cmake
# default build configuration # default build configuration
B_BUILD_TYPE=${B_BUILD_TYPE:-Debug} B_BUILD_TYPE=${B_BUILD_TYPE:-Debug}

View File

@ -9,10 +9,46 @@ Packager: Debauchee <todo@mail.com>
License: GPLv2 License: GPLv2
Release: @BARRIER_BUILD_NUMBER@@BARRIER_SNAPSHOT_INFO@%{?dist} Release: @BARRIER_BUILD_NUMBER@@BARRIER_SNAPSHOT_INFO@%{?dist}
# at least for CentOS-7 and CentOS-6
BuildRequires: git cmake3 make gcc gcc-c++ curl-devel openssl-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: avahi-compat-libdns_sd-devel
BuildREquires: libXtst-devel libXinerama-devel libICE-devel libXrandr-devel
# possible issue here for cmake: on CentOS-7, cmake is cmake 2.x and barrier needs cmake 3.x
# which is available from EPEL as cmake3, that might not be the case for other RPMS based distro
# CXX14
%if 0%{?rhel} == 6
BuildRequires: centos-release-scl-rh devtoolset-3-gcc-c++.x86_64
%endif
%description %description
Barrier allows you to share one mouse and keyboard between multiple computers. Barrier allows you to share one mouse and keyboard between multiple computers.
Work seamlessly across Windows, macOS and Linux. Work seamlessly across Windows, macOS and Linux.
%prep
# TO BE DONE need a Source tarball and not git..
%build
git clone https://github.com/debauchee/barrier/
%if 0%{?rhel} == 6
cd barrier && scl enable devtoolset-3 ./clean_build.sh
%endif
%if 0%{?rhel} == 7
cd barrier && ./clean_build.sh
%endif
# maybe need a default if/else for non rhel target :P
%install
# no make install, so manual install
%{__mkdir} -p %{buildroot}%{_bindir} %{buildroot}%{_datarootdir}/applications %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps
%{__install} -t %{buildroot}%{_datarootdir}/applications res/barrier.desktop
%{__install} -t %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps res/barrier.svg
%{__install} -t %{buildroot}%{_bindir} barrier/build/bin/{barrier,barrierc,barriers,barrierd,syntool}
%files %files
%defattr(755,root,root,-) %defattr(755,root,root,-)
%{_bindir}/barrier %{_bindir}/barrier