]> git.pld-linux.org Git - packages/postgresql.git/blobdiff - postgresql.spec
- release++
[packages/postgresql.git] / postgresql.spec
index ada56a7ad65ab8a7d34f7a4478391cb67f936a7e..fe3d26794517f48d279944ba155458ef2541c2ba 100644 (file)
@@ -1,22 +1,35 @@
+%include       /usr/lib/rpm/macros.perl
 Summary:       PostgreSQL Data Base Management System
 Summary(de):   PostgreSQL Datenbankverwaltungssystem
 Summary(fr):   Sysème de gestion de base de données PostgreSQL.
 Summary(pl):   PostgreSQL system bazodanowy
 Summary(tr):   Veri Tabaný Yönetim Sistemi
 Name:          postgresql
-Version:       6.4.2
-Release:       7
+Version:       6.5.3
+Release:       5
 Copyright:     BSD
 Group:         Applications/Databases
-Group(pl):     Aplikacje/Bazy danych
+Group(pl):     Aplikacje/Bazy Danych
 Source0:       ftp://ftp.postgresql.org/pub/%{name}-%{version}.tar.gz
-Source1:       postgresql.init
+Source1:       %{name}.init
 Source2:       pgsql-Database-HOWTO-html.tar.gz
-Patch:         postgresql-6.4.2-opt.patch
+Source3:       %{name}.sysconfig
+Patch0:                postgresql-opt.patch
+Patch1:                postgresql-DESTDIR.patch
+Patch2:                postgresql-perl.patch
 URL:           http://www.postgresql.org/
 Prereq:                /sbin/chkconfig
-Buildroot:     /tmp/%{name}-%{version}-root
-Requires:      %{name}-clients = %{version}
+Requires:      rc-scripts
+BuildRequires: tcl-devel
+BuildRequires: tk-devel
+BuildRequires: readline-devel
+BuildRequires: ncurses-devel >= 5.0
+BuildRequires: rpm-perlprov
+BuildRequires: XFree86-devel
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Requires:      %{name}-libs = %{version}
+
+%define                _sysconfdir     /etc
 
 %description
 PostgreSQL Data Base Management System (formerly known as Postgres, then as
@@ -24,25 +37,25 @@ Postgres95).
 
 PostgreSQL is an enhancement of the POSTGRES database management system, a
 next-generation DBMS research prototype.  While PostgreSQL retains the
-powerful data model and rich data types of POSTGRES, it replaces the PostQuel
-query language with an extended subset of SQL. PostgreSQL is free and the
-complete source is available. 
+powerful data model and rich data types of POSTGRES, it replaces the
+PostQuel query language with an extended subset of SQL. PostgreSQL is free
+and the complete source is available.
 
-PostgreSQL development is being performed by a team of Internet developers who
-all subscribe to the PostgreSQL development mailing list. The current
+PostgreSQL development is being performed by a team of Internet developers
+who all subscribe to the PostgreSQL development mailing list. The current
 coordinator is Marc G. Fournier (scrappy@postgreSQL.org). This team is now
-responsible for all current and future development of PostgreSQL. 
+responsible for all current and future development of PostgreSQL.
 
-The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many others have
-contributed to the porting, testing, debugging and enhancement of the code.
-The original Postgres code, from which PostgreSQL is derived, was the effort
-of many graduate students, undergraduate students, and staff programmers
-working under the direction of Professor Michael Stonebraker at the University
-of California, Berkeley. 
+The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many others
+have contributed to the porting, testing, debugging and enhancement of the
+code. The original Postgres code, from which PostgreSQL is derived, was the
+effort of many graduate students, undergraduate students, and staff
+programmers working under the direction of Professor Michael Stonebraker at
+the University of California, Berkeley.
 
 The original name of the software at Berkeley was Postgres. When SQL
-functionality was added in 1995, its name was changed to Postgres95. The name
-was changed at the end of 1996 to PostgreSQL. 
+functionality was added in 1995, its name was changed to Postgres95. The
+name was changed at the end of 1996 to PostgreSQL.
 
 PostgreSQL runs on Solaris, SunOS, HPUX, AIX, Linux, Irix, FreeBSD, and most
 flavours of Unix. 
@@ -52,50 +65,53 @@ PostgreSQL Datenbank-Managementsystem (fr
 Postgres95 bekannt).
 
 PostgreSQL ist eine Verbesserung des POSTGRES-DB-Managementsystems, ein
