File oor.spec of Package oor
#
# spec file for package oor
#
# Copyright (c) 2016 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: oor
Version: 1.0.1
Release: 0
Summary: A modular open-source implementation to deploy programmable overlay networks
License: Apache-2.0
Group: Productivity/Networking/Boot/Clients
Url: http://www.openoverlayrouter.org/
Source0: https://github.com/OpenOverlayRouter/oor/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}.service
Patch0: %{name}-1.0.0-makefile.patch
BuildRequires: dos2unix
BuildRequires: gcc
BuildRequires: gengetopt
BuildRequires: glibc-devel
BuildRequires: libconfuse-devel
BuildRequires: libxml2-devel
BuildRequires: make
BuildRequires: systemd
BuildRequires: zeromq-devel
Requires(post): libcap-progs
Requires(post): systemd
Requires(postun): systemd
Requires(preun): systemd
Provides: lispmob = %{version}
Obsoletes: lispmob < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The OpenOverlayRouter (OOR) project aims to deliver a flexible and modular open-source implementation
to deploy programmable overlay networks. It leverages on encapsulating overlay-specific packets into
underlay-compatible packets at the edges of the instantiated overlay and route them over the physical
underlying infrastructure. In order to do so, it maps overlay identifiers to underlay locators and keeps
those mappings updated over time. In the current version, OOR uses the LISP protocol for the control-plane
(e.g. mapping retrieval and updating, etc), NETCONF/YANG for the management-plane (e.g. overlay
identifiers provisioning, etc) and can use both LISP and VXLAN-GPE headers for encapsulation.
%prep
%setup -q
%patch0 -p1
%build
dos2unix LICENSE README.md FAQ.md
export CFLAGS="%{optflags} -fno-strict-aliasing"
make %{?_smp_mflags} PREFIX=%{_sbindir}
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install DESTDIR=%{buildroot} PREFIX=%{_sbindir}
mkdir -p %{buildroot}/%{_sysconfdir}
mkdir -p %{buildroot}/%{_unitdir}
mkdir -p %{buildroot}%{_localstatedir}/log
cp oor/oor.conf.example %{buildroot}/%{_sysconfdir}/oor.conf
cp %{SOURCE1} %{buildroot}/%{_unitdir}/
ln -sf %{_sbindir}/oor %{buildroot}/%{_sbindir}/rcoor
touch %{buildroot}%{_localstatedir}/log/oor.log
%pre
%service_add_pre oor.service
%post
%service_add_post oor.service
setcap cap_net_raw,cap_net_admin+ep %{_sbindir}/oor
%preun
%service_del_preun oor.service
%postun
%service_del_postun oor.service
%files
%defattr(-,root,root)
%doc LICENSE README.md FAQ.md
%{_sbindir}/oor
%{_sbindir}/rcoor
%config %{_unitdir}/oor.service
%config(noreplace) %{_sysconfdir}/oor.conf
%ghost %{_localstatedir}/log/oor.log
%changelog