File tinc.spec of Package tinc
#
# spec file for package tinc
#
# Copyright (c) 2020 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 http://bugs.opensuse.org/
#
Name: tinc
Version: 1.1pre17
Release: 0
Summary: A peer-to-peer mesh VPN daemon
License: GPL-2.0+
%if "%{_vendor}" == "debbuild"
Packager: Grover Chou <groverchout@opensuse.org>
%endif
Group: Productivity/Networking/Other
Url: https://www.tinc-vpn.org
Source: https://www.tinc-vpn.org/packages/tinc-%{version}.tar.gz
Source1: tinc@.service
BuildRequires: automake
BuildRequires: texinfo
%if 0%{?suse_version}
BuildRequires: openssl-devel
BuildRequires: lzo-devel
BuildRequires: ncurses-devel
BuildRequires: readline-devel
BuildRequires: zlib-devel
%endif
%if 0%{?debian} || 0%{?ubuntu}
BuildRequires: libssl-dev
BuildRequires: liblzo2-dev
BuildRequires: libncurses5-dev
BuildRequires: libreadline-dev
BuildRequires: zlib1g-dev
BuildRequires: debbuild-macros
%endif
%description
Tinc is a peer-to-peer mesh VPN daemon that supports VPNs with an arbitrary
number of nodes.
%prep
%setup -q
%build
autoreconf -fi
%configure
%make_build
%install
%make_install
rm %{buildroot}/%{_mandir}/man8/tinc-gui.8
install -Dm644 %{S:1} -t %{buildroot}/%{_unitdir}
%if 0%{?suse_version}
%pre
%service_add_pre tinc@.service
%post
%service_add_post tinc@.service
%preun
%service_del_preun tinc@.service
%postun
%service_del_postun tinc@.service
%endif
%if 0%{?debian} || 0%{?ubuntu}
%post
%systemd_post tinc@.service
%preun
%systemd_preun tinc@.service
%endif
%files
%license COPYING COPYING.README
%doc AUTHORS NEWS README.md SECURITY.md THANKS
%{_sbindir}/tinc
%{_sbindir}/tincd
%{_unitdir}/tinc@.service
%{_datadir}/bash-completion/completions/tinc
%{_infodir}/tinc.info.gz
%{_mandir}/man5/tinc.conf.5.gz
%{_mandir}/man8/tinc.8.gz
%{_mandir}/man8/tincd.8.gz
%changelog