%define module_name ipt_NETFLOW %define dkms_package dkms-%{module_name} Name: %{module_name} Version: 1.8 Release: %mkrel 4 Summary: DKMS-ready module for ipt_netflow an iptables modules License: GPLv3 Source: http://sourceforge.net/projects/ipt_netflow/files/ipt_netflow/%{module_name}-%{version}.tgz # Disable searching for iptables sources, not used anyway Patch0: ipt_NETFLOW-1.8-nosrc.patch # Split build of module and library by fixing dependencies in Makefile Patch1: ipt_NETFLOW-1.8-split-build.patch # Support destdir for installing the library Patch2: ipt_NETFLOW-1.8-destdir.patch # Fix build on recent kernels Patch3: ipt_NETFLOW-1.8-build.patch Group: Development/Kernel BuildRequires: pkgconfig(xtables) pkgconfig(libiptc) %description ipt_netflow is very fast and effective Netflow exporting module for Linux kernel. This is netfilter/iptables module adding support for NETFLOW target. %package -n %{dkms_package} Summary: DKMS-ready module for ipt_netflow an iptables modules Requires(pre): dkms Requires(post): dkms BuildArch: noarch %description -n %{dkms_package} ipt_netflow is very fast and effective Netflow exporting module for Linux kernel. This is netfilter/iptables module adding support for NETFLOW target. This package provides the %{module_name} kernel module(s). %package -n iptables-NETFLOW Summary: The NETFLOW library which will be loaded by iptables when NETFLOW rules are processed Requires: kmod(ipt_NETFLOW) %description -n iptables-NETFLOW The NETFLOW library which will be loaded by iptables when NETFLOW rules are processed. %prep %setup -q -n ipt_netflow-%{version} %apply_patches %build ./configure %make libipt_NETFLOW.so %install rm -rf %{buildroot} # Install the library make DESTDIR=%{buildroot} linstall # Install the sources of the module mkdir -p %{buildroot}/usr/src/ mkdir -p %{buildroot}/usr/src/%{module_name}-%{version}-%{release} cp -a ../ipt_netflow-%{version}/*.{c,h} %{buildroot}/usr/src/%{module_name}-%{version}-%{release} cat > %{buildroot}/usr/src/%{module_name}-%{version}-%{release}/dkms.conf <