- DBMS-Forschungsprototyp der nächsten Generation. Während es das leistungsfähige
-Datenmodell und die reichhaltigen Datentypen von POSTGRES beibehält, ersetzt
-es die PostQuel-Abfragesprache durch ein Subset von SQL. PostgreSQL ist gratis,
-der gesamte Quellcode ist verfügbar.
-
-Ein Team von Internet-Entwicklern befaßt sich mit PostgreSQL. Sie alle sind auf
-der PostgreSQL-Entwickleradreßliste. Koordinator ist
- Marc G. Fournier (scrappy@postgreSQL.org). Das Team ist verantwortlich für alle
-aktuellen und künftigen Entwicklungen von PostgreSQL.
-
-Die Autoren von PostgreSQL 1.01 waren Andrew Yu und Jolly Chen. Zahlreiche andere
-haben zur Portierung, zum Testen, Debugging und zur Verbesserung des Code beigetragen.
-Den Original-Postgres-Code, von dem sich PostgreSQL ableitet, verdanken wir der Arbeit
-vieler Doktoranden, Studenten und Programmierern unter der Leitung von
-Professor Michael Stonebraker an der University of California, Berkeley.
+DBMS-Forschungsprototyp der nächsten Generation. Während es das
+leistungsfähige Datenmodell und die reichhaltigen Datentypen von POSTGRES
+beibehält, ersetzt es die PostQuel-Abfragesprache durch ein Subset von SQL.
+PostgreSQL ist gratis, der gesamte Quellcode ist verfügbar.
+
+Ein Team von Internet-Entwicklern befaßt sich mit PostgreSQL. Sie alle sind
+auf der PostgreSQL-Entwickleradreßliste. Koordinator ist Marc G. Fournier
+(scrappy@postgreSQL.org). Das Team ist verantwortlich für alle aktuellen und
+künftigen Entwicklungen von PostgreSQL.
+
+Die Autoren von PostgreSQL 1.01 waren Andrew Yu und Jolly Chen. Zahlreiche
+andere haben zur Portierung, zum Testen, Debugging und zur Verbesserung des
+Code beigetragen. Den Original-Postgres-Code, von dem sich PostgreSQL
+ableitet, verdanken wir der Arbeit vieler Doktoranden, Studenten und
+Programmierern unter der Leitung von Professor Michael Stonebraker an der
+University of California, Berkeley.
 
 Der ursprüngliche Name war Postgres. Als 1995 SQL-Funktionalität hinzukam,
-wurde der Name in Postgres95 geändert. Ende 1996 schließlich entschied man sich
-für PostgreSQL.
+wurde der Name in Postgres95 geändert. Ende 1996 schließlich entschied man
+sich für PostgreSQL.
 
-PostgreSQL läuft auf Solaris, SunOS, HPUX, AIX, Linux, Irix, FreeBSD und den meisten
-Unix-Systemen.
+PostgreSQL läuft auf Solaris, SunOS, HPUX, AIX, Linux, Irix, FreeBSD und den
+meisten Unix-Systemen.
 
 %description -l fr
 Système de gestion de bases de données PostgreSQL (D'abord nommé Postgres,
 puis Postgres95).
+
 PostgreSQL est une amélioration du système de gestion de bases de données
-POSTGRES, un prototype de recherche de la génération suivant DBMS. Tout
-en conservant le puissant modèle de donnée de et les types de donée riches
-de Postgres, il remplace le langage de requêtes de Postgres par un sous
-ensemble etendu de commandes SQL. PosrgreSQL est libre, et ses sources
-sont disponibles.
-
-Le développement de PostgreSQL est actuellement réalisé via internet par\une équipe de développeurs inscrits sur la mailing-list de développement
-de PostgreSQL. Le coordinateur actuel est Marc G Fournier
+POSTGRES, un prototype de recherche de la génération suivant DBMS. Tout en
+conservant le puissant modèle de donnée de et les types de donée riches de
+Postgres, il remplace le langage de requêtes de Postgres par un sous
+ensemble etendu de commandes SQL. PosrgreSQL est libre, et ses sources sont
+disponibles.
+
+Le développement de PostgreSQL est actuellement réalisé via internet parune
+équipe de développeurs inscrits sur la mailing-list de développement de
+PostgreSQL. Le coordinateur actuel est Marc G Fournier
 (scrappy@postgreSQL.org). Cette équipe est responsable du développemen
 actuel et à venir de PostgreSQL.
 
 Les auteurs de PostgreSQL 1.01 étaient Andrew Yu et Jolly Chen. Beaucoup
 d'autres ont contribué au portage, au test, au débogage et à l'amélioration
-du code. Le code original de Postgres, duquel PostgreSQL est dérivé,
-a été l'oeuvre d'étudiants de haut niveau, de moins haut niveau, et de
-programmeurs travaillant sous la direction du professeur Michael
-Stonebraker à l'université de Berkeley Californie.
+du code. Le code original de Postgres, duquel PostgreSQL est dérivé, a été
+l'oeuvre d'étudiants de haut niveau, de moins haut niveau, et de
+programmeurs travaillant sous la direction du professeur Michael Stonebraker
+à l'université de Berkeley Californie.
 
 Le nom original du logiciel était Postgres. Quand les fonctionnalitées
 SQL furent ajoutées en 1995, son nom est devenu Postgres95. Il a été 
