Clean libpreludedb-config

This commit is contained in:
Thomas Andrejak 2020-09-20 23:54:36 +02:00
parent 5e0f8f761e
commit edf01c47b8
3 changed files with 63 additions and 24 deletions

View File

@ -0,0 +1,56 @@
Description: Clean libpreludedb-config
Author: Thomas Andrejak <thomas.andrejak@gmail.com>
Last-Update: 2020-09-20
--- a/libpreludedb-config.in 2020-09-09 16:36:50.110000000 +0200
+++ b/libpreludedb-config.in 2020-09-20 23:30:02.097649400 +0200
@@ -3,6 +3,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
+cpp_set=no
want_cflags=no
want_libs=no
thread_set=no
@@ -54,6 +55,10 @@
echo @LIBPRELUDE_LDFLAGS@
;;
+ --c++)
+ cpp_set=yes
+ ;;
+
--libs)
want_libs=yes
;;
@@ -85,12 +90,19 @@
flags=$flags @THREADCPPFLAGS@
fi
- echo $flags
+ echo @LIBPRELUDEDB_CFLAGS@ $flags
fi
if test $want_libs = yes; then
- libdirs=-L@libdir@
+ libdirs=
+ if test @libdir@ != /usr/lib -a @libdir@ != /usr/lib64 ; then
+ libdirs=-L@libdir@
+ fi
+ cpplibs=""
+ if test $cpp_set = yes; then
+ cpplibs="-lpreludedbcpp"
+ fi
if test $thread_set = yes; then
thrlibs=@LTLIBMULTITHREAD@
@@ -98,7 +110,7 @@
thrlibs=@LTLIBTHREAD@
fi
- echo $libdirs -lpreludedb @LIBPRELUDE_LIBS@ $thrlibs
+ echo $cpplibs $libdirs -lpreludedb $thrlibs
fi
exit 0

View File

@ -1,20 +0,0 @@
Description: Fix libdir definition
Author: Thomas Andrejak <thomas.andrejak@gmail.com>
Last-Update: 2018-02-10
--- libpreludedb-3.1.0/libpreludedb-config.in 2018-02-10 20:26:02.511884738 -0500
+++ libpreludedb-3.1.0/libpreludedb-config.in 2018-02-10 20:25:57.140005520 -0500
@@ -90,7 +90,12 @@
if test $want_libs = yes; then
- libdirs=-L@libdir@
+ libdirs=""
+
+ # Set up `libdirs'.
+ if test "x@libdir@" != "x/usr/lib"; then
+ libdirs="-L@libdir@"
+ fi
if test $thread_set = yes; then
thrlibs=@LTLIBMULTITHREAD@

View File

@ -5,7 +5,7 @@
Name: libpreludedb Name: libpreludedb
Version: 5.2.0 Version: 5.2.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: Framework for easy access to the IDMEF database Summary: Framework for easy access to the IDMEF database
# Prelude is GPL-2.0+ # Prelude is GPL-2.0+
# libmissing is LGPL-2.1+ # libmissing is LGPL-2.1+
@ -18,9 +18,9 @@ Patch1: libpreludedb-5.2.0-fix_gtkdoc_1.32.patch
Patch2: libpreludedb-5.2.0-force_preludedb_admin_with_py3.patch Patch2: libpreludedb-5.2.0-force_preludedb_admin_with_py3.patch
Patch3: libpreludedb-5.2.0-update_m4_postgresql.patch Patch3: libpreludedb-5.2.0-update_m4_postgresql.patch
Patch4: libpreludedb-5.2.0-Add-pkg-config-file.patch Patch4: libpreludedb-5.2.0-Add-pkg-config-file.patch
Patch5: libpreludedb-5.2.0-Fix_libdir_definition.patch Patch5: libpreludedb-5.2.0-fix-test_rwlock1.patch
Patch6: libpreludedb-5.2.0-fix-test_rwlock1.patch Patch6: libpreludedb-5.2.0-fix_thread_create.patch
Patch7: libpreludedb-5.2.0-fix_thread_create.patch Patch7: libpreludedb-5.2.0-Clean_libpreludedb-config.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: bison BuildRequires: bison
@ -208,6 +208,9 @@ chmod +x %{buildroot}%{_datadir}/%{name}/classic/mysql2sqlite.sh
%doc ChangeLog README NEWS %doc ChangeLog README NEWS
%changelog %changelog
* Fri Sep 18 2020 Thomas Andrejak <thomas.andrejak@gmail.com> - 5.2.0-2
- Clean libpreludedb-config
* Thu Sep 17 2020 Thomas Andrejak <thomas.andrejak@gmail.com> - 5.2.0-1 * Thu Sep 17 2020 Thomas Andrejak <thomas.andrejak@gmail.com> - 5.2.0-1
- Bump version 5.2.0 - Bump version 5.2.0