From 0a5578ac2d4661ca45357229589fb2efc205d5110445610945db1de387b9a419 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Fri, 27 May 2011 09:30:52 +0000 Subject: [PATCH 1/3] Updating link to change in openSUSE:Factory/postgresql revision 34.0 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=095280be53f3fca6493275ae647e2cd0 --- postgresql-libs.spec | 16 +++++++++++++--- postgresql.spec | 18 +++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/postgresql-libs.spec b/postgresql-libs.spec index 34301ea..88a0778 100644 --- a/postgresql-libs.spec +++ b/postgresql-libs.spec @@ -1,5 +1,5 @@ # -# spec file for package postgresql +# spec file for package postgresql-libs # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -15,18 +15,20 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: postgresql-libs %define _name postgresql %define libpq libpq5 %define libecpg libecpg6 %define buildall 0 %if 0%{?suse_version} > 910 -BuildRequires: krb5-devel libxslt-devel +BuildRequires: krb5-devel libxslt-devel %endif BuildRequires: openldap2-devel openssl-devel Summary: Basic Clients and Utilities for PostgreSQL Version: 9.0.4 -Release: 2 +Release: 1 %define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') License: BSD3c(or similar) Group: Productivity/Databases/Tools @@ -49,6 +51,7 @@ Patch5: postgresql-perl514.patch Url: http://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %pg_minor_version + %description PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including @@ -62,6 +65,7 @@ HTML documentation for PostgreSQL can be found in the postgresql-docs package. %package -n %libpq + License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients @@ -82,6 +86,7 @@ This package provides the client library that most PostgreSQL client program or language bindings are using. %package -n %libecpg + License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients @@ -97,6 +102,7 @@ This package provides the runtime library of the embedded SQL C preprocessor for PostgreSQL. %package -n %_name-devel + License: BSD3c(or similar) Summary: PostgreSQL development header files and libraries Group: Productivity/Databases/Tools @@ -179,9 +185,13 @@ rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) %find_lang ecpglib6-%{pg_minor_version} %libecpg.lang %find_lang ecpg-%{pg_minor_version} %_name-devel.lang %find_lang pg_config-%{pg_minor_version} %_name-devel.lang + %post -n %libpq -p /sbin/ldconfig + %postun -n %libpq -p /sbin/ldconfig + %post -n %libecpg -p /sbin/ldconfig + %postun -n %libecpg -p /sbin/ldconfig %clean diff --git a/postgresql.spec b/postgresql.spec index a135280..3ad66da 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -15,8 +15,10 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: postgresql -BuildRequires: gettext-devel zlib-devel ncurses-devel readline-devel uuid-devel +BuildRequires: gettext-devel ncurses-devel readline-devel uuid-devel zlib-devel BuildRequires: pam-devel python-devel tcl-devel %if 0%{?suse_version} >= 1110 BuildRequires: fdupes @@ -28,12 +30,12 @@ BuildRequires: fdupes %define libecpg libecpg6 %define buildall 0 %if 0%{?suse_version} > 910 -BuildRequires: krb5-devel libxslt-devel +BuildRequires: krb5-devel libxslt-devel %endif BuildRequires: openldap2-devel openssl-devel Summary: Basic Clients and Utilities for PostgreSQL Version: 9.0.4 -Release: 2 +Release: 1 %define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') License: BSD3c(or similar) Group: Productivity/Databases/Tools @@ -56,6 +58,7 @@ Patch5: postgresql-perl514.patch Url: http://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %pg_minor_version + %description PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including @@ -69,6 +72,7 @@ HTML documentation for PostgreSQL can be found in the postgresql-docs package. %package -n %libpq + License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients @@ -89,6 +93,7 @@ This package provides the client library that most PostgreSQL client program or language bindings are using. %package -n %libecpg + License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients @@ -163,6 +168,7 @@ PostgreSQL server, which will in turn allow you to create and maintain PostgreSQL databases. %package -n %_name-devel + License: BSD3c(or similar) Summary: PostgreSQL development header files and libraries Group: Productivity/Databases/Tools @@ -381,9 +387,13 @@ exit 0 groupadd -g 26 -o -r postgres >/dev/null 2>/dev/null || : useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ -c "PostgreSQL Server" -u 26 postgres 2>/dev/null || : + %post -n %libpq -p /sbin/ldconfig + %postun -n %libpq -p /sbin/ldconfig + %post -n %libecpg -p /sbin/ldconfig + %postun -n %libecpg -p /sbin/ldconfig %clean @@ -497,6 +507,7 @@ rm -f %my_provides %_libdir/postgresql/plpython*.so %if %buildall + %files -n %libpq -f %libpq.lang %defattr(-,root,root) %_libdir/libpq.so.* @@ -521,4 +532,5 @@ rm -f %my_provides %_datadir/postgresql/pg_service.conf.sample %endif + %changelog From 3284eba5df689a5c7c44961ae24dae277101b233f21f3199e81ca03f062b3bb6 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Wed, 8 Jun 2011 16:44:08 +0000 Subject: [PATCH 2/3] Revert the postgresq-libs split for SLE OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=58 --- postgresql-libs.changes | 6 ++++ postgresql-libs.spec | 62 ++++++++++++++++++++++++++++++--------- postgresql.changes | 6 ++++ postgresql.spec | 64 +++++++++++++++++++++++++++++++---------- postgresql.spec.in | 48 ++++++++++++++++++++++++++++++- 5 files changed, 157 insertions(+), 29 deletions(-) diff --git a/postgresql-libs.changes b/postgresql-libs.changes index c1bb407..3bc2c5b 100644 --- a/postgresql-libs.changes +++ b/postgresql-libs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 8 16:40:03 UTC 2011 - max@novell.com + +- Revert the postgresql-libs package split for SLE in preparation + of submitting the package to SLE11-SP1. + ------------------------------------------------------------------- Wed May 25 13:06:16 UTC 2011 - max@novell.com diff --git a/postgresql-libs.spec b/postgresql-libs.spec index 88a0778..a8474ef 100644 --- a/postgresql-libs.spec +++ b/postgresql-libs.spec @@ -1,5 +1,5 @@ # -# spec file for package postgresql-libs +# spec file for package postgresql # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -15,7 +15,11 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - +%if 0%{?sles_version} && %sles_version <= 11 +%define libs_package 1 +%else +%define libs_package 0 +%endif Name: postgresql-libs %define _name postgresql @@ -23,12 +27,12 @@ Name: postgresql-libs %define libecpg libecpg6 %define buildall 0 %if 0%{?suse_version} > 910 -BuildRequires: krb5-devel libxslt-devel +BuildRequires: krb5-devel libxslt-devel %endif BuildRequires: openldap2-devel openssl-devel Summary: Basic Clients and Utilities for PostgreSQL Version: 9.0.4 -Release: 1 +Release: 2 %define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') License: BSD3c(or similar) Group: Productivity/Databases/Tools @@ -51,7 +55,6 @@ Patch5: postgresql-perl514.patch Url: http://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %pg_minor_version - %description PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including @@ -64,8 +67,31 @@ as manual pages for the SQL commands that PostgreSQL supports. Full HTML documentation for PostgreSQL can be found in the postgresql-docs package. -%package -n %libpq +%if %libs_package +%package libs +License: BSD 3-Clause +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +# bug437293 +%ifarch ppc64 +Obsoletes: postgresql-libs-64bit +%endif +# +Provides: postgresql-libs = %pg_minor_version +PreReq: sh-utils fileutils +%description libs +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the essential shared libraries for (almost) any +PostgreSQL client program or interface. You will need to install this +package in order to use any other PostgreSQL package or any clients +that need to connect to a PostgreSQL server. +%else +%package -n %libpq License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients @@ -86,7 +112,6 @@ This package provides the client library that most PostgreSQL client program or language bindings are using. %package -n %libecpg - License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients @@ -100,13 +125,17 @@ and functions. This package provides the runtime library of the embedded SQL C preprocessor for PostgreSQL. +%endif %package -n %_name-devel - License: BSD3c(or similar) Summary: PostgreSQL development header files and libraries Group: Productivity/Databases/Tools +%if %libs_package +Requires: postgresql-libs +%else Requires: %libpq %libecpg +%endif %description -n %_name-devel PostgreSQL is an advanced object-relational database management system @@ -183,27 +212,34 @@ rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) %find_lang libpq5-%{pg_minor_version} %libpq.lang %find_lang ecpglib6-%{pg_minor_version} %libecpg.lang +cat %libpq.lang %libecpg.lang > postgresql-libs.lang %find_lang ecpg-%{pg_minor_version} %_name-devel.lang %find_lang pg_config-%{pg_minor_version} %_name-devel.lang - +%if %libs_package +%post -n postgresql-libs -p /sbin/ldconfig +%postun -n postgresql-libs -p /sbin/ldconfig +%else %post -n %libpq -p /sbin/ldconfig - %postun -n %libpq -p /sbin/ldconfig - %post -n %libecpg -p /sbin/ldconfig - %postun -n %libecpg -p /sbin/ldconfig +%endif %clean rm -rf %buildroot rm -f %my_provides +%if %libs_package +%files -n postgresql-libs -f postgresql-libs.lang +%else %files -n %libpq -f %libpq.lang +%endif %defattr(-,root,root) %_libdir/libpq.so.* - +%if !%libs_package %files -n %libecpg -f %libecpg.lang %defattr(-,root,root) +%endif %_libdir/libecpg*.so.* %_libdir/libpgtypes.so.* diff --git a/postgresql.changes b/postgresql.changes index c1bb407..3bc2c5b 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 8 16:40:03 UTC 2011 - max@novell.com + +- Revert the postgresql-libs package split for SLE in preparation + of submitting the package to SLE11-SP1. + ------------------------------------------------------------------- Wed May 25 13:06:16 UTC 2011 - max@novell.com diff --git a/postgresql.spec b/postgresql.spec index 3ad66da..d1875d7 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -15,10 +15,14 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - +%if 0%{?sles_version} && %sles_version <= 11 +%define libs_package 1 +%else +%define libs_package 0 +%endif Name: postgresql -BuildRequires: gettext-devel ncurses-devel readline-devel uuid-devel zlib-devel +BuildRequires: gettext-devel zlib-devel ncurses-devel readline-devel uuid-devel BuildRequires: pam-devel python-devel tcl-devel %if 0%{?suse_version} >= 1110 BuildRequires: fdupes @@ -30,12 +34,12 @@ BuildRequires: fdupes %define libecpg libecpg6 %define buildall 0 %if 0%{?suse_version} > 910 -BuildRequires: krb5-devel libxslt-devel +BuildRequires: krb5-devel libxslt-devel %endif BuildRequires: openldap2-devel openssl-devel Summary: Basic Clients and Utilities for PostgreSQL Version: 9.0.4 -Release: 1 +Release: 2 %define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') License: BSD3c(or similar) Group: Productivity/Databases/Tools @@ -58,7 +62,6 @@ Patch5: postgresql-perl514.patch Url: http://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %pg_minor_version - %description PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including @@ -71,8 +74,31 @@ as manual pages for the SQL commands that PostgreSQL supports. Full HTML documentation for PostgreSQL can be found in the postgresql-docs package. -%package -n %libpq +%if %libs_package +%package libs +License: BSD 3-Clause +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +# bug437293 +%ifarch ppc64 +Obsoletes: postgresql-libs-64bit +%endif +# +Provides: postgresql-libs = %pg_minor_version +PreReq: sh-utils fileutils +%description libs +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the essential shared libraries for (almost) any +PostgreSQL client program or interface. You will need to install this +package in order to use any other PostgreSQL package or any clients +that need to connect to a PostgreSQL server. +%else +%package -n %libpq License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients @@ -93,7 +119,6 @@ This package provides the client library that most PostgreSQL client program or language bindings are using. %package -n %libecpg - License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients @@ -107,6 +132,7 @@ and functions. This package provides the runtime library of the embedded SQL C preprocessor for PostgreSQL. +%endif %package server License: BSD3c(or similar) @@ -168,11 +194,14 @@ PostgreSQL server, which will in turn allow you to create and maintain PostgreSQL databases. %package -n %_name-devel - License: BSD3c(or similar) Summary: PostgreSQL development header files and libraries Group: Productivity/Databases/Tools +%if %libs_package +Requires: postgresql-libs +%else Requires: %libpq %libecpg +%endif %description -n %_name-devel PostgreSQL is an advanced object-relational database management system @@ -360,6 +389,7 @@ done %if %buildall %find_lang libpq5-%{pg_minor_version} %libpq.lang %find_lang ecpglib6-%{pg_minor_version} %libecpg.lang +cat %libpq.lang %libecpg.lang > postgresql-libs.lang %find_lang ecpg-%{pg_minor_version} %_name-devel.lang %find_lang pg_config-%{pg_minor_version} %_name-devel.lang %endif @@ -387,14 +417,15 @@ exit 0 groupadd -g 26 -o -r postgres >/dev/null 2>/dev/null || : useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ -c "PostgreSQL Server" -u 26 postgres 2>/dev/null || : - +%if %libs_package +%post -n postgresql-libs -p /sbin/ldconfig +%postun -n postgresql-libs -p /sbin/ldconfig +%else %post -n %libpq -p /sbin/ldconfig - %postun -n %libpq -p /sbin/ldconfig - %post -n %libecpg -p /sbin/ldconfig - %postun -n %libecpg -p /sbin/ldconfig +%endif %clean rm -rf %buildroot @@ -507,13 +538,17 @@ rm -f %my_provides %_libdir/postgresql/plpython*.so %if %buildall - +%if %libs_package +%files -n postgresql-libs -f postgresql-libs.lang +%else %files -n %libpq -f %libpq.lang +%endif %defattr(-,root,root) %_libdir/libpq.so.* - +%if !%libs_package %files -n %libecpg -f %libecpg.lang %defattr(-,root,root) +%endif %_libdir/libecpg*.so.* %_libdir/libpgtypes.so.* @@ -532,5 +567,4 @@ rm -f %my_provides %_datadir/postgresql/pg_service.conf.sample %endif - %changelog diff --git a/postgresql.spec.in b/postgresql.spec.in index 3a046a7..9788b38 100644 --- a/postgresql.spec.in +++ b/postgresql.spec.in @@ -15,6 +15,12 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%if 0%{?sles_version} && %sles_version <= 11 +%define libs_package 1 +%else +%define libs_package 0 +%endif + Name: postgresql IF_POSTGRES BuildRequires: gettext-devel zlib-devel ncurses-devel readline-devel uuid-devel @@ -70,6 +76,30 @@ as manual pages for the SQL commands that PostgreSQL supports. Full HTML documentation for PostgreSQL can be found in the postgresql-docs package. +%if %libs_package +%package libs +License: BSD 3-Clause +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +# bug437293 +%ifarch ppc64 +Obsoletes: postgresql-libs-64bit +%endif +# +Provides: postgresql-libs = %pg_minor_version +PreReq: sh-utils fileutils + +%description libs +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the essential shared libraries for (almost) any +PostgreSQL client program or interface. You will need to install this +package in order to use any other PostgreSQL package or any clients +that need to connect to a PostgreSQL server. +%else %package -n %libpq License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients @@ -104,6 +134,7 @@ and functions. This package provides the runtime library of the embedded SQL C preprocessor for PostgreSQL. +%endif IF_POSTGRES %package server @@ -170,7 +201,11 @@ FI_POSTGRES License: BSD3c(or similar) Summary: PostgreSQL development header files and libraries Group: Productivity/Databases/Tools +%if %libs_package +Requires: postgresql-libs +%else Requires: %libpq %libecpg +%endif %description -n %_name-devel PostgreSQL is an advanced object-relational database management system @@ -382,6 +417,7 @@ done FI_POSTGRES %find_lang libpq5-%{pg_minor_version} %libpq.lang %find_lang ecpglib6-%{pg_minor_version} %libecpg.lang +cat %libpq.lang %libecpg.lang > postgresql-libs.lang %find_lang ecpg-%{pg_minor_version} %_name-devel.lang %find_lang pg_config-%{pg_minor_version} %_name-devel.lang IF_POSTGRES @@ -411,10 +447,15 @@ groupadd -g 26 -o -r postgres >/dev/null 2>/dev/null || : useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ -c "PostgreSQL Server" -u 26 postgres 2>/dev/null || : FI_POSTGRES +%if %libs_package +%post -n postgresql-libs -p /sbin/ldconfig +%postun -n postgresql-libs -p /sbin/ldconfig +%else %post -n %libpq -p /sbin/ldconfig %postun -n %libpq -p /sbin/ldconfig %post -n %libecpg -p /sbin/ldconfig %postun -n %libecpg -p /sbin/ldconfig +%endif %clean rm -rf %buildroot @@ -529,12 +570,17 @@ IF_POSTGRES %if %buildall FI_POSTGRES +%if %libs_package +%files -n postgresql-libs -f postgresql-libs.lang +%else %files -n %libpq -f %libpq.lang +%endif %defattr(-,root,root) %_libdir/libpq.so.* - +%if !%libs_package %files -n %libecpg -f %libecpg.lang %defattr(-,root,root) +%endif %_libdir/libecpg*.so.* %_libdir/libpgtypes.so.* From f23786ec73480f4e4f2a8f5063aa55ec7f6b367cf484031758cc9fb99494de0b Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 26 Sep 2011 08:29:17 +0000 Subject: [PATCH 3/3] Accepting request 82527 from home:jengelh:bl - Add postgresql-devel to baselibs OBS-URL: https://build.opensuse.org/request/show/82527 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=59 --- baselibs.conf | 3 +++ postgresql-libs.changes | 5 +++++ postgresql-libs.spec | 17 +++++++++++++++-- postgresql.spec | 18 ++++++++++++++++-- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index 74eb44b..14c1825 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1,4 @@ libpq5 +postgresql-devel + requires -postgresql- + requires "libpq5- = " diff --git a/postgresql-libs.changes b/postgresql-libs.changes index 3bc2c5b..1a9a4e3 100644 --- a/postgresql-libs.changes +++ b/postgresql-libs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 16 17:17:08 UTC 2011 - jengelh@medozas.de + +- Add postgresql-devel to baselibs + ------------------------------------------------------------------- Wed Jun 8 16:40:03 UTC 2011 - max@novell.com diff --git a/postgresql-libs.spec b/postgresql-libs.spec index a8474ef..4d46708 100644 --- a/postgresql-libs.spec +++ b/postgresql-libs.spec @@ -1,5 +1,5 @@ # -# spec file for package postgresql +# spec file for package postgresql-libs # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %if 0%{?sles_version} && %sles_version <= 11 %define libs_package 1 %else @@ -27,7 +28,7 @@ Name: postgresql-libs %define libecpg libecpg6 %define buildall 0 %if 0%{?suse_version} > 910 -BuildRequires: krb5-devel libxslt-devel +BuildRequires: krb5-devel libxslt-devel %endif BuildRequires: openldap2-devel openssl-devel Summary: Basic Clients and Utilities for PostgreSQL @@ -55,6 +56,7 @@ Patch5: postgresql-perl514.patch Url: http://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %pg_minor_version + %description PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including @@ -68,6 +70,7 @@ HTML documentation for PostgreSQL can be found in the postgresql-docs package. %if %libs_package + %package libs License: BSD 3-Clause Summary: Shared Libraries Required for PostgreSQL Clients @@ -91,6 +94,7 @@ PostgreSQL client program or interface. You will need to install this package in order to use any other PostgreSQL package or any clients that need to connect to a PostgreSQL server. %else + %package -n %libpq License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients @@ -216,12 +220,18 @@ cat %libpq.lang %libecpg.lang > postgresql-libs.lang %find_lang ecpg-%{pg_minor_version} %_name-devel.lang %find_lang pg_config-%{pg_minor_version} %_name-devel.lang %if %libs_package + %post -n postgresql-libs -p /sbin/ldconfig + %postun -n postgresql-libs -p /sbin/ldconfig %else + %post -n %libpq -p /sbin/ldconfig + %postun -n %libpq -p /sbin/ldconfig + %post -n %libecpg -p /sbin/ldconfig + %postun -n %libecpg -p /sbin/ldconfig %endif @@ -230,13 +240,16 @@ rm -rf %buildroot rm -f %my_provides %if %libs_package + %files -n postgresql-libs -f postgresql-libs.lang %else + %files -n %libpq -f %libpq.lang %endif %defattr(-,root,root) %_libdir/libpq.so.* %if !%libs_package + %files -n %libecpg -f %libecpg.lang %defattr(-,root,root) %endif diff --git a/postgresql.spec b/postgresql.spec index d1875d7..44f104c 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %if 0%{?sles_version} && %sles_version <= 11 %define libs_package 1 %else @@ -22,7 +23,7 @@ %endif Name: postgresql -BuildRequires: gettext-devel zlib-devel ncurses-devel readline-devel uuid-devel +BuildRequires: gettext-devel ncurses-devel readline-devel uuid-devel zlib-devel BuildRequires: pam-devel python-devel tcl-devel %if 0%{?suse_version} >= 1110 BuildRequires: fdupes @@ -34,7 +35,7 @@ BuildRequires: fdupes %define libecpg libecpg6 %define buildall 0 %if 0%{?suse_version} > 910 -BuildRequires: krb5-devel libxslt-devel +BuildRequires: krb5-devel libxslt-devel %endif BuildRequires: openldap2-devel openssl-devel Summary: Basic Clients and Utilities for PostgreSQL @@ -62,6 +63,7 @@ Patch5: postgresql-perl514.patch Url: http://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %pg_minor_version + %description PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including @@ -75,6 +77,7 @@ HTML documentation for PostgreSQL can be found in the postgresql-docs package. %if %libs_package + %package libs License: BSD 3-Clause Summary: Shared Libraries Required for PostgreSQL Clients @@ -98,6 +101,7 @@ PostgreSQL client program or interface. You will need to install this package in order to use any other PostgreSQL package or any clients that need to connect to a PostgreSQL server. %else + %package -n %libpq License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients @@ -418,12 +422,18 @@ groupadd -g 26 -o -r postgres >/dev/null 2>/dev/null || : useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ -c "PostgreSQL Server" -u 26 postgres 2>/dev/null || : %if %libs_package + %post -n postgresql-libs -p /sbin/ldconfig + %postun -n postgresql-libs -p /sbin/ldconfig %else + %post -n %libpq -p /sbin/ldconfig + %postun -n %libpq -p /sbin/ldconfig + %post -n %libecpg -p /sbin/ldconfig + %postun -n %libecpg -p /sbin/ldconfig %endif @@ -539,13 +549,16 @@ rm -f %my_provides %if %buildall %if %libs_package + %files -n postgresql-libs -f postgresql-libs.lang %else + %files -n %libpq -f %libpq.lang %endif %defattr(-,root,root) %_libdir/libpq.so.* %if !%libs_package + %files -n %libecpg -f %libecpg.lang %defattr(-,root,root) %endif @@ -567,4 +580,5 @@ rm -f %my_provides %_datadir/postgresql/pg_service.conf.sample %endif + %changelog