@@ -106,7 +122,7 @@ et la plupart des Unix.
 
 %description -l pl
 PostgreSQL System Zarz±dzania Baz± Danych (dawniej znany jako Postgres,
-nastêpnie jako Postgres95). 
+nastêpnie jako Postgres95).
 
 PostgreSQL mo¿e byæ uruchominy pod nastêpuj±cymi systemami: Solaris, SunOS, 
 HPUX, AIX, Linux, Irix, FreeBSD i innych systemach Unix.
@@ -120,25 +136,25 @@ geni
 Summary:       PostgreSQL development header files and libraries
 Summary(de):   PostgreSQL-Entwicklungs-Header-Dateien und Libraries 
 Summary(fr):   En-têtes et bibliothèques de développement PostgreSQL
-Summary(pl):   PostgreSQL - nag³owki i biblioteki
+Summary(pl):   PostgreSQL - pliki nag³ówkowe i biblioteki
 Summary(tr):   PostgreSQL baþlýk dosyalarý ve kitaplýklar
 Group:         Development/Libraries
 Group(pl):     Programowanie/Biblioteki
-Requires:      %{name}-clients = %{version}
+Requires:      %{name}-libs = %{version}
 
 %description devel
 This package contains header files and libraries required to compile
 applications that are talking directly to the PostgreSQL backend server. 
 
 %description -l de devel
-Dieses Paket enthält die Header-Dateien und Libraries, die zum
-Kompilieren von Applikationen notwendig sind, die direkt mit dem
+Dieses Paket enthält die Header-Dateien und Libraries, die zum Kompilieren
+von Applikationen notwendig sind, die direkt mit dem
 PostgreSQL-Backend-Server kommunizieren.
 
 %description -l fr devel
 Ce package contient les fichiers d'en-tête et les bibliothéques nécessaires
-pour compiler des applications ayant des échanges directs avec le serveur
-du backend PostgreSQL.
+pour compiler des applications ayant des échanges directs avec le serveur du
+backend PostgreSQL.
 
 %description -l pl devel
 Pakiet zawiera nag³ówki oraz biblioteki wymagane do kompilacji aplikacji 
@@ -148,69 +164,11 @@ Pakiet zawiera nag
 Bu paket, PostgreSQL sunucusuyla konuþacak yazýlýmlar geliþtirmek için
 gereken baþlýk dosyalarýný ve kitaplýklarý içerir.
 
-%package data
-Summary:       PostgreSQL initial database structure
-Summary(de):   PostgreSQL-Ausgangs-Datenbankstruktur 
-Summary(fr):   Structure initiale de base de données PostgreSQL 
-Summary(pl):   PostgreSQL - inicjuj±ca struktura bazy danych
-Summary(tr):   PostgreSQL baþlangýç veritabaný yapýsý
-Group:         Applications/Databases
-Group(pl):     Aplikacje/Bazy danych
-Requires:      %{name}  = %{version}
-Requires:      %{name}-clients = %{version}
-Conflicts:     postgresql-data <= 6.2.1
-
-%description data
-This packages includes an initial database structure directory for PostgreSQL.
-For a quick startup on PostegreSQL, it is recommended to install this package
-with your PostgreSQL backend server (altough it is not required). 
-
-If you choose to not install this package you will have to create the initial
-database yourself using 'initdb' command and possibly modify the postgresql
-startup script if you choose a directory other than /var/lib/pgsql for
-storing your databases.
-
-%description -l de data
-Dieses Paket schließt ein elementares Strukturverzeichnis für 
-PostgreSQL ein. Für einen schnellen Start mit PostegreSQL empfehlen 
-wir die Installation dieses Pakets mit Ihrem PostgreSQL-Backend-
-Server (obligatorisch ist es nicht).
-Sie die anfängliche Datenbank selbst mit Hilfe des initdb-Befehls 
-erstellen und möglicherweise das postgresql-Start-Skript modifizieren, 
-wenn Sie ein anderes als das /var/lib/pgsql-Verzeichnis zum Speichern 
-Ihrer Datenbanken wählen. 
-
-%description -l fr data
-Ce paquetage contient une structure initiale de base de données pour PostgreSQL.
-Pour un démarrage rapide avec PostgreSQL, il est recommandé d'installer ce
-paquetage avec votre serveur PostgreSQL (bien que ce ne soit pas obligatoire).
-
-Si vous n'installez pas ce paquetage, vous devrez créer vous-même la base de
-données initiale avec la commande « initdb » et modifier le script de
-démarrage de PostgreSQL si vous choisissez un autre répertoire que
-/var/lib/pgsql pour stocker vos bases de données.
-
-%description -l pl data
-Pakiet zawiera zainicjowan± strukturê bazodanow± dla PostgreSQL. Dla
-szybkiego startu PostgreSQL rekomendowane jest zainstalowanie tego pakietu
-razem z pakietem serwera (jednak¿e nie jest on wymagany).
-
-Je¿eli nie zainstalujesz tego pakietu bêdziesz musia³ rêcznie utworzyæ 
-inicjuj±c± bazê przy pomocy polecenia 'initdb' oraz ewentualnie skrypt
-startowy, je¿eli nie wybierzesz katalogu /var/lib/pgsql jako katalogu
-domy¶lnego dla przechowywania baz danych.
-
-%description -l tr data
-Bu paket, PostgreSQL için bir baþlangýç veri tabaný yapýsý dizinini içerir.
-PostgreSQL'e hýzlý baþlangýç için bu paketin PostgreSQL sunucusuna yüklenmesi
-önerilir. Bu paketi yüklememeyi seçerseniz, baþlangýç veri tabanýný 'initdb'
-komutunu kullanarak kendiniz yaratmanýz gerekir.
-
 %package clients
 Summary:       clients needed to access a PostgreSQL server
 Summary(pl):   klienci wymagani do dostêpu do serwera PostgreSQL
 Group:         Applications/Databases
