File libnids.spec of Package libnids

#
# spec file for package libnids
#
# Copyright (c) 2014 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 http://bugs.opensuse.org/
#


Name:           libnids
Version:        1.24
Release:        0
%define soname 1.24
Summary:        Network Intrusion Detection System Library
License:        GPL-2.0+
Group:          System/Libraries
Url:            http://libnids.sourceforge.net/
Source:         https://sourceforge.net/projects/libnids/files/%name/%version/%name-%version.tar.gz
Source1:        https://sourceforge.net/projects/libnids/files/%name/%version/%name-%version.tar.gz.asc
Source2:        http://warszawa.7bulls.com/~nergal/nergal.pub#/libnids.keyring
BuildRequires:  glibc-devel
%if 0%{?suse_version} <= 1130
BuildRequires:  glib2-devel
BuildRequires:  libnet
%else
BuildRequires:  libnet-devel
BuildRequires:  pkgconfig(glib-2.0)
%endif
BuildRequires:  libpcap-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
%if 0%{?suse_version} >= 1230
BuildRequires:  gpg-offline
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Libnids is an implementation of an E-component of Network Intrusion Detection
System. It emulates the IP stack of Linux 2.0.x. Libnids offers IP
defragmentation, TCP stream assembly and TCP port scan detection.

%package -n libnids1_24
Summary:        Network Intrusion Detection System Library
Group:          System/Libraries

%description -n libnids1_24
Libnids is an implementation of an E-component of Network Intrusion Detection
System. It emulates the IP stack of Linux 2.0.x. Libnids offers IP
defragmentation, TCP stream assembly and TCP port scan detection.

%package devel
Summary:        Network Intrusion Detection System Library
Group:          Development/Libraries/C and C++
%if 0%{?suse_version} <= 1130
BuildRequires:  libnet
%else
Requires:       libnet
%endif
Requires:       libnids1_24 = %{version}
Requires:       libpcap-devel
%if 0%{?suse_version} <= 1130
Requires:       glib2-devel
%else
Requires:       pkgconfig(glib-2.0)
%endif

%description devel
Libnids is an implementation of an E-component of Network Intrusion Detection
System. It emulates the IP stack of Linux 2.0.x. Libnids offers IP
defragmentation, TCP stream assembly and TCP port scan detection.

%prep
%{?gpg_verify: %gpg_verify %{S:1}}
%setup -q
%ifarch ppc64
libtoolize --force
%__cp -f %{_datadir}/automake-*/config.* .
%endif

%build
%configure \
	 --enable-shared

make %{?_smp_mflags}

%install
make install_prefix="%{buildroot}" install

%post   -n libnids1_24 -p /sbin/ldconfig

%postun -n libnids1_24 -p /sbin/ldconfig

%files -n libnids1_24
%defattr(-,root,root)
%doc CHANGES COPYING CREDITS MISC README
%{_libdir}/libnids.so.%{soname}

%files devel
%defattr(-,root,root)
%{_includedir}/nids.h
%{_libdir}/libnids.so
%{_libdir}/libnids.a
%doc %{_mandir}/man3/libnids.3%{ext_man}

%changelog
openSUSE Build Service is sponsored by