Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
postgresql-libs
postgresql.spec.in
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File postgresql.spec.in of Package postgresql-libs
# # spec file for package postgresql # # Copyright (c) 2011 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/ # %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 BuildRequires: pam-devel python-devel tcl-devel %if 0%{?suse_version} >= 1110 BuildRequires: fdupes %else %define fdupes # %endif FI_POSTGRES %define _name postgresql %define libpq libpq5 %define libecpg libecpg6 %define buildall 0 %define extensiondir %_datadir/postgresql/extension %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.1.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 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. %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 Provides: postgresql-libs = %version Obsoletes: postgresql-libs < %version # 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 Provides: postgresql-libs:%_libdir/libecpg.so.6 %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. %endif IF_POSTGRES %package server License: BSD3c(or similar) Summary: The Programs Needed to Create and Run a PostgreSQL Server Group: Productivity/Databases/Servers PreReq: %insserv_prereq %fillup_prereq PreReq: /usr/sbin/useradd /usr/sbin/groupadd /sbin/chkconfig PreReq: /usr/bin/strings /bin/sed PreReq: postgresql = %pg_minor_version Requires: glibc-locale Provides: postgresql-server = %pg_minor_version %package docs License: BSD3c(or similar) Summary: HTML Documentation for PostgreSQL Group: Productivity/Databases/Tools %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif %description docs 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 HTML documentation for PostgreSQL. The start page is: file:///usr/share/doc/packages/postgresql/html/index.html . Manual pages for the PostgreSQL SQL statements can be found in the postgresql package. %package contrib License: BSD3c(or similar) Summary: Contributed Extensions and Additions to PostgreSQL Group: Productivity/Databases/Tools Requires: postgresql-server = %pg_minor_version %description contrib 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. The postgresql-contrib package includes extensions and additions that are distributed along with the PostgreSQL sources, but are not (yet) officially part of the PostgreSQL core. Documentation for the modules contained in this package can be found in /usr/share/doc/packages/postgresql/contrib. %description server 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 includes the programs needed to create and run a PostgreSQL server, which will in turn allow you to create and maintain PostgreSQL databases. FI_POSTGRES %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 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. IF_POSTGRES %package plperl License: BSD3c(or similar) Summary: The PL/Tcl, PL/Perl, and PL/Python procedural languages for PostgreSQL Group: Productivity/Databases/Servers Requires: perl = %perl_version Obsoletes: postgresql-pl Provides: postgresql-pl:%_libdir/postgresql/plperl.so Requires: postgresql-server = %pg_minor_version %description plperl 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 PL/Perl procedural language for PostgreSQL. With this module one can use Perl to write stored procedures, functions, and triggers. %package plpython License: BSD3c(or similar) Summary: The PL/Python Procedural Languages for PostgreSQL Group: Productivity/Databases/Servers Obsoletes: postgresql-pl Provides: postgresql-pl:%_libdir/postgresql/plpython.so Requires: python Requires: postgresql-server = %pg_minor_version %description plpython 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 PL/Python procedural language for PostgreSQL. With this module one can use Python to write stored procedures, functions, and triggers. %package pltcl License: BSD3c(or similar) Summary: PL/Tcl Procedural Language for PostgreSQL Group: Productivity/Databases/Tools Obsoletes: postgresql-pl Provides: postgresql-pl:%_libdir/postgresql/pltcl.so Requires: tcl Requires: postgresql-server = %pg_minor_version %description pltcl 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 PL/Tcl procedural language for PostgreSQL. With thie module one can use Tcl to write stored procedures, functions, and triggers. FI_POSTGRES %prep %setup -q -n %_name-%version # Keep the timestamp of configure, because patching it would otherwise # confuse PostgreSQL's build system touch -r configure tmp %patch1 %patch2 # apply the following patch only on SLE10 %if 0%{?suse_version} == 1010 %patch3 -p1 %endif %patch4 touch -r tmp configure rm tmp %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 \ IF_POSTGRES --with-python \ --with-perl \ --with-tcl \ --with-tclconfig=%_libdir \ --with-pam \ --with-ossp-uuid \ FI_POSTGRES IF_LIBS --without-readline \ FI_LIBS --with-openssl \ --with-ldap \ %if 0%{?suse_version} > 910 --with-gssapi \ --with-libxml \ --with-libxslt \ --with-krb5 \ %endif --with-system-tzdata=/usr/share/zoneinfo IF_LIBS 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 make -C src/bin/pg_config %{?jobs:-j%jobs} pg_config FI_LIBS IF_POSTGRES make %{?_smp_mflags} world %ifnarch %arm %if 0%{?suse_version} > 910 %check # # Run the regression tests. # make check || { for f in src/test/regress/log/* regression.diffs; do if test -f $f; then cat $f fi done exit 1 } %endif %endif FI_POSTGRES %install IF_POSTGRES make DESTDIR=%buildroot install install-docs SUBINSTALL=uninstall %if !%buildall rm -f %buildroot%_mandir/*/ecpg* rm -f %buildroot%_mandir/*/pg_config* %endif FI_POSTGRES IF_LIBS SUBINSTALL=install install -d %buildroot%_mandir/man1 install doc/src/sgml/man1/{ecpg,pg_config}.1 %buildroot%_mandir/man1 FI_LIBS if test -n "$SUBINSTALL"; then # Install them for postgresql-libs and uninstall them for postgresql make -C src DESTDIR=%buildroot $SUBINSTALL-local for dir in \ config \ src/bin/pg_config \ src/interfaces \ src/include \ src/makefiles \ src/port \ src/test/regress do make -C $dir DESTDIR=%buildroot $SUBINSTALL done fi # Don't ship static libraries, libpgport.a is needed, though. rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) IF_POSTGRES # # Install and collect the contrib stuff # touch flag; sleep 1 # otherwise we have installed files that are not newer than flag make DESTDIR=%buildroot -C contrib install find %buildroot -type f -cnewer flag -printf "/%%P\n" | grep -v %_docdir > files.contrib rm flag for f in /etc/init.d /var/adm/fillup-templates /usr/sbin \ /etc/sysconfig/SuSEfirewall2.d/services do install -d %buildroot/$f done install -m 755 %{SOURCE9} %buildroot/etc/init.d/postgresql install -m 644 %{SOURCE8} %buildroot/var/adm/fillup-templates/sysconfig.postgresql %if 0%{?suse_version} > 1020 install -m 644 %SOURCE16 %buildroot/etc/sysconfig/SuSEfirewall2.d/services/postgresql %endif ln -s ../../etc/init.d/postgresql %buildroot/usr/sbin/rcpostgresql install -d -m 750 %buildroot/var/lib/pgsql install -d -m 700 %buildroot/var/lib/pgsql/data sed 's,@LIBDIR@,%_libdir,g' %{SOURCE15} > \ %buildroot/var/lib/pgsql/.bash_profile # Backup directory for old version binaries install -d %buildroot%_libdir/postgresql/backup cp doc/KNOWN_BUGS doc/MISSING_FEATURES COPYRIGHT \ README HISTORY doc/bug.template %buildroot%_docdir/postgresql cp -a %SOURCE2 %buildroot%_docdir/postgresql/README.SuSE.de cp -a %SOURCE3 %buildroot%_docdir/postgresql/README.SuSE.en for appname in pg_dump pgscripts psql;do %find_lang $appname-%{pg_minor_version} %{name}.lang done %if %buildall 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 %endif for serverapp in initdb postgres pg_controldata pg_ctl pg_resetxlog plpgsql pg_basebackup;do %find_lang $serverapp-%{pg_minor_version} %{name}-server.lang done for pl in plperl plpython pltcl; do %find_lang $pl-%{pg_minor_version} $pl.lang done %fdupes %buildroot %post server %fillup_and_insserv %postun server %restart_on_update postgresql %insserv_cleanup exit 0 %preun server %stop_on_removal postgresql exit 0 %pre server 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 rm -f %my_provides IF_POSTGRES %files -f %{name}.lang %defattr(-,root,root) %doc %_mandir/man7/* %docdir %_docdir/postgresql %dir %_docdir/postgresql %_docdir/postgresql/[[:upper:]]* %_docdir/postgresql/bug.template # command line tools %_bindir/createdb %doc %_mandir/man1/createdb.1* %_bindir/clusterdb %doc %_mandir/man1/clusterdb.1* %_bindir/createlang %doc %_mandir/man1/createlang.1* %_bindir/createuser %doc %_mandir/man1/createuser.1* %_bindir/dropdb %doc %_mandir/man1/dropdb.1* %_bindir/droplang %doc %_mandir/man1/droplang.1* %_bindir/dropuser %doc %_mandir/man1/dropuser.1* %_bindir/pg_dump %doc %_mandir/man1/pg_dump.1* %_bindir/pg_dumpall %doc %_mandir/man1/pg_dumpall.1* %_bindir/pg_restore %doc %_mandir/man1/pg_restore.1* %_bindir/psql %doc %_mandir/man1/psql.1* %_bindir/vacuumdb %doc %_mandir/man1/vacuumdb.1* %_bindir/reindexdb %doc %_mandir/man1/reindexdb.1.* %_bindir/pg_basebackup %doc %_mandir/man1/pg_basebackup.1.* %files docs %defattr(-,root,root) %doc %_mandir/man3/* %docdir %_docdir/postgresql %dir %_docdir/postgresql %_docdir/postgresql/html %files contrib -f files.contrib %defattr(-,root,root) %docdir %_docdir/postgresql %dir %_docdir/postgresql %_docdir/postgresql/extension %dir %_datadir/postgresql %files server -f %{name}-server.lang %defattr(-,root,root) %dir %extensiondir %config /etc/init.d/postgresql %config /var/adm/fillup-templates/sysconfig.postgresql %if 0%{?suse_version} > 1020 %config /etc/sysconfig/SuSEfirewall2.d/services/postgresql %endif %_sbindir/rcpostgresql %dir %_libdir/postgresql %_libdir/postgresql/backup %_libdir/postgresql/plpgsql.so %_libdir/postgresql/dict_snowball.so %_datadir/postgresql/tsearch_data %exclude %_datadir/postgresql/tsearch_data/unaccent.rules %exclude %_datadir/postgresql/tsearch_data/xsyn_sample.rules %_bindir/initdb %doc %_mandir/man1/initdb.1* %_bindir/pg_ctl %doc %_mandir/man1/pg_ctl.1* %_bindir/pg_controldata %doc %_mandir/man1/pg_controldata.1* %_bindir/pg_resetxlog %doc %_mandir/man1/pg_resetxlog.1* %_bindir/postgres %doc %_mandir/man1/postgres.1* %_bindir/postmaster %doc %_mandir/man1/postmaster.1* %dir %_datadir/postgresql %_datadir/postgresql/timezone* %_datadir/postgresql/*.* %exclude %_datadir/postgresql/*.pltcl %_libdir/postgresql/*_and_*.so %_libdir/postgresql/euc2004_sjis2004.so %_libdir/postgresql/libpqwalreceiver.so %extensiondir/plpgsql* %attr(750,postgres,postgres) %dir /var/lib/pgsql %attr(700,postgres,postgres) %dir /var/lib/pgsql/data %attr(640,postgres,postgres) %config(noreplace) /var/lib/pgsql/.bash_profile %files pltcl -f pltcl.lang %defattr(-,root,root) %extensiondir/pltcl* %_libdir/postgresql/pltcl.so %_datadir/postgresql/*.pltcl %_bindir/pltcl* %files plperl -f plperl.lang %defattr(-,root,root) %extensiondir/plperl* %_libdir/postgresql/plperl.so %files plpython -f plpython.lang %defattr(-,root,root) %extensiondir/plpython* %_libdir/postgresql/plpython*.so %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.* %files -n %_name-devel -f %_name-devel.lang %defattr(-,root,root) %doc %_mandir/man1/ecpg.1* %_bindir/pg_config %doc %_mandir/man1/pg_config.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 IF_POSTGRES %endif FI_POSTGRES %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor