2015-05-09 12:55:05 +02:00
|
|
|
#
|
|
|
|
# spec file for package syncthing
|
|
|
|
#
|
2016-01-08 01:12:47 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2015-05-09 12:55:05 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: syncthing
|
2016-02-19 14:34:49 +01:00
|
|
|
Version: 0.12.19
|
2015-05-09 12:55:05 +02:00
|
|
|
Release: 0
|
2015-11-06 00:33:15 +01:00
|
|
|
Summary: FOSS Continuous File Synchronisation
|
2015-05-12 15:14:00 +02:00
|
|
|
License: MPL-2.0
|
2015-05-09 12:55:05 +02:00
|
|
|
Group: Productivity/Networking/File-Sharing
|
|
|
|
Url: https://syncthing.net/
|
2015-12-21 01:39:49 +01:00
|
|
|
Source: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-source-v%{version}.tar.gz
|
2015-08-10 01:01:12 +02:00
|
|
|
Source1: %{name}.firewall
|
2016-01-12 09:23:33 +01:00
|
|
|
BuildRequires: go >= 1.3
|
2015-05-09 12:55:05 +02:00
|
|
|
BuildRequires: systemd
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
|
|
|
|
%description
|
|
|
|
Syncthing replaces proprietary sync and cloud services with
|
2015-11-06 00:33:15 +01:00
|
|
|
something open, trustworthy and decentralised. Your data is your
|
2015-05-09 12:55:05 +02:00
|
|
|
data alone and you deserve to choose where it is stored, if it is
|
|
|
|
shared with some third party and how it's transmitted over the
|
|
|
|
Internet.
|
|
|
|
|
|
|
|
%prep
|
2015-12-21 09:14:22 +01:00
|
|
|
%setup -q -n %{name}
|
2015-08-15 22:57:55 +02:00
|
|
|
%if 0%{?suse_version} <= 1320
|
|
|
|
# Remove an entry that only exists since systemd 215.
|
|
|
|
sed -i '/^RestartForceExitStatus=/d;s/^\(SuccessExitStatus=\).*$/\12/' \
|
|
|
|
etc/linux-systemd/system/syncthing@.service
|
|
|
|
%endif
|
2015-05-09 12:55:05 +02:00
|
|
|
|
|
|
|
%build
|
2016-01-12 09:23:33 +01:00
|
|
|
export GOPATH="$PWD/build"
|
|
|
|
mkdir -p build/src/github.com/%{name}/%{name}
|
|
|
|
ls | sed '/^build$/d' | xargs cp -at build/src/github.com/%{name}/%{name}
|
|
|
|
go run build.go -no-upgrade
|
2015-05-09 12:55:05 +02:00
|
|
|
|
|
|
|
%install
|
2016-01-12 09:23:33 +01:00
|
|
|
install -Dm 0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
|
2015-05-09 12:55:05 +02:00
|
|
|
install -Dm 0644 etc/linux-systemd/system/%{name}@.service \
|
|
|
|
%{buildroot}%{_unitdir}/%{name}@.service
|
2015-05-12 07:50:39 +02:00
|
|
|
install -Dm 0644 etc/linux-systemd/user/%{name}.service \
|
2015-05-09 12:55:05 +02:00
|
|
|
%{buildroot}%{_userunitdir}/%{name}.service
|
2015-08-10 01:01:12 +02:00
|
|
|
install -Dm 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
2015-05-09 12:55:05 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre %{name}@.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post %{name}@.service
|
2015-08-10 01:07:40 +02:00
|
|
|
%if 0%{?suse_version} > 1320
|
2015-05-09 12:55:05 +02:00
|
|
|
%systemd_user_post %{name}.service
|
2015-05-18 10:03:46 +02:00
|
|
|
%endif
|
2015-05-09 12:55:05 +02:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun %{name}@.service
|
2015-08-10 01:07:40 +02:00
|
|
|
%if 0%{?suse_version} > 1320
|
2015-05-09 12:55:05 +02:00
|
|
|
%systemd_user_preun %{name}.service
|
2015-05-18 10:03:46 +02:00
|
|
|
%endif
|
2015-05-09 12:55:05 +02:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun %{name}@.service
|
2015-08-10 01:07:40 +02:00
|
|
|
%if 0%{?suse_version} > 1320
|
2015-05-09 12:55:05 +02:00
|
|
|
%systemd_user_postun %{name}.service
|
2015-05-18 10:03:46 +02:00
|
|
|
%endif
|
2015-05-09 12:55:05 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2015-08-02 11:46:57 +02:00
|
|
|
%doc AUTHORS CONDUCT.md CONTRIBUTING.md LICENSE README.md
|
2015-08-10 01:04:25 +02:00
|
|
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
2015-05-09 12:55:05 +02:00
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_unitdir}/%{name}@.service
|
2015-08-10 01:07:40 +02:00
|
|
|
%if 0%{?suse_version} > 1320
|
2015-05-09 12:55:05 +02:00
|
|
|
%{_userunitdir}/%{name}.service
|
2015-05-18 10:03:46 +02:00
|
|
|
%endif
|
2015-05-09 12:55:05 +02:00
|
|
|
|
|
|
|
%changelog
|