Accepting request 84796 from server:database:postgresql

- Add postgresql-devel to baselibs (forwarded request 82527 from jengelh)

OBS-URL: https://build.opensuse.org/request/show/84796
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql?expand=0&rev=35
This commit is contained in:
Lars Vogdt 2011-10-02 08:25:35 +00:00 committed by Git OBS Bridge
commit 56431f7bc8
6 changed files with 172 additions and 9 deletions

View File

@ -1 +1,4 @@
libpq5 libpq5
postgresql-devel
requires -postgresql-<targettype>
requires "libpq5-<targettype> = <version>"

View File

@ -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 Wed May 25 13:06:16 UTC 2011 - max@novell.com

View File

@ -16,6 +16,11 @@
# #
%if 0%{?sles_version} && %sles_version <= 11
%define libs_package 1
%else
%define libs_package 0
%endif
Name: postgresql-libs Name: postgresql-libs
%define _name postgresql %define _name postgresql
@ -28,7 +33,7 @@ BuildRequires: krb5-devel libxslt-devel
BuildRequires: openldap2-devel openssl-devel BuildRequires: openldap2-devel openssl-devel
Summary: Basic Clients and Utilities for PostgreSQL Summary: Basic Clients and Utilities for PostgreSQL
Version: 9.0.4 Version: 9.0.4
Release: 1 Release: 2
%define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') %define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/')
License: BSD3c(or similar) License: BSD3c(or similar)
Group: Productivity/Databases/Tools 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 HTML documentation for PostgreSQL can be found in the postgresql-docs
package. 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) License: BSD3c(or similar)
Summary: Shared Libraries Required for PostgreSQL Clients Summary: Shared Libraries Required for PostgreSQL Clients
Group: Productivity/Databases/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. program or language bindings are using.
%package -n %libecpg %package -n %libecpg
License: BSD3c(or similar) License: BSD3c(or similar)
Summary: Shared Libraries Required for PostgreSQL Clients Summary: Shared Libraries Required for PostgreSQL Clients
Group: Productivity/Databases/Clients Group: Productivity/Databases/Clients
@ -100,13 +129,17 @@ and functions.
This package provides the runtime library of the embedded SQL C This package provides the runtime library of the embedded SQL C
preprocessor for PostgreSQL. preprocessor for PostgreSQL.
%endif
%package -n %_name-devel %package -n %_name-devel
License: BSD3c(or similar) License: BSD3c(or similar)
Summary: PostgreSQL development header files and libraries Summary: PostgreSQL development header files and libraries
Group: Productivity/Databases/Tools Group: Productivity/Databases/Tools
%if %libs_package
Requires: postgresql-libs
%else
Requires: %libpq %libecpg Requires: %libpq %libecpg
%endif
%description -n %_name-devel %description -n %_name-devel
PostgreSQL is an advanced object-relational database management system 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 libpq5-%{pg_minor_version} %libpq.lang
%find_lang ecpglib6-%{pg_minor_version} %libecpg.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 ecpg-%{pg_minor_version} %_name-devel.lang
%find_lang pg_config-%{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 %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 %post -n %libecpg -p /sbin/ldconfig
%postun -n %libecpg -p /sbin/ldconfig %postun -n %libecpg -p /sbin/ldconfig
%endif
%clean %clean
rm -rf %buildroot rm -rf %buildroot
rm -f %my_provides rm -f %my_provides
%if %libs_package
%files -n postgresql-libs -f postgresql-libs.lang
%else
%files -n %libpq -f %libpq.lang %files -n %libpq -f %libpq.lang
%endif
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libpq.so.* %_libdir/libpq.so.*
%if !%libs_package
%files -n %libecpg -f %libecpg.lang %files -n %libecpg -f %libecpg.lang
%defattr(-,root,root) %defattr(-,root,root)
%endif
%_libdir/libecpg*.so.* %_libdir/libecpg*.so.*
%_libdir/libpgtypes.so.* %_libdir/libpgtypes.so.*

View File

@ -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 Wed May 25 13:06:16 UTC 2011 - max@novell.com

View File

@ -16,6 +16,11 @@
# #
%if 0%{?sles_version} && %sles_version <= 11
%define libs_package 1
%else
%define libs_package 0
%endif
Name: postgresql Name: postgresql
BuildRequires: gettext-devel ncurses-devel readline-devel uuid-devel zlib-devel 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 BuildRequires: openldap2-devel openssl-devel
Summary: Basic Clients and Utilities for PostgreSQL Summary: Basic Clients and Utilities for PostgreSQL
Version: 9.0.4 Version: 9.0.4
Release: 1 Release: 2
%define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') %define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/')
License: BSD3c(or similar) License: BSD3c(or similar)
Group: Productivity/Databases/Tools 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 HTML documentation for PostgreSQL can be found in the postgresql-docs
package. 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) License: BSD3c(or similar)
Summary: Shared Libraries Required for PostgreSQL Clients Summary: Shared Libraries Required for PostgreSQL Clients
Group: Productivity/Databases/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. program or language bindings are using.
%package -n %libecpg %package -n %libecpg
License: BSD3c(or similar) License: BSD3c(or similar)
Summary: Shared Libraries Required for PostgreSQL Clients Summary: Shared Libraries Required for PostgreSQL Clients
Group: Productivity/Databases/Clients Group: Productivity/Databases/Clients
@ -107,6 +136,7 @@ and functions.
This package provides the runtime library of the embedded SQL C This package provides the runtime library of the embedded SQL C
preprocessor for PostgreSQL. preprocessor for PostgreSQL.
%endif
%package server %package server
License: BSD3c(or similar) License: BSD3c(or similar)
@ -168,11 +198,14 @@ PostgreSQL server, which will in turn allow you to create and maintain
PostgreSQL databases. PostgreSQL databases.
%package -n %_name-devel %package -n %_name-devel
License: BSD3c(or similar) License: BSD3c(or similar)
Summary: PostgreSQL development header files and libraries Summary: PostgreSQL development header files and libraries
Group: Productivity/Databases/Tools Group: Productivity/Databases/Tools
%if %libs_package
Requires: postgresql-libs
%else
Requires: %libpq %libecpg Requires: %libpq %libecpg
%endif
%description -n %_name-devel %description -n %_name-devel
PostgreSQL is an advanced object-relational database management system PostgreSQL is an advanced object-relational database management system
@ -360,6 +393,7 @@ done
%if %buildall %if %buildall
%find_lang libpq5-%{pg_minor_version} %libpq.lang %find_lang libpq5-%{pg_minor_version} %libpq.lang
%find_lang ecpglib6-%{pg_minor_version} %libecpg.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 ecpg-%{pg_minor_version} %_name-devel.lang
%find_lang pg_config-%{pg_minor_version} %_name-devel.lang %find_lang pg_config-%{pg_minor_version} %_name-devel.lang
%endif %endif
@ -387,6 +421,12 @@ exit 0
groupadd -g 26 -o -r postgres >/dev/null 2>/dev/null || : groupadd -g 26 -o -r postgres >/dev/null 2>/dev/null || :
useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
-c "PostgreSQL Server" -u 26 postgres 2>/dev/null || : -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 %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 %post -n %libecpg -p /sbin/ldconfig
%postun -n %libecpg -p /sbin/ldconfig %postun -n %libecpg -p /sbin/ldconfig
%endif
%clean %clean
rm -rf %buildroot rm -rf %buildroot
@ -507,13 +548,20 @@ rm -f %my_provides
%_libdir/postgresql/plpython*.so %_libdir/postgresql/plpython*.so
%if %buildall %if %buildall
%if %libs_package
%files -n postgresql-libs -f postgresql-libs.lang
%else
%files -n %libpq -f %libpq.lang %files -n %libpq -f %libpq.lang
%endif
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libpq.so.* %_libdir/libpq.so.*
%if !%libs_package
%files -n %libecpg -f %libecpg.lang %files -n %libecpg -f %libecpg.lang
%defattr(-,root,root) %defattr(-,root,root)
%endif
%_libdir/libecpg*.so.* %_libdir/libecpg*.so.*
%_libdir/libpgtypes.so.* %_libdir/libpgtypes.so.*

