diff options
author | Milan Crha <mcrha@redhat.com> | 2023-11-22 10:53:04 +0100 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2023-11-22 10:53:04 +0100 |
commit | b19f149b6c92499bfcb2e7ee61bb9fc0bb477759 (patch) | |
tree | bbf952f0d88f440dd83a90af361fab52f901dfe5 | |
parent | 463ca6ef5e3cf53f4263c8407eaa960a7c768d20 (diff) | |
download | bogofilter_EL6-b19f149b6c92499bfcb2e7ee61bb9fc0bb477759.tar.gz |
Add option to build with bundled gsl
In case some future releases stop providing the system GSL library.
-rw-r--r-- | bogofilter.spec | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/bogofilter.spec b/bogofilter.spec index 9bbc270..574abe0 100644 --- a/bogofilter.spec +++ b/bogofilter.spec @@ -1,5 +1,6 @@ %global with_libdb_migration 1 %global libdb_migration_build_dir libdb_migration_build +%{!?with_system_gsl: %global with_system_gsl (%{undefined rhel} || 0%{?rhel} < 10)} Summary: Fast anti-spam filtering by Bayesian statistical analysis Name: bogofilter @@ -9,13 +10,19 @@ License: GPL-2.0-only URL: http://bogofilter.sourceforge.net/ Source0: http://downloads.sourceforge.net/bogofilter/bogofilter-%{version}.tar.xz BuildRequires: gcc -BuildRequires: flex gsl-devel +BuildRequires: flex BuildRequires: pkgconfig(sqlite3) BuildRequires: /usr/bin/iconv BuildRequires: /usr/bin/xmlto BuildRequires: perl-generators BuildRequires: make +%if %{with_system_gsl} +BuildRequires: gsl-devel +%else +Provides: bundled(gsl) = 1.4 +%endif + %if %{with_libdb_migration} BuildRequires: libdb-devel-static %endif @@ -61,7 +68,13 @@ iconv -f iso-8859-1 -t utf-8 \ %endif %build -%configure --disable-rpath --with-database=sqlite3 +%configure --disable-rpath \ + --with-database=sqlite3 \ +%if !%{with_system_gsl} + --with-included-gsl=yes \ +%endif + %{nil} + %{__make} %{?_smp_mflags} %if %{with_libdb_migration} |