1
0
xtables-addons/xtables-addons.spec
Jan Engelhardt 19b7edfa31 Accepting request 143990 from home:sbrabec:gpg-offline-verify
Verify GPG signature: Perform build-time offline GPG verification.
Please verify that included keyring matches your needs.
For manipulation with the offline keyring, please use gpg-offline tool from openSUSE:Factory, devel-tools-building or Base:System.
See the man page and/or /usr/share/doc/packages/gpg-offline/PACKAGING.HOWTO.

If you need to build your package for older products and don't want to mess spec file with ifs, please follow PACKAGING.HOWTO:
you can link or aggregate gpg-offline from
devel:tools:building or use following trick with "osc meta prjconf":

--- Cut here ----
%if 0%{?suse_version} <= 1220
Substitute: gpg-offline
%endif

Macros:
%gpg_verify(dnf) \
%if 0%{?suse_version} > 1220\
echo "WARNING: Using %%gpg_verify macro from prjconf, not from gpg-offline package."\
gpg-offline --directory="%{-d:%{-d*}}%{!-d:%{_sourcedir}}" --package="%{-n:%{-n*}}%{!-n:%{name}}""%{-f: %{-f*}}" --verify %{**}\
%else\
echo "WARNING: Dummy prjconf macro. gpg-offline is not available, skipping %{**} GPG signature verification!"\
%endif\
%nil
-----------------

OBS-URL: https://build.opensuse.org/request/show/143990
OBS-URL: https://build.opensuse.org/package/show/security:netfilter/xtables-addons?expand=0&rev=64
2012-12-09 22:36:50 +00:00

134 lines
3.7 KiB
RPMSpec

#
# spec file for package xtables-addons
#
# Copyright (c) 2012 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: xtables-addons
%if "%_repository" == "Kernel_HEAD"
Version: 2.0
Release: 0
%else
Version: 1.47.1
Release: 0
%endif
Summary: IP Packet Filter Administration Extensions
License: GPL-2.0 ; GPL-2.0+
Group: Productivity/Networking/Security
Url: http://xtables-addons.sf.net/
#Git-Clone: git://xtables-addons.git.sf.net/gitroot/xtables-addons/xtables-addons
#Git-Web: http://xtables-addons.git.sf.net/
%define git_snapshot 0
Source: %name-%version.tar.xz
Source2: %name-%version.tar.xz.asc
Source3: %name-preamble
Source4: %{name}.keyring
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gpg-offline
%if %git_snapshot
BuildRequires: autoconf
BuildRequires: automake >= 1.10b
BuildRequires: libtool
%endif
BuildRequires: pkgconfig >= 0.21
BuildRequires: xz
%if 0%{?suse_version} >= 1140 || 0%{?fedora_version}
BuildRequires: pkgconfig(xtables) >= 1.4.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: libxtables-devel >= 1.4.5
%endif
%if 0%{?redhat_version} || 0%{?centos_version}
BuildRequires: libxtables-devel >= 1.4.5
%endif
%if 0%{?suse_version}
BuildRequires: %kernel_module_package_buildreqs
Recommends: %name-kmp
Recommends: xtables-geoip
%else
Requires: xtables-geoip
%endif
%define xtlibdir %(pkg-config xtables --variable=xtlibdir)
%kernel_module_package -p %name-preamble
%description
Xtables is used to set up, maintain, and inspect the tables of IP
packet filter rules in the Linux kernel.
Xtables-addons is the successor to patch-o-matic(-ng). Likewise, it
contains extensions that were not, or are not yet, accepted in the
main kernel/iptables packages.
%package KMP
Summary: IP Packet Filter Administration Extensions
Group: System/Kernel
%description KMP
Xtables is used to set up, maintain, and inspect the tables of IP
packet filter rules in the Linux kernel.
Xtables-addons is the successor to patch-o-matic(-ng). Likewise, it
contains extensions that were not, or are not yet, accepted in the
main kernel/iptables packages.
%prep
%gpg_verify %{S:2}
echo "Version: %version"
echo "Repository: %_repository"
%setup -q
%build
if [ ! -e configure ]; then
./autogen.sh;
fi;
pushd ../;
for flavor in %flavors_to_build; do
cp -a "%name-%version" "%name-$flavor-%version";
pushd "%name-$flavor-%version/";
%configure --with-kbuild="/usr/src/linux-obj/%_target_cpu/$flavor";
make %{?_smp_mflags};
popd;
done;
%install
b="%buildroot";
pushd ../;
for flavor in %flavors_to_build; do
pushd "%name-$flavor-%version/";
make install DESTDIR="$b";
popd;
done;
# There is no -devel package. So no need for these files.
find "$b/%_prefix" -iname "*.la" -delete;
find "$b/%_libdir" -maxdepth 1 -type l -iname "*.so" -delete;
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc %_mandir/*/*
%_sbindir/*
%_libdir/*.so.*
%xtlibdir
%_libexecdir/xtables-addons
%changelog