-Group(pl):     Aplikacje/Bazy danych
+Group(pl):     Aplikacje/Bazy Danych
 
 %description clients
 This package includes only the clients and client libraries needed to access
@@ -218,9 +176,9 @@ an PostgreSQL server. The server is included in the main package. If all you
 need is to connect to another PostgreSQL server, the  this is the only
 package you need to install.
 
-In this package there are client libraries available for C and C++, as
-well as several command-line utilities you can use to manage your databases
-on a remote PostgreSQL server.
+In this package there are client libraries available for C and C++, as well
+as several command-line utilities you can use to manage your databases on a
+remote PostgreSQL server.
 
 %description -l pl clients
 Pakiet zawiera klientów oraz biblioteki niezbêdne dla dostêpu do serwera 
@@ -230,7 +188,7 @@ PostgreSQL. Serwer znajduje si
 Summary:       Perl interface to PostgreSQL database
 Summary(pl):   Interface dla Perl'a umo¿liwiaj±cy dostêp do baz PostgreSQL
 Group:         Applications/Databases
-Group(pl):     Aplikacje/Bazy danych
+Group(pl):     Aplikacje/Bazy Danych
 Requires:      postgresql, perl >= 5.004
 
 %description perl
@@ -244,8 +202,8 @@ PostgreSQL.
 Summary:       Documentation for PostgreSQL
 Summary(pl):   Dodatkowa dokumantacja dla PostgreSQL
 Group:         Applications/Databases
-Group(pl):     Aplikacje/Bazy danych
-Requires:      %{name} = %{version}
+Group(pl):     Aplikacje/Bazy Danych
+#Requires:     %{name} = %{version}
 
 %description doc
 This package includes documentation and HOWTO for programmer, admin etc., in
@@ -259,78 +217,160 @@ administrator
 Summary:       ODBC interface to PostgreSQL
 Summary(pl):   Interface ODBC do PostgreSQL
 Group:         Applications/Databases
-Group(pl):     Aplikacje/Bazy danych
-Requires:      %{name} = %{version}
+Group(pl):     Aplikacje/Bazy Danych
+#Requires:     %{name} = %{version}
 
 %description odbc
-This package includes library and header files for interface ODBC.
+This package includes library for interface ODBC.
 
 %description -l pl odbc
+Pakiet ten zawiera biblioteki dla interface'u ODBC.
+
+%package odbc-devel
+Summary:       ODBC interface to PostgreSQL - development part
+Summary(pl):   Interface ODBC do PostgreSQL - cze¶æ programistyczna
+Group:         Applications/Databases
+Group(pl):     Aplikacje/Bazy Danych
+Requires:      %{name}-odbc = %{version}
+
+%description odbc-devel
+This package includes library and header files for interface ODBC.
+
+%description -l pl odbc-devel
 Pakiet ten zawiera biblioteki i pliki nag³ówkowe dla interface'u ODBC.
 
