| 1 |
%global barrier_revision @BARRIER_REVISION@ |
| 2 |
Summary: Keyboard and mouse sharing solution |
| 3 |
Name: barrier |
| 4 |
Version: @BARRIER_VERSION@ |
| 5 |
Release: @BARRIER_BUILD_NUMBER@%{?dist} |
| 6 |
License: GPLv2 |
| 7 |
Group: System Environment/Daemons |
| 8 |
URL: https://github.com/debauchee/barrier |
| 9 |
Source0: https://github.com/debauchee/barrier/archive/v%{version}.tar.gz |
| 10 |
|
| 11 |
BuildRequires: cmake3 |
| 12 |
BuildRequires: avahi-compat-libdns_sd-devel |
| 13 |
BuildRequires: libX11-devel |
| 14 |
BuildRequires: libXtst-devel |
| 15 |
BuildRequires: qt5-qtbase-devel |
| 16 |
BuildRequires: libcurl-devel |
| 17 |
BuildRequires: desktop-file-utils |
| 18 |
BuildRequires: openssl-devel |
| 19 |
|
| 20 |
%description |
| 21 |
Barrier allows you to share one mouse and keyboard between multiple computers. |
| 22 |
Work seamlessly across Windows, macOS and Linux. |
| 23 |
|
| 24 |
%prep |
| 25 |
%setup -q -n %{name}-%{version} |
| 26 |
|
| 27 |
|
| 28 |
%build |
| 29 |
%{cmake3} -DSYNERGY_VERSION_STAGE:STRING=@BARRIER_VERSION_STAGE@ -DSYNERGY_REVISION:STRING=%{barrier_revision} . |
| 30 |
make %{?_smp_mflags} |
| 31 |
|
| 32 |
|
| 33 |
%install |
| 34 |
install -D -p -m 0755 bin/barrier %{buildroot}%{_bindir}/barrier |
| 35 |
install -D -p -m 0755 bin/barrierc %{buildroot}%{_bindir}/barrierc |
| 36 |
install -D -p -m 0755 bin/barriers %{buildroot}%{_bindir}/barriers |
| 37 |
install -D -p -m 0644 doc/barrierc.1 %{buildroot}%{_mandir}/man1/barrierc.1 |
| 38 |
install -D -p -m 0644 doc/barriers.1 %{buildroot}%{_mandir}/man1/barriers.1 |
| 39 |
install -D -p -m 0644 res/barrier.desktop %{buildroot}%{_datadir}/applications/barrier.desktop |
| 40 |
install -D -p -m 0644 res/barrier.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/barrier.svg |
| 41 |
|
| 42 |
cd %{buildroot}%{_bindir} |
| 43 |
|
| 44 |
mkdir -p %{buildroot}%{_datadir}/metainfo |
| 45 |
## Write AppStream |
| 46 |
cat <<END> %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml |
| 47 |
<?xml version="1.0" encoding="UTF-8"?> |
| 48 |
<!-- Copyright 2018 Ding-Yi Chen <[email protected]> --> |
| 49 |
<component type="desktop-application"> |
| 50 |
<id>%{name}</id> |
| 51 |
<metadata_license>FSFAP</metadata_license> |
| 52 |
<project_license>GPLv2</project_license> |
| 53 |
<name>barrier</name> |
| 54 |
<summary>Share mouse and keyboard between multiple computers over the network</summary> |
| 55 |
|
| 56 |
<description> |
| 57 |
<p> |
| 58 |
Barrier allows you to share one mouse and keyboard between multiple computers. |
| 59 |
Work seamlessly across Windows, macOS and Linux. |
| 60 |
</p> |
| 61 |
</description> |
| 62 |
|
| 63 |
<launchable type="desktop-id">%{name}.desktop</launchable> |
| 64 |
|
| 65 |
<url type="homepage">https://github.com/debauchee/barrier</url> |
| 66 |
|
| 67 |
<provides> |
| 68 |
<binary>barrier</binary> |
| 69 |
<binary>barrierc</binary> |
| 70 |
<binary>barriers</binary> |
| 71 |
</provides> |
| 72 |
|
| 73 |
<releases> |
| 74 |
<release version="%{version}" date="2019-03-21" /> |
| 75 |
</releases> |
| 76 |
</component> |
| 77 |
END |
| 78 |
|
| 79 |
desktop-file-install --delete-original \ |
| 80 |
--dir %{buildroot}%{_datadir}/applications \ |
| 81 |
--set-icon=%{_datadir}/icons/hicolor/scalable/apps/barrier.svg \ |
| 82 |
%{buildroot}%{_datadir}/applications/barrier.desktop |
| 83 |
|
| 84 |
desktop-file-validate %{buildroot}/%{_datadir}/applications/barrier.desktop |
| 85 |
|
| 86 |
%files |
| 87 |
# None of the documentation files are actually useful here, they all point to |
| 88 |
# the online website, so include just one, the README |
| 89 |
%doc LICENSE ChangeLog res/Readme.txt doc/barrier.conf.example* |
| 90 |
%{_bindir}/barrier |
| 91 |
%{_bindir}/barrierc |
| 92 |
%{_bindir}/barriers |
| 93 |
%{_datadir}/icons/hicolor/scalable/apps/barrier.svg |
| 94 |
%{_datadir}/applications/barrier.desktop |
| 95 |
%{_datadir}/metainfo/%{name}.appdata.xml |
| 96 |
%{_mandir}/man1/barrierc.1* |
| 97 |
%{_mandir}/man1/barriers.1* |
| 98 |
|
| 99 |
%changelog |
| 100 |
* Thu Mar 21 2019 wendall911 <[email protected]> |
| 101 |
- Actual working spec file for Fedora |
| 102 |
|
| 103 |
* Sat Jan 27 2018 Debauchee <[email protected]> |
| 104 |
- Initial version of the package |
| 105 |
|