File ndppd.spec of Package ndppd

# spec file for package ndppd
# Copyright (c) 2018, Martin Hauke <>
# 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

Name:           ndppd
Release:        0
Summary:        Neighbor Discovery Protocol Proxy Daemon
License:        GPL-3.0-or-later
Group:          Productivity/Networking/System
Source:         %{name}-%{version}.tar.xz
Source1:        ndppd-tmpfiles.conf
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  systemd-rpm-macros
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libnl-3.0)

ndppd is a daemon that proxies certain IPv6 NDP messages between two or more
interfaces. It currently supports proxying Neighbor Solicitation Messages
and Neighbor Advertisement messages in order to allow IPv6 routing without
relying on Linux "proxy_ndp".

The daemon is partially compliant with (experimental) RFC4389. 

%setup -q

export CXXFLAGS='%{optflags}'
make %{?_smp_mflags}

make install PREFIX=%{_prefix} DESTDIR=%{buildroot}
install -D -m0644 %{SOURCE1} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
install -D -m0644 ndppd.service %{buildroot}%{_unitdir}/%{name}.service
install -D -m0644 ndppd.conf-dist %{buildroot}%{_sysconfdir}/ndppd.conf
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcndppd

%service_add_pre %{name}.service

%service_add_post %{name}.service
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf

%service_del_preun %{name}.service

%service_del_postun %{name}.service

%license LICENSE
%doc ChangeLog README
%config %{_sysconfdir}/ndppd.conf
%dir %attr(-,root,root) %ghost %{_rundir}/%{name}