+%package odbc-static
+Summary:       ODBC interface to PostgreSQL - static libraries
+Summary(pl):   Interface ODBC do PostgreSQL - biblioteki statyczne
+Group:         Applications/Databases
+Group(pl):     Aplikacje/Bazy Danych
+#Requires:     %{name}-odbc-devel = %{version}
+
+%description odbc-static
+This package includes static library for interface ODBC.
+
+%description -l pl odbc-static
+Pakiet ten zawiera biblioteki statyczne dla interface'u ODBC.
+
+%package libs
+Summary:       PostgreSQL libraries
+Summary(pl):   Biblioteki dzielone programu PostgreSQL
+Group:         Libraries
+Group(pl):     Biblioteki
+
+%description libs
+PostgreSQL libraries.
+
+%description libs -l pl
+Biblioteki dzielone programu PostgreSQL.
+
+%package static
+Summary:       PostgreSQL static libraries
+Summary(pl):   Biblioteki statyczne programu PostgreSQL
+Group:         Development/Libraries
+Group(pl):     Programowanie/Biblioteki
+Requires:      %{name}-devel = %{version}
+
+%description static
+PostgreSQL static libraries.
+
+%description libs -l pl
+Biblioteki statyczne programu PostgreSQL.
+
+%package tcl
+Summary:       tcl interface for PostgreSQL
+Summary(pl):   tcl interface dla PostgreSQL
+Group:         Development/Languages/Tcl
+Group(pl):     Programowanie/Jêzyki/Tcl
+#Requires:     %{name}-libs = %{version}
+
+%description tcl
+tcl interface for PostgreSQL.
+
+%description tcl -l pl
+tcl interface dla PostgreSQL.
+
+%package tcl-devel
+Summary:       Development part of tcl interface for PostgreSQL
+Summary(pl):   Czê¶æ dla programistów interafece tcl dla PostgreSQL
+Group:         Development/Languages/Tcl
+Group(pl):      Programowanie/Jêzyki/Tcl
+Requires:      %{name}-tcl = %{version}
+
+%description tcl-devel
+Development part of tcl interface for PostgreSQL.
+
+%description tcl-devel -l pl
+Czê¶æ dla programistów interafece tcl dla PostgreSQL.
+
+%package tcl-static
+Summary:        Static libraries of tcl interface for PostgreSQL
+Summary(pl):    Biblioteki statyczne interafece tcl dla PostgreSQL
+Group:          Development/Languages/Tcl
+Group(pl):      Programowanie/Jêzyki/Tcl
+Requires:       %{name}-tcl-devel = %{version}
+
+%description tcl-static
+Static libraries of tcl interface for PostgreSQL
+
+%description tcl-devel -l pl
+Biblioteki statyczne interafece tcl dla PostgreSQL
+
 %prep
-%setup -q
-%patch -p1 -b .opt
+%setup  -q
+%patch0 -p1 -b .opt
+%patch1 -p1 -b .destdir
+%patch2 -p1 -b .perl
+
+# Erase all CVS dir
+rm -fR `find contrib/ -type d -name CVS`
 
 %build
+PATH=$PATH:. ; export PATH
 cd src
 
-CFLAGS="$RPM_OPT_FLAGS" \
-./configure %{_target} \
-       --prefix=/usr \
+aclocal
+autoconf
+LDFLAGS="-s"; export LDFLAGS
+%configure \
        --enable-hba \
        --enable-locale \
        --with-odbc \
-       --with-odbcinst=/etc \
-       --without-tcl \
+       --with-odbcinst=%{_sysconfdir} \
+       --with-tcl \
        --with-x \
-%ifarch alpha
-       --with-template=linuxalpha \
+       --with-mb=UNICODE \
+%ifarch %{ix86}
+       --with-template=linux_i386 \
+%else
+       --with-template=linux_%{target_cpu} \
 %endif
        --with-perl
 
-gmake OPT_FLAGS="$RPM_OPT_FLAGS"
+make OPT="$RPM_OPT_FLAGS"
 
 cd ..
 make all PGDOCS=unpacked -C doc
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
-install -d $RPM_BUILD_ROOT/usr/{include/pgsql,lib,bin,man}
-install -d $RPM_BUILD_ROOT/var/lib/pgsql
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
+        $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/pgsql,%{_mandir},%{_includedir}/pgsql} \
+        $RPM_BUILD_ROOT/var/lib/pgsql
 
+# PREFIX (hack for perl)
 ( cd src
-  gmake POSTGRESDIR=$RPM_BUILD_ROOT/usr install
-  gmake POSTGRESDIR=$RPM_BUILD_ROOT/usr install-man
+  make DESTDIR=$RPM_BUILD_ROOT install
+  make DESTDIR=$RPM_BUILD_ROOT install-man
 )
 
 # For Perl interface
