LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libnetfilter_queue.spec of Package libnetfilter_queue (Project home:aevseev)

%define realname libnetfilter_queue
%define realver  1.0.3
%define srcext   tar.bz2

%define so_ver   1

# Common info
Name:          %{realname}%{?so_ver}
Version:       %{realver}
Release:       wiz%{?extraver:0.}1%{?dist}
License:       GPL-2.0
Group:         System/Libraries
URL:           http://www.netfilter.org/projects/libnetfilter_queue/
Summary:       Netfilter userspace packet queueing library

# Install-time parameters
Provides:      %{realname}

# Build-time parameters
BuildRequires: pkgconfig
BuildRequires: libnfnetlink-devel >= 0.0.41
BuildRequires: libmnl-devel >= 1.0.3
BuildRoot:     %{_tmppath}/%{name}-root
Source:        http://www.netfilter.org/projects/libnetfilter_queue/files/%{realname}-%{realver}.%{srcext}

%description
libnetfilter_queue is a userspace library providing an API to packets that have
been queued by the kernel packet filter. It is is part of a system that
deprecates the old ip_queue / libipq mechanism.

%package -n %{realname}-devel
Group:         Development/Languages/C and C++
Summary:       Development files for %{name}
Requires:      %{name} = %{version}

%description -n %{realname}-devel
Development files for %{name}

# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}

%build
%configure \
 --disable-static \
 CFLAGS="%{optflags} %{?gcc_lto}" \
 CXXFLAGS="%{optflags} %{?gcc_lto}" \
 LDFLAGS="-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}"
%__make %{?_smp_mflags}

%install
%__make install DESTDIR=%{buildroot}

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING
%{_libdir}/*.so.%{?so_ver}*

# Development stuff
%files -n %{realname}-devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/%{realname}.pc
%{_includedir}/%{realname}/
%{_libdir}/*.so
%exclude %{_libdir}/*.la

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

%changelog

%changelog -n %{realname}-devel