Accepting request 935203 from server:database:postgresql
- Move the dependency of llvmjit-devel on clang and llvm to the implementation packages where we can depend on the correct versions. - fix postgresql_has_llvm usage - First round of changes to make it easier to build extensions for - add postgresql-llvmjit-devel subpackage: This package will pull in clang and llvm if the distro has a recent enough version, otherwise it will just pull postgresql-server-devel. - add postgresql macros to the postgresql-server-devel package those cover all the variables from pg_config and some macros to remove repitition from the spec files OBS-URL: https://build.opensuse.org/request/show/935203 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql?expand=0&rev=62
This commit is contained in:
commit
0b99fba69f
53
postgresql-extensions-macros
Normal file
53
postgresql-extensions-macros
Normal file
@ -0,0 +1,53 @@
|
||||
#
|
||||
# License AGPL-3.0
|
||||
#
|
||||
# keep in sync with the postgresqlXY packages
|
||||
#
|
||||
|
||||
%pg_config_bindir %(pg_config --bindir)
|
||||
%pg_config_docdir %(pg_config --docdir)
|
||||
%pg_config_htmldir %(pg_config --htmldir)
|
||||
%pg_config_includedir %(pg_config --includedir)
|
||||
%pg_config_pkgincludedir %(pg_config --pkgincludedir)
|
||||
%pg_config_includedir_server %(pg_config --includedir-server)
|
||||
%pg_config_libdir %(pg_config --libdir)
|
||||
%pg_config_pkglibdir %(pg_config --pkglibdir)
|
||||
%pg_config_localedir %(pg_config --localedir)
|
||||
%pg_config_mandir %(pg_config --mandir)
|
||||
%pg_config_sharedir %(pg_config --sharedir)
|
||||
%pg_config_sysconfdir %(pg_config --sysconfdir)
|
||||
%pg_config_pgxs %(pg_config --pgxs)
|
||||
%pg_config_configure %(pg_config --configure)
|
||||
%pg_config_cc %(pg_config --cc)
|
||||
%pg_config_cppflags %(pg_config --cppflags)
|
||||
%pg_config_cflags %(pg_config --cflags)
|
||||
%pg_config_cflags_sl %(pg_config --cflags_sl)
|
||||
%pg_config_ldflags %(pg_config --ldflags)
|
||||
%pg_config_ldflags_ex %(pg_config --ldflags_ex)
|
||||
%pg_config_ldflags_sl %(pg_config --ldflags_sl)
|
||||
%pg_config_libs %(pg_config --libs)
|
||||
|
||||
%make_pgxs \
|
||||
make USE_PGXS=1 %{?_smp_mflags} \
|
||||
%nil
|
||||
|
||||
%make_pgxs_install \
|
||||
%make_install USE_PGXS=1 \
|
||||
%nil
|
||||
|
||||
%pg_obsolete_llvm_subpackage \
|
||||
Provides: %{pg_name}-%{ext_name}-llvmjit = %{version}-%{release} \
|
||||
Obsoletes: %{pg_name}-%{ext_name}-llvmjit < %{version}-%{release} \
|
||||
%nil
|
||||
|
||||
%pg_server_requires \
|
||||
%requires_eq %{pg_name}-server \
|
||||
%if %{postgresql_has_llvm} \
|
||||
Recommends: %{pg_name}-llvmjit \
|
||||
%pg_obsolete_llvm_subpackage \
|
||||
%endif \
|
||||
%nil
|
||||
|
||||
%pg_version_from_name %define pg_version %( echo %{?pg_name} | sed -e 's|^postgresql||g' )%{nil}
|
||||
%postgresql_has_llvm (0%{?suse_version} >= 1500 && 0%{?pg_version} >= 11 && 0%{?pg_version} < 90)
|
||||
|
@ -1,3 +1,27 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 2 14:08:12 UTC 2021 - Reinhard Max <max@suse.com>
|
||||
|
||||
- Move the dependency of llvmjit-devel on clang and llvm to the
|
||||
implementation packages where we can depend on the correct
|
||||
versions.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 2 11:45:03 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- fix postgresql_has_llvm usage
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 15 12:09:10 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- First round of changes to make it easier to build extensions for
|
||||
- add postgresql-llvmjit-devel subpackage:
|
||||
This package will pull in clang and llvm if the distro has a
|
||||
recent enough version, otherwise it will just pull
|
||||
postgresql-server-devel.
|
||||
- add postgresql macros to the postgresql-server-devel package
|
||||
those cover all the variables from pg_config and some macros
|
||||
to remove repitition from the spec files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 5 14:03:55 UTC 2021 - Reinhard Max <max@suse.com>
|
||||
|
||||
|
@ -18,6 +18,10 @@
|
||||
%define pgmajor 14
|
||||
%define defaultpackage postgresql%pgmajor
|
||||
|
||||
%if ! %{defined _rpmmacrodir}
|
||||
%define _rpmmacrodir %{_rpmconfigdir}/macros.d
|
||||
%endif
|
||||
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir /var/adm/fillup-templates
|
||||
@ -29,7 +33,8 @@
|
||||
%bcond_with systemd
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} >= 1500 && %pgmajor >= 11 && %pgmajor < 90
|
||||
# We do not need the pgmajor comparison here as it is irrelevant which version this package has
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%bcond_without llvm
|
||||
%else
|
||||
%bcond_with llvm
|
||||
@ -69,6 +74,7 @@ Source4: postgresql.service
|
||||
Source5: postgresql-bashprofile
|
||||
Source6: postgresql-script
|
||||
Source7: postgresql-install-alternatives
|
||||
Source8: postgresql-extensions-macros
|
||||
|
||||
%if 0%{?suse_version} > 1100
|
||||
%define fwdir /etc/sysconfig/SuSEfirewall2.d/services
|
||||
@ -157,6 +163,24 @@ PostgreSQL queries. Using LLVM it compiles e.g. expressions and tuple
|
||||
deforming into native code, with the goal of accelerating analytics
|
||||
queries.
|
||||
|
||||
%package llvmjit-devel
|
||||
Summary: Helper package to pull all dependencies to build with llvm support
|
||||
Group: Productivity/Databases/Servers
|
||||
Provides: postgresql-llvmjit-devel-noarch = %version-%release
|
||||
Requires: postgresql-server-devel-noarch
|
||||
Requires: postgresql-llvmjit-devel-implementation
|
||||
|
||||
%description llvmjit-devel
|
||||
PostgreSQL is an advanced object-relational database management system
|
||||
that supports an extended subset of the SQL standard, including
|
||||
transactions, foreign keys, sub-queries, triggers, and user-defined
|
||||
types and functions.
|
||||
|
||||
This package will pull all the dependencies to build extensions with llvm
|
||||
support if the base distro has llvm enabled.
|
||||
|
||||
Otherwise it will just pull the postgresqlXY-server-devel package
|
||||
|
||||
%package test
|
||||
Summary: The test suite for PostgreSQL
|
||||
Group: Productivity/Databases/Servers
|
||||
@ -277,7 +301,7 @@ that supports an extended subset of the SQL standard, including
|
||||
transactions, foreign keys, subqueries, triggers, and user-defined
|
||||
types and functions.
|
||||
|
||||
This package contains the PL/Tcl procedural language for PostgreSQL.
|
||||
This package contains the PL/Tcl procedural language for PostgreSQL.
|
||||
With thie module one can use Tcl to write stored procedures, functions,
|
||||
and triggers.
|
||||
|
||||
@ -319,6 +343,9 @@ install -m755 %{S:0} %buildroot/etc/init.d/postgresql
|
||||
ln -sf /etc/init.d/postgresql %buildroot/usr/sbin/rcpostgresql
|
||||
%endif
|
||||
|
||||
install -D -m 0644 %{SOURCE8} %{buildroot}%{_rpmmacrodir}/macros.%{name}
|
||||
|
||||
|
||||
%define eflag /run/postgresql-was-enabled
|
||||
%define aflag /run/postgresql-was-running
|
||||
|
||||
@ -445,11 +472,16 @@ fi
|
||||
%files server-devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc README
|
||||
%{_rpmmacrodir}/macros.%{name}
|
||||
|
||||
%if %{with llvm}
|
||||
%files llvmjit
|
||||
%defattr(-,root,root,-)
|
||||
%doc README
|
||||
|
||||
%files llvmjit-devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc README
|
||||
%endif
|
||||
|
||||
%files plperl
|
||||
|
Loading…
Reference in New Issue
Block a user