-( cd src/interfaces/perl5
-
-perl -V:installarchlib  > /tmp/tmp_perl_info
-perl -V:installsitearch >> /tmp/tmp_perl_info
-. /tmp/tmp_perl_info
-
-  PERLVER=$installarchlib
-  install -d $RPM_BUILD_ROOT/$PERLVER
-  perl Makefile.PL
-  make PREFIX=$RPM_BUILD_ROOT/usr install
-
-  PACK="$RPM_BUILD_ROOT$installsitearch/auto/Pg/.packlist"
-  mv $PACK $PACK.old
-  sed -e "s|$RPM_BUILD_ROOT/|/|g" -e "s|./||" < $PACK.old > $PACK
-  rm -f $PACK.old
-  
-  LOCAL="$RPM_BUILD_ROOT/$PERLVER/perllocal.pod"
-  mv $LOCAL $LOCAL.old
-  sed -e "s|$RPM_BUILD_ROOT/|/|g" < $LOCAL.old > $LOCAL.pg
-  rm -f $LOCAL.old
+
+( cd $RPM_BUILD_ROOT%{perl_sitearch}/auto/Pg
+  mv .packlist .packlist.old
+  sed -e "s|$RPM_BUILD_ROOT/|/|g" -e "s|./||" < .packlist.old > .packlist
+  rm -f .packlist.old
 )
-find $RPM_BUILD_ROOT%{_libdir}/perl5 -type f -print | \
-       sed -e "s|$RPM_BUILD_ROOT/|/|g" | grep -v "perllocal.pod$" > perlfiles.list
-find $RPM_BUILD_ROOT%{_libdir}/perl5 -type d -name Pg -print | \
-       sed -e "s|$RPM_BUILD_ROOT/|%dir /|g" >> perlfiles.list
 
 # Move all includes beneath %{_includedir}/pgsql.
 ( cd $RPM_BUILD_ROOT%{_includedir}
@@ -343,71 +383,66 @@ find $RPM_BUILD_ROOT%{_libdir}/perl5 -type d -name Pg -print | \
 
 # Move all templates/examples beneath %{_libdir}/pgsql
 ( cd $RPM_BUILD_ROOT%{_libdir}
-  install -d pgsql
-  mv *source *sample pgsql
+  mv  *description *source *sample pgsql
 )
 
 # Move odbc.ini file to etc
 mv -f $RPM_BUILD_ROOT/usr/*.ini $RPM_BUILD_ROOT/etc
 
-install $RPM_SOURCE_DIR/postgresql.init $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/postgresql
 
 install -d howto
 ( cd howto
   tar xzf $RPM_SOURCE_DIR/pgsql-Database-HOWTO-html.tar.gz
 )
 
-# Strip 'em all
-strip -s $RPM_BUILD_ROOT%{_bindir}/* || :
+# Install all header files. They are required
+# by executor/spi.h and commands/trigger.h
 
-# gzip all man pages
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/*
+( cd src/include
+  cp -rf * $RPM_BUILD_ROOT%{_includedir}/pgsql
+)
 
-# Erase all CVS dir
-rm -fR `find contrib/ -type d -name CVS`
+strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so*
 
-%pre data
-if ! `grep postgres /etc/passwd >/dev/null 2>&1`; then
-    useradd -M -o -r -d /var/lib/pgsql -s /bin/bash \
-       -c "PostgreSQL Server" postgres >/dev/null 2>&1 || :
-fi
+gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/*
+
+%pre
+getgid postgres >/dev/null 2>&1 || /usr/sbin/groupadd -g 88 -r -f postgres
+id postgres >/dev/null 2>&1 || /usr/sbin/useradd -M -o -r -u 88 \
+       -d /var/lib/pgsql -s /bin/sh -g postgres \
+       -c "PostgreSQL Server" postgres
+)
 
 %post
 /sbin/chkconfig --add postgresql
 
+if [ -r /var/lock/subsys/postmaster ]; then
+       /etc/rc.d/init.d/postgresql restart >&2
+else
+       echo "Run \"/etc/rc.d/init.d/postgresql start\" to start postgresql server."
+fi
+
 %preun
-if [ $1 = 0 ]; then
+if [ "$1" = "0" ]; then
        if [ -f /var/lock/subsys/postmaster ]; then
                /etc/rc.d/init.d/postgresql stop
        fi
        /sbin/chkconfig --del postgresql
 fi
 
-%post data
-# Create sample database
-su postgres -c "LD_LIBRARY_PATH=%{_libdir} \
-    %{_bindir}/initdb --pgdata=/var/lib/pgsql \
-    --pglib=%{_libdir}/pgsql"
+%post   libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
 
-%post   -p /sbin/ldconfig clients
-%postun -p /sbin/ldconfig clients
+%post   tcl -p /sbin/ldconfig
+%postun tcl -p /sbin/ldconfig
 
-%post   -p /sbin/ldconfig devel
-%postun -p /sbin/ldconfig devel
+%post   clients -p /sbin/ldconfig
+%postun clients -p /sbin/ldconfig
 
-%post   -p /sbin/ldconfig odbc
-%postun -p /sbin/ldconfig odbc
-
-%post perl
-POD=`find %{_libdir} -name perllocal.pod.pg`
-DIR=`dirname $POD`
-if [ -f $DIR/perllocal.pod ]; then
-       mv $DIR/perllocal.pod $DIR/perllocal.pod.prepg
-       cat $DIR/perllocal.pod.pg $DIR/perllocal.pod.prepg > $DIR/perllocal.pod
-else
-       cp $DIR/perllocal.pod.pg $DIR/perllocal.pod
-fi
-rm -f $DIR/perllocal.pod.pg
+%post   odbc -p /sbin/ldconfig
+%postun odbc -p /sbin/ldconfig
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -419,15 +454,15 @@ rm -f /tmp/tmp_perl_info
 %doc howto
 
 %files
-%defattr(644, root, root, 755)
+%defattr(644,root,root,755)
 %doc contrib 
 %doc doc/FAQ doc/FAQ_Linux doc/README* 
 %doc COPYRIGHT README HISTORY doc/bug.template
 %doc doc/*.ps.gz
 
-%attr(754, root, root) /etc/rc.d/init.d/*
+%attr(754,root,root) /etc/rc.d/init.d/*
+%attr(644,root,root) /etc/sysconfig/*
 
-%attr(644, postgres, postgres, 755) %{_libdir}/pgsql
 %attr(755,root,root) %{_bindir}/cleardbdir
 %attr(755,root,root) %{_bindir}/createdb
 %attr(755,root,root) %{_bindir}/createuser
@@ -437,105 +472,109 @@ rm -f /tmp/tmp_perl_info
 %attr(755,root,root) %{_bindir}/initlocation
 %attr(755,root,root) %{_bindir}/pg_passwd
 %attr(755,root,root) %{_bindir}/pg_version
+%attr(755,root,root) %{_bindir}/pg_encoding
 %attr(755,root,root) %{_bindir}/postgres
 %attr(755,root,root) %{_bindir}/postmaster
-%{_mandir}/man1/cleardbdir.1.gz
-%{_mandir}/man1/createdb.1.gz
-%{_mandir}/man1/createuser.1.gz
-%{_mandir}/man1/destroydb.1.gz
-%{_mandir}/man1/destroyuser.1.gz
-%{_mandir}/man1/initdb.1.gz
-%{_mandir}/man1/initlocation.1.gz
-%{_mandir}/man1/pg_passwd.1.gz
-%{_mandir}/man1/postgres.1.gz
-%{_mandir}/man1/postmaster.1.gz
-%{_mandir}/man5/*.5.gz
+%attr(755,root,root) %{_bindir}/ipcclean
+%attr(755,root,root) %{_bindir}/createlang
+%attr(755,root,root) %{_bindir}/destroylang
+
+%{_mandir}/man1/cleardbdir.1*
+%{_mandir}/man1/createdb.1*
+%{_mandir}/man1/createuser.1*
+%{_mandir}/man1/destroydb.1*
+%{_mandir}/man1/destroyuser.1*
+%{_mandir}/man1/initdb.1*
+%{_mandir}/man1/initlocation.1*
+%{_mandir}/man1/pg_passwd.1*
+%{_mandir}/man1/postgres.1*
+%{_mandir}/man1/postmaster.1*
+%{_mandir}/man1/ipcclean.1*
+%{_mandir}/man5/*.5*
+
+%attr(750,postgres,postgres) %dir /var/lib/pgsql
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libpq.so.*.*
+%attr(755,root,root) %{_libdir}/libpq++.so.*.*
+%attr(755,root,root) %{_libdir}/libecpg.so.*.*
+# nie wiem do czego to
+%attr(755,root,root) %{_libdir}/plpgsql.so 
+
+%attr(755,root,root) %{_bindir}/pg_id
+
+#%defattr(644,postgres,postgres,755)
+%{_libdir}/pgsql
+
+%files tcl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libpgtcl.so.*.*
+%attr(755,root,root) %{_libdir}/pltcl.so
+%attr(755,root,root) %{_bindir}/pgtclsh
+%attr(755,root,root) %{_bindir}/pgtksh
+%attr(755,root,root) %{_bindir}/pgaccess
+
+%files tcl-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libpgtcl.so
+
+%files tcl-static
+%defattr(644,root,root,755)
+%{_libdir}/libpgtcl.a
 
 %files devel
 %defattr(644,root,root,755)
-%{_libdir}/libec*.a
-%{_libdir}/libpq*.a
-%attr(755,root,root) %{_libdir}/libec*.so
-%attr(755,root,root) %{_libdir}/libpq*.so
+%attr(755,root,root) %{_libdir}/libecpg.so
+%attr(755,root,root) %{_libdir}/libpq.so
+%attr(755,root,root) %{_libdir}/libpq++.so
 %{_includedir}/pgsql
-%{_mandir}/man3/*.gz
+%{_mandir}/man3/*.3*
 %attr(755,root,root) %{_bindir}/ecpg
-%{_mandir}/man1/ecpg.1.gz
+%{_mandir}/man1/ecpg.1*
 
-%files data
-%defattr(-,postgres,postgres)
-%attr(-,postgres,postgres) /var/lib/pgsql
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libecpg.a
+%{_libdir}/libpq.a
+%{_libdir}/libpq++.a
 
 %files clients
-%defattr(644, root, root, 755)
-%attr(755,root,root) %{_libdir}/libec*.so.*
-%attr(755,root,root) %{_libdir}/libpq*.so.*
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libec*.so.*.*
+%attr(755,root,root) %{_libdir}/libpq*.so.*.*
 %attr(755,root,root) %{_bindir}/pg_dump
 %attr(755,root,root) %{_bindir}/pg_dumpall
-%attr(755,root,root) %{_bindir}/pg_id
 %attr(755,root,root) %{_bindir}/pg_upgrade
 %attr(755,root,root) %{_bindir}/psql
-%{_mandir}/man1/pg_dump.1.gz
-%{_mandir}/man1/pg_dumpall.1.gz
-%{_mandir}/man1/pg_upgrade.1.gz
-%{_mandir}/man1/psql.1.gz
-%{_mandir}/manl/*.gz
+%attr(755,root,root) %{_bindir}/vacuumdb
 
-%files -f perlfiles.list perl
-%defattr(-, root, root)
+%{_mandir}/man1/pg_dump.1*
+%{_mandir}/man1/pg_dumpall.1*
+%{_mandir}/man1/pg_upgrade.1*
+%{_mandir}/man1/psql.1*
+%{_mandir}/manl/*.l*
+
+%files perl
+%defattr(644,root,root,755)
+%dir %{perl_sitearch}/auto/Pg
+%{perl_sitearch}/auto/Pg/Pg.so
+%attr(755,root,root) %{perl_sitearch}/auto/Pg/Pg.bs
+%{perl_sitearch}/auto/Pg/autosplit.ix
+%{perl_sitearch}/auto/Pg/.packlist
+%{perl_sitearch}/Pg.pm
 
 %files odbc
-%defattr(644, root, root, 755)
+%defattr(644,root,root,755)
 %doc src/interfaces/odbc/readme.txt src/interfaces/odbc/notice.txt
-%config(noreplace) %verify(not size mtime md5) /etc/odbc*
-%{_libdir}/libpsqlodbc*
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/odbc*
+%{_libdir}/libpsqlodbc.so.*.*
+
+%files odbc-devel
+%defattr(644,root,root,755)
 %{_includedir}/iodbc
+%attr(755,root,root) %{_libdir}/libpsqlodbc.so
 
-%changelog
-* Wed Mar 24 1999 Jacek Smyda <smyda@posexperts.com.pl>
-  [6.4.2-7]
-- correct dir for perl
-
-* Fri Mar  5 1999 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
-  [6.4.2-6]
-- changed ermission on rc script to 754,
-- /sbin/ldconfig emoved from Prereq list,
-- removed man group from man pages.
-
-* Fri Mar  5 1999 Jacek Smyda <smyda@posexperts.com.pl>
-- add polish group names
-- correct install perllocal.pod
-
-* Wed Mar  3 1999 Jacek Smyda <smyda@posexperts.com.pl>
-- correct group name
-
-* Thu Feb 25 1999 Jacek Smyda <smyda@posexperts.com.pl>
-- gzip man pages
-
-* Thu Feb 18 1999 Jacek Smyda <smyda@posexperts.com.pl>
-- Remove template database from data package and init after install
-
-* Mon Jan 17 1999 Jacek Smyda <smyda@posexperts.com.pl>
-- added translations for pl
-- new package: perl, doc, odbc
-- finally v6.4.2
-- removed tcl interface
-
-* Sat Oct 10 1998 Cristian Gafton <gafton@redhat.com>
-- strip all binaries
-- use defattr in all packages
-- updated pgaccess to version 0.90
-- /var/lib/pgsql/pg_pwd should not be 666
-
-* Sun Jun 21 1998 Jeff Johnson <jbj@redhat.com>
-- create %{_libdir}/pgsql (like %{_includedir}/pgsql)
-- resurrect libpq++.so*
-- fix name problem in startup-script (problem #533)
-
-* Fri Jun 19 1998 Jeff Johnson <jbj@redhat.com>
-- configure had "--prefix=$RPM_BUILD_ROOT/usr"
-- move all include files below %{_includedir}/pgsql.
-- resurrect perl client file lists.
-
-* Tue May 05 1998 Prospector System <bugs@redhat.com>
-- translations modified for de, fr, tr
+%files odbc-static
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libpsqlodbc.a
This page took 0.091313 seconds and 4 git commands to generate.