mirror of
https://abf.rosa.ru/djam/syncthing.git
synced 2025-04-18 14:44:25 +00:00
80 lines
1.7 KiB
RPMSpec
80 lines
1.7 KiB
RPMSpec
%global debug_package %{nil}
|
|
|
|
%ifarch x86_64
|
|
%global altarch amd64
|
|
%endif
|
|
%ifarch %{ix86} i586 i486 i686 i386
|
|
%global altarch 386
|
|
%endif
|
|
%ifarch %{arm}
|
|
%global altarch armv7
|
|
%endif
|
|
|
|
Name: syncthing
|
|
Version: 0.14.28
|
|
Release: 1
|
|
Summary: Syncthing
|
|
License: MIT
|
|
URL: http://syncthing.net/
|
|
Group: Networking/Other
|
|
Source10: %{name}
|
|
BuildRequires: procps
|
|
BuildRequires: golang
|
|
BuildRequires: git
|
|
|
|
%description
|
|
Syncthing replaces Dropbox and BitTorrent Sync with something
|
|
open, trustworthy and decentralized. Your data is your 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.
|
|
|
|
Using syncthing, that control is returned to you.
|
|
|
|
%prep
|
|
|
|
%build
|
|
rm -rf $RPM_BUILD_DIR/%{name}
|
|
|
|
install -d $RPM_BUILD_DIR/%{name}/src/github.com/%{name}
|
|
|
|
pushd $RPM_BUILD_DIR/%{name}/src/github.com/%{name}/
|
|
git clone -b "v%{version}" https://github.com/syncthing/syncthing.git
|
|
pushd %{name}
|
|
#go run build.go -goos linux -goarch %{altarch} -version v%{version} -no-upgrade
|
|
./build.sh
|
|
popd
|
|
popd
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
|
|
install -d %{buildroot}%{_bindir}
|
|
install -d %{buildroot}%{_sbindir}
|
|
install -d %{buildroot}%{_initddir}
|
|
install -d %{buildroot}%{_datadir}/doc/%{name}
|
|
|
|
pushd $RPM_BUILD_DIR/%{name}/src/github.com/%{name}/%{name}/
|
|
install -pm 0755 bin/syncthing %{buildroot}%{_bindir}
|
|
install -sm 755 bin/syncthing %{buildroot}%{_sbindir}
|
|
install -pm 0644 LICENSE README.md %{buildroot}%{_datadir}/doc/%{name}
|
|
popd
|
|
|
|
install -Dm0755 %{SOURCE10} %{buildroot}%{_initddir}/
|
|
|
|
%post
|
|
chkconfig %{name} on
|
|
service %{name} restart
|
|
|
|
%preun
|
|
service %{name} stop
|
|
|
|
%postun
|
|
|
|
%files
|
|
%{_bindir}/%{name}
|
|
%{_sbindir}/%{name}
|
|
%{_datadir}/doc/%{name}/*
|
|
%{_initddir}/%{name}
|
|
|
|
%changelog
|