1.1 --- a/postgresql/postgresql.spec Thu Aug 09 18:57:21 2012 +0200 1.2 +++ b/postgresql/postgresql.spec Thu Aug 09 19:02:16 2012 +0200 1.3 @@ -1,6 +1,6 @@ 1.4 ## 1.5 ## postgresql.spec -- OpenPKG RPM Package Specification 1.6 -## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> 1.8 ## 1.9 ## Permission to use, copy, modify, and distribute this software for 1.10 ## any purpose with or without fee is hereby granted, provided that 1.11 @@ -22,16 +22,16 @@ 1.12 ## 1.13 1.14 # package versions 1.15 -%define V_postgresql 9.0.0 1.16 -%define V_postgresql_dist 9.0.0 1.17 -%define V_postgresql_dir 9.0.0 1.18 -%define V_libpqxx 3.1 1.19 +%define V_postgresql 9.1.4 1.20 +%define V_postgresql_dist 9.1.4 1.21 +%define V_postgresql_dir 9.1.4 1.22 +%define V_libpqxx 4.0 1.23 %define V_perl 5.10.0 1.24 %define V_pgperl 2.0.2 1.25 %define V_psqlodbc 09.00.0200 1.26 -%define V_pgjdbc 9.0-801 1.27 +%define V_pgjdbc 9.1-902 1.28 %define V_slony1_major 1.2 1.29 -%define V_slony1_minor 21 1.30 +%define V_slony1_minor 23 1.31 %define V_pgcluster 1.9.0rc5 1.32 %define V_pgcluster_dir 1706 1.33 %define V_mysqlcompat 1.0b3 1.34 @@ -48,7 +48,7 @@ 1.35 Group: Database 1.36 License: GPL 1.37 Version: %{V_postgresql} 1.38 -Release: 20101120 1.39 +Release: 20120800 1.40 1.41 # package options 1.42 %option with_server yes 1.43 @@ -57,7 +57,6 @@ 1.44 %option with_odbc no 1.45 %option with_jdbc no 1.46 %option with_compat no 1.47 -%option with_tcl no 1.48 %option with_slony1 no 1.49 %option with_pgcluster no 1.50 %option with_kerberos no 1.51 @@ -81,10 +80,8 @@ 1.52 Patch0: postgresql.patch 1.53 1.54 # build information 1.55 -Prefix: %{l_prefix} 1.56 -BuildRoot: %{l_buildroot} 1.57 -BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, flex, bison, gzip 1.58 -PreReq: OpenPKG, openpkg >= 20060823 1.59 +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, flex, bison, gzip 1.60 +PreReq: OpenPKG, openpkg >= 20100101 1.61 BuildPreReq: readline, zlib, openssl, getopt 1.62 PreReq: readline, zlib, openssl, getopt 1.63 %if "%{with_perl}" == "yes" 1.64 @@ -99,10 +96,6 @@ 1.65 BuildPreReq: java, JAVA-JDK, ant 1.66 PreReq: java, JAVA-JDK 1.67 %endif 1.68 -%if "%{with_tcl}" == "yes" 1.69 -BuildPreReq: tcl, tcl::with_x11 = yes, X11 1.70 -PreReq: tcl, tcl::with_x11 = yes, X11 1.71 -%endif 1.72 %if "%{with_kerberos}" == "yes" 1.73 BuildPreReq: KERBEROS 1.74 PreReq: KERBEROS 1.75 @@ -139,7 +132,7 @@ 1.76 prog postgresql = { 1.77 version = %{V_postgresql_dist} 1.78 url = ftp://ftp.postgresql.org/pub/source/ 1.79 - regex = v(\d+\.\d+(\.\d+)*(?:beta\d*)?) 1.80 + regex = v(\d+(\.\d+)+) 1.81 url = ftp://ftp.postgresql.org/pub/source/v__NEWVER__/ 1.82 regex = postgresql-(\d+(\.\d+)+)\.tar\.(bz2|gz) 1.83 } 1.84 @@ -249,6 +242,13 @@ 1.85 %{l_shtool} subst \ 1.86 -e 's;# Shared library stuff;enable_shared = yes;g' \ 1.87 src/pl/plpgsql/src/Makefile 1.88 + case "%{l_platform -t}" in 1.89 + *-linux* ) 1.90 + %{l_shtool} subst \ 1.91 + -e 's;\(printf("%s\)\(\\n", VAL_LIBS\);\1 -lpthread\2;' \ 1.92 + src/bin/pg_config/pg_config.c 1.93 + ;; 1.94 + esac 1.95 1.96 %build 1.97 1.98 @@ -262,10 +262,6 @@ 1.99 %if "%{with_slony1}" == "yes" 1.100 CFLAGS="$CFLAGS -pthread" 1.101 %endif 1.102 -%if "%{with_tcl}" == "yes" 1.103 - CPPFLAGS="$CPPFLAGS %{l_cppflags tcl}" 1.104 - LDFLAGS="$LDFLAGS -L`%{l_rc} --query x11_libdir`" 1.105 -%endif 1.106 %if "%{with_kerberos}" == "yes" 1.107 CPPFLAGS="$CPPFLAGS `krb5-config --cflags`" 1.108 LIBS="$LIBS `krb5-config --libs`" 1.109 @@ -289,11 +285,6 @@ 1.110 --with-openssl \ 1.111 --with-readline \ 1.112 --with-zlib \ 1.113 -%if "%{with_tcl}" == "yes" 1.114 - --with-tcl \ 1.115 - --with-tclconfig="%{l_prefix}/lib" \ 1.116 - --with-tkconfig="%{l_prefix}/lib" \ 1.117 -%endif 1.118 %if "%{with_slony1}" == "yes" 1.119 --enable-thread-safety \ 1.120 %endif 1.121 @@ -311,7 +302,7 @@ 1.122 --disable-shared 1.123 1.124 # build package 1.125 - %{l_make} %{l_mflags} 1.126 + %{l_make} %{l_mflags -O} 1.127 1.128 # build C++ bindings (both old and new one) 1.129 %if "%{with_cxx}" == "yes" 1.130 @@ -629,7 +620,6 @@ 1.131 %files -f files 1.132 1.133 %clean 1.134 - rm -rf $RPM_BUILD_ROOT 1.135 1.136 %pre 1.137 %if "%{with_server}" == "yes" 1.138 @@ -741,6 +731,7 @@ 1.139 echo " LOCATION '/u/<user>/rdbms';" 1.140 echo " template1=> CREATE DATABASE <user> OWNER <user>" 1.141 echo " TABLESPACE <user>;" 1.142 + echo " template1=> \\q" 1.143 echo " \$ echo 'localhost:*:<user>:<user>:<password>' >>/u/<user>/.pgpass" 1.144 echo " \$ chmod 600 <user> /u/<user>/.pgpass" 1.145 echo " \$ chown <user> /u/<user>/.pgpass"