View File

@ -15,6 +15,12 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # 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 Name: postgresql
IF_POSTGRES IF_POSTGRES
BuildRequires: gettext-devel zlib-devel ncurses-devel readline-devel uuid-devel 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 HTML documentation for PostgreSQL can be found in the postgresql-docs
package. 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 %package -n %libpq
License: BSD3c(or similar) License: BSD3c(or similar)
Summary: Shared Libraries Required for PostgreSQL Clients Summary: Shared Libraries Required for PostgreSQL Clients
@ -104,6 +134,7 @@ and functions.
This package provides the runtime library of the embedded SQL C This package provides the runtime library of the embedded SQL C
preprocessor for PostgreSQL. preprocessor for PostgreSQL.
%endif
IF_POSTGRES IF_POSTGRES
%package server %package server
@ -170,7 +201,11 @@ FI_POSTGRES
License: BSD3c(or similar) License: BSD3c(or similar)
Summary: PostgreSQL development header files and libraries Summary: PostgreSQL development header files and libraries
Group: Productivity/Databases/Tools Group: Productivity/Databases/Tools
%if %libs_package
Requires: postgresql-libs
%else
Requires: %libpq %libecpg Requires: %libpq %libecpg
%endif
%description -n %_name-devel %description -n %_name-devel
PostgreSQL is an advanced object-relational database management system PostgreSQL is an advanced object-relational database management system
@ -382,6 +417,7 @@ done
FI_POSTGRES FI_POSTGRES
%find_lang libpq5-%{pg_minor_version} %libpq.lang %find_lang libpq5-%{pg_minor_version} %libpq.lang
%find_lang ecpglib6-%{pg_minor_version} %libecpg.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 ecpg-%{pg_minor_version} %_name-devel.lang
%find_lang pg_config-%{pg_minor_version} %_name-devel.lang %find_lang pg_config-%{pg_minor_version} %_name-devel.lang
IF_POSTGRES 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 \ useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
-c "PostgreSQL Server" -u 26 postgres 2>/dev/null || : -c "PostgreSQL Server" -u 26 postgres 2>/dev/null || :
FI_POSTGRES 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 %post -n %libpq -p /sbin/ldconfig
%postun -n %libpq -p /sbin/ldconfig %postun -n %libpq -p /sbin/ldconfig
%post -n %libecpg -p /sbin/ldconfig %post -n %libecpg -p /sbin/ldconfig
%postun -n %libecpg -p /sbin/ldconfig %postun -n %libecpg -p /sbin/ldconfig
%endif
%clean %clean
rm -rf %buildroot rm -rf %buildroot
@ -529,12 +570,17 @@ IF_POSTGRES
%if %buildall %if %buildall
FI_POSTGRES FI_POSTGRES
%if %libs_package
%files -n postgresql-libs -f postgresql-libs.lang
%else
%files -n %libpq -f %libpq.lang %files -n %libpq -f %libpq.lang
%endif
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libpq.so.* %_libdir/libpq.so.*
%if !%libs_package
%files -n %libecpg -f %libecpg.lang %files -n %libecpg -f %libecpg.lang
%defattr(-,root,root) %defattr(-,root,root)
%endif
%_libdir/libecpg*.so.* %_libdir/libecpg*.so.*
%_libdir/libpgtypes.so.* %_libdir/libpgtypes.so.*