File dolly.spec of Package dolly

#
# spec file for package dolly
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 https://bugs.opensuse.org/
#

Name:           dolly
Summary:        Clone the installation of one machine to many other machines
License:        GPL-2.0-only
Group:          Productivity/Networking/Other
Version:        0.63.3
Release:        0
URL:            http://www.cs.inf.ethz.ch/stricker/CoPs/patagonia/dolly.html
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        https://github.com/mslacken/dolly/archive/%{version}.tar.gz#/dolly-%{version}.tar.bz2
Source1:        dolly.conf


#SLE11* SLE12* SEL15* dont contains pandoc packages
%if 0%{?is_opensuse} && 0%{?suse_version} >= 1500
BuildRequires:  pandoc
Requires:       gzip
%endif

%description
Dolly is used to clone the installation of one machine to 
(possibly many) other machines. It can distribute image-files 
(even gnu-zipped), partitions or whole hard disk drives to 
other partitions or hard disk drives. As it forms a "virtual TCP 
ring" to distribute data, it works best with fast switched 
networks.

%prep
rm -rf %{RPM_BUILD_ROOT}
%setup -q

%build
make %{?_smp_mflags}
%if 0%{?is_opensuse} && 0%{?suse_version} >= 1500
pandoc --standalone -t man README.md -o dolly.1
gzip dolly.1
%endif

%install
install -D -m 755 $RPM_BUILD_DIR/%{name}-%{version}/dolly %{buildroot}%{_sbindir}/dolly
install -D -m 644  %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}.conf
%if 0%{?is_opensuse} && 0%{?suse_version} >= 1500
install -D -m 644 dolly.1.gz %{buildroot}%{_mandir}/man1/dolly.1.gz
%endif

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%doc README.md dolly.example
%attr(755,root,root) %{_sbindir}/dolly
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/%{name}.conf
%if 0%{?is_opensuse} && 0%{?suse_version} >= 1500
%{_mandir}/man1/dolly.1.gz
%endif
%changelog
openSUSE Build Service is sponsored by