A new user interface for you! Read more...

File tinc.spec of Package tinc

Name:           tinc
Version:        1.0.32
Release:        0
License:        GPL-2.0+
Summary:        Virtual private network daemon
Url:            http://www.tinc-vpn.org/
Group:          Productivity/Networking/Other
Source:         http://www.tinc-vpn.org/packages/tinc-%{version}.tar.gz
#BuildRequires:  libgcrypt-devel, openssl >= 1.0.0, openssl-devel, lzo-devel, readline-devel, ncurses-devel, autoconf, automake, libtool
BuildRequires:  openssl >= 1.0.0, openssl-devel, lzo-devel, autoconf, automake, libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Requires(post): info
Requires(preun): info

%if 0%{?suse_version} >= 1210
%bcond_without systemd
%else
%bcond_with systemd
%endif

%if %{with systemd}
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%endif

%description
tinc is a Virtual Private Network (VPN) daemon that uses tunnelling
and encryption to create a secure private network between hosts on
the Internet. Because the tunnel appears to the IP level network
code as a normal network device, there is no need to adapt any
existing software. This tunnelling allows VPN sites to share
information with each other over the Internet without exposing any
information to others.

%changelog

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot} %{?_smp_mflags}

# copy systemd unit files
%if %{with systemd}
	install -D -m 644 distro/tinc.service %{buildroot}%{_unitdir}/tinc.service
	install -D -m 644 distro/tinc@.service %{buildroot}%{_unitdir}/tinc@.service
%endif

%pre
%service_add_pre tinc.service

%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :

%service_add_post tinc.service

%preun
if [ $1 = 0 ] ; then
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi

%service_del_preun tinc@.service tinc.service

%postun
%service_del_postun tinc.service

%files
%defattr(-,root,root)
%doc ChangeLog README COPYING

%doc %{_mandir}/man5/tinc.conf.5*
%doc %{_mandir}/man8/tincd.8*
%doc %{_infodir}/tinc.info*
%{_sbindir}/tincd
%{_unitdir}/tinc.service
%{_unitdir}/tinc@.service