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 c1bb407..1a9a4e3 100644 --- a/postgresql-libs.changes +++ b/postgresql-libs.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +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 + +- 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..4d46708 100644 --- a/postgresql-libs.spec +++ b/postgresql-libs.spec @@ -16,6 +16,11 @@ # +%if 0%{?sles_version} && %sles_version <= 11 +%define libs_package 1 +%else +%define libs_package 0 +%endif Name: postgresql-libs %define _name postgresql @@ -28,7 +33,7 @@ BuildRequires: krb5-devel libxslt-devel 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 @@ -64,8 +69,33 @@ 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 +116,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 +129,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,8 +216,15 @@ 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 @@ -193,17 +233,26 @@ rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) %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..44f104c 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -16,6 +16,11 @@ # +%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 @@ -35,7 +40,7 @@ BuildRequires: krb5-devel libxslt-devel 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 @@ -71,8 +76,33 @@ 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 +123,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 +136,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 +198,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 +393,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,6 +421,12 @@ 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 @@ -395,6 +435,7 @@ useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ %post -n %libecpg -p /sbin/ldconfig %postun -n %libecpg -p /sbin/ldconfig +%endif %clean rm -rf %buildroot @@ -507,13 +548,20 @@ 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.* 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.*