File iouyap.spec of Package iouyap

# spec file for package iouyap
# Copyright (c) 2015 SUSE LINUX Products 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

Name:           iouyap
Version:        0.97
Release:        0
Summary:        Bridge IOU to TAP, UDP and Ethernet
License:        GPL-3.0+
Group:          System/Emulators/Other
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  gcc
BuildRequires:  glibc-devel
%if 0%{?suse_version}
Requires(pre):	permissions
Requires(pre):  %{_sbindir}/groupadd
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Bridge IOU to TAP, UDP and Ethernet, mainly used by gns3server

In order to use iouyap as non-root user, the user needs to be member of the iouyap group!

%setup -q

bison --yacc -dv netmap_parse.y
flex netmap_scan.l
gcc -I -Wall -fPIE %optflags *.c iniparser/*.c -o %{name} -lpthread -pie

%__mkdir_p %{buildroot}/%{_libexecdir}
%__mkdir_p %{buildroot}/%{_bindir}
%__mv %{name} %{buildroot}/%{_libexecdir}
ln -sf %{_libexecdir}/%{name} %{buildroot}/%{_bindir}/%{name}

%{_sbindir}/groupadd -r iouyap 2> /dev/null || :

%if 0%{?suse_version}
%set_permissions %{_libexecdir}/%{name}

%verify_permissions -e %{_libexecdir}/%{name}

%verify(not caps) %attr(0750,root,iouyap) %{_libexecdir}/%{name}

openSUSE Build Service is sponsored by