File maji.spec of Package maji

#
# spec file for package maji
#
# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
#
# 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:           maji
Version:        1.0.2
Release:        0
Summary:        An implementation of an IPFIX meter
License:        GPL-2.0
Group:          System/Monitoring
Url:            http://research.wand.net.nz/software/maji.php
Source:         http://research.wand.net.nz/software/%{name}/%{name}-%{version}.tar.gz
Source1:        maji.config
Patch0:         x.diff
BuildRequires:  gcc-c++
BuildRequires:  libconfuse-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libtrace-devel
BuildRequires:  libwandevent2-devel
BuildRequires:  lksctp-tools-devel
BuildRequires:  sqlite3-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Maji is an implementation of an IPFIX meter based on the libtrace packet capture
and processing library. IPFIX itself is a standardised method for performing and
exporting flow measurement data, similar to the Cisco NetFlow standard.

Maji is developed by the WAND Network Research Group at Waikato
University in New Zealand.

%package -n libwandipfix1
Summary:        A library written in C for developing IPFIX programs
Group:          System/Libraries
Provides:       libwandfix1 = %{version}-%{release}

%description -n libwandipfix1
Maji acts the executable portion of our IPFIX meter implementation. It is
essentially quite simple, reading libtrace packets and passing them into
libwandipfix via the 3 function API described in traceipfix.h. Libwandipfix
handles everything else, including expiring and exporting flow records,
forming valid IPFIX packets and conforming to various other IPFIX rules
and regulations.

Libwandipfix is developed by the WAND Network Research Group at Waikato
University in New Zealand.

%package devel
Summary:        Development headers for the libwandipfix library
Group:          Development/Libraries/Other
Requires:       libwandipfix1 = %{version}-%{release}

%description devel
This package contains development headers and other ancillary files for
the libwandipfix library.

Maji acts the executable portion of our IPFIX meter implementation. It is
essentially quite simple, reading libtrace packets and passing them into
libwandipfix via the 3 function API described in traceipfix.h. Libwandipfix
handles everything else, including expiring and exporting flow records,
forming valid IPFIX packets and conforming to various other IPFIX rules
and regulations.

Libwandipfix is developed by the WAND Network Research Group at Waikato
University in New Zealand.

%prep
%setup -q
%patch0 -p1

%build
%configure --disable-static
# parallel build is broken
make #%{?_smp_mflags}

%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
find %{buildroot} -type f -name "*.la" -delete -print
install -Dpm0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/maji.config

%post   -n libwandipfix1 -p /sbin/ldconfig
%postun -n libwandipfix1 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING README
%{_bindir}/maji
%{_bindir}/majid
%{_bindir}/simple_sctp_reader
%{_bindir}/simple_tcp_reader
%{_bindir}/simple_udp_reader
%config %{_sysconfdir}/maji.config
%dir %{_libexecdir}/maji
%{_libexecdir}/maji/info_elements
%{_libexecdir}/maji/info_elements/*.so

%files -n libwandipfix1
%defattr(-,root,root)
%{_libdir}/libwandipfix.so.*

%files devel
%defattr(-,root,root)
%{_libdir}/libwandipfix.so

%changelog
openSUSE Build Service is sponsored by