# # spec file for package postgresql (Version 8.4.3) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # 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 %endif BuildRequires: openldap2-devel openssl-devel Summary: Basic Clients and Utilities for PostgreSQL Version: 9.0.3 Release: 2 %define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') License: BSD3c(or similar) Group: Productivity/Databases/Tools Source0: postgresql-%version.tar.bz2 Source1: baselibs.conf Source2: postgresql-README.SuSE.de Source3: postgresql-README.SuSE.en Source8: postgresql-sysconfig Source9: postgresql-init Source15: postgresql-bashprofile Source16: postgresql-firewall Source17: postgresql-rpmlintrc Source100: postgresql-mkspecfiles Source101: postgresql.spec.in Patch1: postgresql-conf.patch Patch2: postgresql-regress.patch Patch3: postgresql-sle10-timestamptz.patch Patch4: postgresql-plperl.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 transactions, foreign keys, subqueries, triggers, and user-defined types and functions. This package contains the basic utility and client programs necessary to maintain and work with local or remote PostgreSQL databases as well 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 License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients Obsoletes: postgresql-libs # bug437293 %ifarch ppc64 Obsoletes: postgresql-libs-64bit %endif %description -n %libpq 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 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 Obsoletes: postgresql-libs # bug437293 %ifarch ppc64 Obsoletes: postgresql-libs-64bit %endif %description -n %libecpg 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 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 Requires: %libpq %libecpg %description -n %_name-devel PostgreSQL is an advanced object-relational database management system 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 header files and libraries needed to compile C applications which will directly interact with a PostgreSQL database management server and the ECPG Embedded C Postgres preprocessor. You need to install this package if you want to develop applications in C which will interact with a PostgreSQL server. %prep %setup -q -n %_name-%version %patch1 %patch2 # apply the following patch only on SLE10 %if 0%{?suse_version} == 1010 %patch3 -p1 %endif %patch4 %build export CFLAGS="%optflags $SP" # uncomment the following line to enable the stack protector # CFLAGS="$CFLAGS -fstack-protector" %configure \ --includedir=%_includedir/pgsql \ --datadir=%_datadir/postgresql \ --docdir=%_docdir \ --disable-rpath \ --enable-nls \ --enable-thread-safety \ --enable-integer-datetimes \ --without-readline \ --with-openssl \ --with-ldap \ %if 0%{?suse_version} > 910 --with-gssapi \ --with-libxml \ --with-libxslt \ --with-krb5 \ %endif --with-system-tzdata=/usr/share/zoneinfo make -C src/backend %{?jobs:-j%jobs} libpq-recursive make -C src/interfaces %{?jobs:-j%jobs} make -C src/port %{?jobs:-j%jobs} libpgport.a %install for dir in interfaces include port; do make -C src/$dir DESTDIR=%buildroot install done make -C src DESTDIR=%buildroot install-local install -d %buildroot%_mandir/man1 install doc/src/sgml/man1/ecpg.1 %buildroot%_mandir/man1 # Don't ship static libraries, libpgport.a is needed, though. 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 %find_lang ecpg-%{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 rm -rf %buildroot rm -f %my_provides %files -n %libpq -f %libpq.lang %defattr(-,root,root) %_libdir/libpq.so.* %files -n %libecpg -f %libecpg.lang %defattr(-,root,root) %_libdir/libecpg*.so.* %_libdir/libpgtypes.so.* %files -n %_name-devel -f %_name-devel.lang %defattr(-,root,root) %doc %_mandir/man1/ecpg.1* %_bindir/ecpg %_libdir/libpgport.a %_libdir/lib*.so %dir %_libdir/postgresql %_libdir/postgresql/pgxs %_includedir/pgsql %dir %_datadir/postgresql %_datadir/postgresql/pg_service.conf.sample %changelog