]> git.pld-linux.org Git - packages/postgresql.git/blob - postgresql.spec
- changed permitions for %{_libdir}/pgsql directory from 644 to 755
[packages/postgresql.git] / postgresql.spec
1
2 %include        /usr/lib/rpm/macros.perl
3 %define pglibdir     %{_libdir}/pgsql
4 %define pgsqldir     %{_datadir}/pgsql/sql
5 %define pgmoduledir  %{pglibdir}/modules
6
7 Summary:        PostgreSQL Data Base Management System
8 Summary(de):    PostgreSQL Datenbankverwaltungssystem
9 Summary(fr):    Sysème de gestion de base de données PostgreSQL
10 Summary(pl):    PostgreSQL system bazodanowy
11 Summary(tr):    Veri Tabaný Yönetim Sistemi
12 Name:           postgresql
13 Version:        7.0.2
14 Release:        9
15 License:        BSD
16 Group:          Applications/Databases
17 Group(pl):      Aplikacje/Bazy danych
18 Source0:        ftp://ftp.postgresql.org/pub/%{name}-%{version}.tar.gz
19 Source1:        %{name}.init
20 Source2:        pgsql-Database-HOWTO-html.tar.gz
21 Source3:        %{name}.sysconfig
22 Patch0:         %{name}-opt.patch
23 Patch1:         %{name}-DESTDIR.patch
24 Patch2:         %{name}-perl.patch
25 Patch3:         %{name}-python.patch
26 Patch4:         %{name}-no_libnsl.patch
27 URL:            http://www.postgresql.org/
28 Prereq:         /sbin/chkconfig
29 Requires:       rc-scripts
30 BuildRequires:  autoconf
31 BuildRequires:  tcl-devel
32 BuildRequires:  tk-devel
33 BuildRequires:  readline-devel
34 BuildRequires:  ncurses-devel >= 5.0
35 BuildRequires:  rpm-perlprov
36 BuildRequires:  XFree86-devel
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 Requires:       %{name}-libs = %{version}
39 Obsoletes:      postgresql-server
40 Obsoletes:      postgresql-test
41
42 %define         _sysconfdir     /etc
43
44 %description
45 PostgreSQL Data Base Management System (formerly known as Postgres,
46 then as Postgres95).
47
48 PostgreSQL is an enhancement of the POSTGRES database management
49 system, a next-generation DBMS research prototype. While PostgreSQL
50 retains the powerful data model and rich data types of POSTGRES, it
51 replaces the PostQuel query language with an extended subset of SQL.
52 PostgreSQL is free and the complete source is available.
53
54 PostgreSQL development is being performed by a team of Internet
55 developers who all subscribe to the PostgreSQL development mailing
56 list. The current coordinator is Marc G. Fournier
57 (scrappy@postgreSQL.org). This team is now responsible for all current
58 and future development of PostgreSQL.
59
60 The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many
61 others have contributed to the porting, testing, debugging and
62 enhancement of the code. The original Postgres code, from which
63 PostgreSQL is derived, was the effort of many graduate students,
64 undergraduate students, and staff programmers working under the
65 direction of Professor Michael Stonebraker at the University of
66 California, Berkeley.
67
68 The original name of the software at Berkeley was Postgres. When SQL
69 functionality was added in 1995, its name was changed to Postgres95.
70 The name was changed at the end of 1996 to PostgreSQL.
71
72 PostgreSQL runs on Solaris, SunOS, HPUX, AIX, Linux, Irix, FreeBSD,
73 and most flavours of Unix.
74
75 %description -l de
76 PostgreSQL Datenbank-Managementsystem (früher als Postgres, dann als
77 Postgres95 bekannt).
78
79 PostgreSQL ist eine Verbesserung des POSTGRES-DB-Managementsystems,
80 ein DBMS-Forschungsprototyp der nächsten Generation. Während es das
81 leistungsfähige Datenmodell und die reichhaltigen Datentypen von
82 POSTGRES beibehält, ersetzt es die PostQuel-Abfragesprache durch ein
83 Subset von SQL. PostgreSQL ist gratis, der gesamte Quellcode ist
84 verfügbar.
85
86 Ein Team von Internet-Entwicklern befaßt sich mit PostgreSQL. Sie alle
87 sind auf der PostgreSQL-Entwickleradreßliste. Koordinator ist Marc G.
88 Fournier (scrappy@postgreSQL.org). Das Team ist verantwortlich für
89 alle aktuellen und künftigen Entwicklungen von PostgreSQL.
90
91 Die Autoren von PostgreSQL 1.01 waren Andrew Yu und Jolly Chen.
92 Zahlreiche andere haben zur Portierung, zum Testen, Debugging und zur
93 Verbesserung des Code beigetragen. Den Original-Postgres-Code, von dem
94 sich PostgreSQL ableitet, verdanken wir der Arbeit vieler Doktoranden,
95 Studenten und Programmierern unter der Leitung von Professor Michael
96 Stonebraker an der University of California, Berkeley.
97
98 Der ursprüngliche Name war Postgres. Als 1995 SQL-Funktionalität
99 hinzukam, wurde der Name in Postgres95 geändert. Ende 1996 schließlich
100 entschied man sich für PostgreSQL.
101
102 PostgreSQL läuft auf Solaris, SunOS, HPUX, AIX, Linux, Irix, FreeBSD
103 und den meisten Unix-Systemen.
104
105 %description -l fr
106 Système de gestion de bases de données PostgreSQL (D'abord nommé
107 Postgres, puis Postgres95).
108
109 PostgreSQL est une amélioration du système de gestion de bases de
110 données POSTGRES, un prototype de recherche de la génération suivant
111 DBMS. Tout en conservant le puissant modèle de donnée de et les types
112 de donée riches de Postgres, il remplace le langage de requêtes de
113 Postgres par un sous ensemble etendu de commandes SQL. PosrgreSQL est
114 libre, et ses sources sont disponibles.
115
116 Le développement de PostgreSQL est actuellement réalisé via internet
117 parune équipe de développeurs inscrits sur la mailing-list de
118 développement de PostgreSQL. Le coordinateur actuel est Marc G
119 Fournier (scrappy@postgreSQL.org). Cette équipe est responsable du
120 développemen actuel et à venir de PostgreSQL.
121
122 Les auteurs de PostgreSQL 1.01 étaient Andrew Yu et Jolly Chen.
123 Beaucoup d'autres ont contribué au portage, au test, au débogage et à
124 l'amélioration du code. Le code original de Postgres, duquel
125 PostgreSQL est dérivé, a été l'oeuvre d'étudiants de haut niveau, de
126 moins haut niveau, et de programmeurs travaillant sous la direction du
127 professeur Michael Stonebraker à l'université de Berkeley Californie.
128
129 Le nom original du logiciel était Postgres. Quand les fonctionnalitées
130 SQL furent ajoutées en 1995, son nom est devenu Postgres95. Il a été
131 rebaptisé PostgreSQL en 1996.
132
133 PostgreSQL tourne sur Solaris, SunOS, HPUX, AIX, Linux, Irix, FreeBSD,
134 et la plupart des Unix.
135
136 %description -l pl
137 PostgreSQL System Zarz±dzania Baz± Danych (dawniej znany jako
138 Postgres, nastêpnie jako Postgres95).
139
140 PostgreSQL mo¿e byæ uruchominy pod nastêpuj±cymi systemami: Solaris,
141 SunOS, HPUX, AIX, Linux, Irix, FreeBSD i innych systemach Unix.
142
143 %description -l tr
144 PostgreSQL, POSTGRES'den türemiþ bir veri tabaný yönetim sistemidir
145 (DBMS). Güçlü veri modeli ve zengin POSTGRES veri tiplerini
146 desteklerken SQL'in geniþletilmiþ bir altkümesi yerine PostQuel
147 sorgulama dilini koyar.
148
149 %package devel
150 Summary:        PostgreSQL development header files and libraries
151 Summary(de):    PostgreSQL-Entwicklungs-Header-Dateien und Libraries 
152 Summary(fr):    En-têtes et bibliothèques de développement PostgreSQL
153 Summary(pl):    PostgreSQL - pliki nag³ówkowe i biblioteki
154 Summary(tr):    PostgreSQL baþlýk dosyalarý ve kitaplýklar
155 Group:          Development/Libraries
156 Group(pl):      Programowanie/Biblioteki
157 Group(fr):      Development/Librairies
158 Requires:       %{name}-libs = %{version}
159
160 %description devel
161 This package contains header files and libraries required to compile
162 applications that are talking directly to the PostgreSQL backend
163 server.
164
165 %description -l de devel
166 Dieses Paket enthält die Header-Dateien und Libraries, die zum
167 Kompilieren von Applikationen notwendig sind, die direkt mit dem
168 PostgreSQL-Backend-Server kommunizieren.
169
170 %description -l fr devel
171 Ce package contient les fichiers d'en-tête et les bibliothéques
172 nécessaires pour compiler des applications ayant des échanges directs
173 avec le serveur du backend PostgreSQL.
174
175 %description -l pl devel
176 Pakiet zawiera nag³ówki oraz biblioteki wymagane do kompilacji
177 aplikacji ³±cz±cych siê bezpo¶rednio z serwerem PostgreSQL.
178
179 %description -l tr devel
180 Bu paket, PostgreSQL sunucusuyla konuþacak yazýlýmlar geliþtirmek için
181 gereken baþlýk dosyalarýný ve kitaplýklarý içerir.
182
183 %package clients
184 Summary:        clients needed to access a PostgreSQL server
185 Summary(pl):    klienci wymagani do dostêpu do serwera PostgreSQL
186 Group:          Applications/Databases
187 Group(pl):      Aplikacje/Bazy danych
188 Requires:       %{name}-libs = %{version}
189
190 %description clients
191 This package includes only the clients and client libraries needed to
192 access an PostgreSQL server. The server is included in the main
193 package. If all you need is to connect to another PostgreSQL server,
194 the this is the only package you need to install.
195
196 In this package there are client libraries available for C and C++, as
197 well as several command-line utilities you can use to manage your
198 databases on a remote PostgreSQL server.
199
200 %description -l pl clients
201 Pakiet zawiera klientów oraz biblioteki niezbêdne dla dostêpu do
202 serwera PostgreSQL. Serwer znajduje siê w g³ównym pakiecie.
203
204 %package perl
205 Summary:        Perl interface to PostgreSQL database
206 Summary(pl):    Interface dla Perl'a umo¿liwiaj±cy dostêp do baz PostgreSQL
207 Group:          Applications/Databases
208 Group(pl):      Aplikacje/Bazy danych
209 Requires:       perl >= 5.004
210 Requires:       %{name}-libs = %{version}
211
212 %description perl
213 This package includes only perl modules needed to access an PostgreSQL
214 server.
215
216 %description -l pl perl
217 Pakiet ten zawiera tylko modu³y Perl'a wymagane dla dostêpu do serwera
218 PostgreSQL.
219
220 %package python
221 Summary:        The python-based client programs needed for accessing a PostgreSQL server
222 Group:          Development/Languages/Python
223 Group(pl):      Programowanie/Jêzyki/Python
224 Requires:       python >= 1.5
225 Requires:       %{name}-libs = %{version}
226
227 %description python
228 postgresql-python includes the python-based client programs and client
229 libraries that you'll need to access a PostgreSQL database management
230 system server.
231
232 %package doc
233 Summary:        Documentation for PostgreSQL
234 Summary(pl):    Dodatkowa dokumantacja dla PostgreSQL
235 Group:          Applications/Databases
236 Group(pl):      Aplikacje/Bazy danych
237 #Requires:      %{name} = %{version}
238
239 %description doc
240 This package includes documentation and HOWTO for programmer, admin
241 etc., in HTML format.
242
243 %description -l pl doc
244 Pakiet ten zawiera dokumentacjê oraz HOWTO m.in. dla programistów,
245 administratorów w formacie HTML.
246
247 %package libs
248 Summary:        PostgreSQL libraries
249 Summary(pl):    Biblioteki dzielone programu PostgreSQL
250 Group:          Libraries
251 Group(pl):      Biblioteki
252 Group(fr):      Librairies
253
254 %description libs
255 PostgreSQL libraries.
256
257 %description libs -l pl
258 Biblioteki dzielone programu PostgreSQL.
259
260 %package static
261 Summary:        PostgreSQL static libraries
262 Summary(pl):    Biblioteki statyczne programu PostgreSQL
263 Group:          Development/Libraries
264 Group(pl):      Programowanie/Biblioteki
265 Group(fr):      Development/Librairies
266 Requires:       %{name}-devel = %{version}
267
268 %description static
269 PostgreSQL static libraries.
270
271 %description -l pl static
272 Biblioteki statyczne programu PostgreSQL.
273
274 %package c++
275 Summary:        C++ interface to PostgreSQL
276 Summary(pl):    Interface C++ do PostgreSQL
277 Group:          Applications/Databases
278 Group(pl):      Aplikacje/Bazy danych
279 Requires:       %{name}-libs = %{version}
280
281 %description c++
282 This package includes library for C++ interface to PostgreSQL.
283
284 %description -l pl c++
285 Pakiet ten zawiera biblioteki dla interface'u C++ do PostgreSQL.
286
287 %package c++-devel
288 Summary:        C++ interface to PostgreSQL - development part
289 Summary(pl):    Interface C++ do PostgreSQL - cze¶æ programistyczna
290 Group:          Applications/Databases
291 Group(pl):      Aplikacje/Bazy danych
292 Requires:       %{name}-c++ = %{version}
293 Requires:       %{name}-devel = %{version}
294
295 %description c++-devel
296 This package includes library and header files for C++ interface.
297
298 %description -l pl c++-devel
299 Pakiet ten zawiera biblioteki i pliki nag³ówkowe dla interface'u C++.
300
301 %package c++-static
302 Summary:        C++ interface to PostgreSQL - static libraries
303 Summary(pl):    Interface C++ do PostgreSQL - biblioteki statyczne
304 Group:          Applications/Databases
305 Group(pl):      Aplikacje/Bazy danych
306 Requires:       %{name}-c++-devel = %{version}
307
308 %description c++-static
309 This package includes static library for interface C++.
310
311 %description -l pl c++-static
312 Pakiet ten zawiera biblioteki statyczne dla interface'u C++.
313
314 %package odbc
315 Summary:        ODBC interface to PostgreSQL
316 Summary(pl):    Interface ODBC do PostgreSQL
317 Group:          Applications/Databases
318 Group(pl):      Aplikacje/Bazy danych
319 Requires:       %{name}-libs = %{version}
320
321 %description odbc
322 This package includes library for interface ODBC.
323
324 %description -l pl odbc
325 Pakiet ten zawiera biblioteki dla interface'u ODBC.
326
327 %package odbc-devel
328 Summary:        ODBC interface to PostgreSQL - development part
329 Summary(pl):    Interface ODBC do PostgreSQL - cze¶æ programistyczna
330 Group:          Applications/Databases
331 Group(pl):      Aplikacje/Bazy danych
332 Requires:       %{name}-odbc = %{version}
333 Requires:       %{name}-devel = %{version}
334
335 %description odbc-devel
336 This package includes library and header files for interface ODBC.
337
338 %description -l pl odbc-devel
339 Pakiet ten zawiera biblioteki i pliki nag³ówkowe dla interface'u ODBC.
340
341 %package odbc-static
342 Summary:        ODBC interface to PostgreSQL - static libraries
343 Summary(pl):    Interface ODBC do PostgreSQL - biblioteki statyczne
344 Group:          Applications/Databases
345 Group(pl):      Aplikacje/Bazy danych
346 Requires:       %{name}-odbc-devel = %{version}
347
348 %description odbc-static
349 This package includes static library for interface ODBC.
350
351 %description -l pl odbc-static
352 Pakiet ten zawiera biblioteki statyczne dla interface'u ODBC.
353
354 %package tcl
355 Summary:        tcl interface for PostgreSQL
356 Summary(pl):    tcl interface dla PostgreSQL
357 Group:          Development/Languages/Tcl
358 Group(pl):      Programowanie/Jêzyki/Tcl
359 Requires:       %{name}-libs = %{version}
360
361 %description tcl
362 tcl interface for PostgreSQL.
363
364 %description tcl -l pl
365 tcl interface dla PostgreSQL.
366
367 %package tcl-devel
368 Summary:        Development part of tcl interface for PostgreSQL
369 Summary(pl):    Czê¶æ dla programistów interafece tcl dla PostgreSQL
370 Group:          Development/Languages/Tcl
371 Group(pl):      Programowanie/Jêzyki/Tcl
372 Requires:       %{name}-tcl = %{version}
373 Requires:       %{name}-devel = %{version}
374
375 %description tcl-devel
376 Development part of tcl interface for PostgreSQL.
377
378 %description tcl-devel -l pl
379 Czê¶æ dla programistów interafece tcl dla PostgreSQL.
380
381 %package tcl-static
382 Summary:        Static libraries of tcl interface for PostgreSQL
383 Summary(pl):    Biblioteki statyczne interafece tcl dla PostgreSQL
384 Group:          Development/Languages/Tcl
385 Group(pl):      Programowanie/Jêzyki/Tcl
386 Requires:       %{name}-tcl-devel = %{version}
387
388 %description tcl-static
389 Static libraries of tcl interface for PostgreSQL
390
391 %description tcl-devel -l pl
392 Biblioteki statyczne interafece tcl dla PostgreSQL
393
394 %package module-datetime
395 Summary:        Some useful datetime functions for PostgreSQL
396 Summary(pl):    Kilka u¿ytecznych funkcji operuj±cych na dacie i czasie dla PostgreSQL
397 Group:          Applications/Databases
398 Group(pl):      Aplikacje/Bazy danych
399 Requires:       %{name} = %{version}
400
401 %description module-datetime
402 Some useful datetime function for PostgreSQL such as:
403 - hhmm_in(opaque)
404 - hhmm_out(opaque)
405 - hhmm(time)
406 - time_difference(time,time)
407 - time_hours(time)
408 - time_minutes(time)
409 - time_seconds(time)
410 - as_minutes(time)
411 - as_seconds(time)
412 - date_day(date)
413 - date_month(date)
414 - date_year(date)
415 - currenttime()
416 - currentdate() To enable them you need to execute
417   datetime_function.sql script. You can found it in /usr/share/pgsql/sql
418   directory.
419
420 %description module-datetime -l pl
421 Kilka u¿ytecznych funkcji operuj±cych na dacie i czasie dla
422 PostgreSQL.
423 - hhmm_in(opaque)
424 - hhmm_out(opaque)
425 - hhmm(time)
426 - time_difference(time,time)
427 - time_hours(time)
428 - time_minutes(time)
429 - time_seconds(time)
430 - as_minutes(time)
431 - as_seconds(time)
432 - date_day(date)
433 - date_month(date)
434 - date_year(date)
435 - currenttime()
436 - currentdate() Po wykonaniu skryptu datetime_function.sql mo¿na
437   u¿ywaæ tych funkcji z poziomu zapytañ SQL. Skrypt ten znajduje siê w
438   katalogu /usr/share/pgsql/sql.
439
440 %package module-plpgsql
441 Summary:        PL/pgSQL - PostgreSQL procedural language
442 Summary(pl):    PL/pgSQL jêzyk proceduralny bazy danych PostgreSQL
443 Group:          Applications/Databases
444 Group(pl):      Aplikacje/Bazy danych
445 Requires:       %{name} = %{version}
446
447 %description module-plpgsql
448 From PostgreSQL documentation.
449
450 Postgres supports the definition of procedural languages. In the case
451 of a function or trigger procedure defined in a procedural language,
452 the database has no built-in knowledge about how to interpret the
453 function's source text. Instead, the task is passed to a handler that
454 knows the details of the language. The handler itself is a special
455 programming language function compiled into a shared object and loaded
456 on demand.
457
458 To enable PL/pgSQL procedural language for your database you have to
459 run createlang command.
460
461 %description module-plpgsql -l pl
462 Z dokumentacji PostgreSQL.
463
464 Postgres ma wsparcie dla jêzyków proceduralnych. W przypadku, kiedy
465 programista zdefiniuje procedurê wyzwalacza lub funkcjê w jêzyku
466 proceduralnym, baza danych nie ma pojêcia jak interpretowaæ tego typu
467 funkcjê. Funkcja lub procedura ta jest przekazywana do interpretera,
468 który wie jak j± wykonaæ. Interpreter jest odpowiedni±, specjaln±
469 funkcj±, która jest skompilowana w obiekt dzielony i ³adowany w razie
470 potrzeby.
471
472 Za pomoc± komendy createlang mo¿na dodaæ wsparcie dla jêzyka
473 proceduralnego PL/pgSQL dla swojej bazy danych.
474
475 %package module-pltcl
476 Summary:        PL/TCL - PostgreSQL procedural language
477 Summary(pl):    PL/TCL jêzyk proceduralny bazy danych PostgreSQL
478 Group:          Applications/Databases
479 Group(pl):      Aplikacje/Bazy danych
480 Requires:       %{name} = %{version}
481
482 %description module-pltcl
483 From PostgreSQL documentation.
484
485 Postgres supports the definition of procedural languages. In the case
486 of a function or trigger procedure defined in a procedural language,
487 the database has no built-in knowledge about how to interpret the
488 function's source text. Instead, the task is passed to a handler that
489 knows the details of the language. The handler itself is a special
490 programming language function compiled into a shared object and loaded
491 on demand.
492
493 To enable PL/TCL procedural language for your database you have to run
494 createlang command.
495
496 %description module-pltcl -l pl
497 Z dokumentacji PostgreSQL.
498
499 Postgres ma wsparcie dla jêzyków proceduralnych. W przypadku, kiedy
500 programista zdefiniuje procedurê wyzwalacza lub funkcjê w jêzyku
501 proceduralnym, baza danych nie ma pojêcia jak interpretowaæ tego typu
502 funkcjê. Funkcja lub procedura ta jest przekazywana do interpretera,
503 który wie jak j± wykonaæ. Interpreter jest odpowiedni±, specjaln±
504 funkcj±, która jest skompilowana w obiekt dzielony i ³adowany w razie
505 potrzeby.
506
507 Za pomoc± komendy createlang mo¿na dodaæ wsparcie dla jêzyka
508 proceduralnego PL/TCL dla swojej bazy danych.
509
510 %prep
511 %setup  -q
512 %patch0 -p1
513 %patch1 -p1
514 %patch2 -p1
515 %patch3 -p1
516 %patch4 -p1
517
518 # Erase all CVS dir
519 rm -fR `find contrib/ -type d -name CVS`
520
521 %build
522 PATH=$PATH:. ; export PATH
523 cd src
524
525 aclocal
526 autoconf
527 LDFLAGS="-s"; export LDFLAGS
528 %configure \
529 %ifarch %{ix86}
530         --with-template=linux_i386 \
531 %else
532         --with-template=linux_%{_target_cpu} \
533 %endif
534         --enable-hba \
535         --with-mulitbyte=UNICODE \
536         --enable-locale \
537         --with-odbc \
538         --with-odbcinst=%{_sysconfdir} \
539         --with-tcl \
540         --with-tk \
541         --with-python \
542         --with-x \
543         --with-perl
544
545 %{__make} OPT="$RPM_OPT_FLAGS"
546
547 cd ..
548 %{__make} all PGDOCS=unpacked -C doc
549
550 # for datetime functions
551 make -C contrib/datetime LIBDIR=%{pglibdir}
552
553
554 %install
555 rm -rf $RPM_BUILD_ROOT
556 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig} \
557         $RPM_BUILD_ROOT/var/lib/pgsql \
558         $RPM_BUILD_ROOT%{_libdir}/pgsql
559
560 %{__make} -C src install DESTDIR=$RPM_BUILD_ROOT
561 %{__make} -C doc install DESTDIR=$RPM_BUILD_ROOT
562
563 # for datetime functions
564 %{__make} -C contrib/datetime install \
565         LIBDIR=$RPM_BUILD_ROOT%{pglibdir} SQLDIR=$RPM_BUILD_ROOT%{pgsqldir}
566
567 # Move PL/pgSQL procedural language to %{pgmoduledir}
568 ( cd $RPM_BUILD_ROOT%{_libdir}
569   mv plpgsql.so $RPM_BUILD_ROOT%{pgmoduledir}
570 )
571
572 # Move PL/TCL procedural language to %{pgmoduledir}
573 ( cd $RPM_BUILD_ROOT%{_libdir}
574   mv pltcl.so $RPM_BUILD_ROOT%{pgmoduledir}
575 )
576
577 # For Perl interface
578 ( cd $RPM_BUILD_ROOT%{perl_sitearch}/auto/Pg
579   mv .packlist .packlist.old
580   sed -e "s|$RPM_BUILD_ROOT/|/|g" -e "s|./||" < .packlist.old > .packlist
581   rm -f .packlist.old
582 )
583
584 # Move all templates/examples beneath %{_libdir}/pgsql
585 ( cd $RPM_BUILD_ROOT%{_libdir}
586   mv  *description *source *sample pgsql
587 )
588
589 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
590 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/postgresql
591
592 install -d howto
593 ( cd howto
594   tar xzf $RPM_SOURCE_DIR/pgsql-Database-HOWTO-html.tar.gz
595 )
596
597 # Install all header files. They are required
598 # by executor/spi.h and commands/trigger.h
599
600 ( cd src/include
601   cp -rf * $RPM_BUILD_ROOT%{_includedir}/pgsql
602 )
603
604 strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so* \
605         $RPM_BUILD_ROOT%{perl_sitearch}/auto/Pg/*.so
606
607 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/*
608
609 %pre
610 getgid postgres >/dev/null 2>&1 || /usr/sbin/groupadd -g 88 -r -f postgres
611 id postgres >/dev/null 2>&1 || /usr/sbin/useradd -M -o -r -u 88 \
612         -d /var/lib/pgsql -s /bin/sh -g postgres \
613         -c "PostgreSQL Server" postgres
614
615 %post
616 /sbin/chkconfig --add postgresql
617
618 if [ -r /var/lock/subsys/postmaster ]; then
619         /etc/rc.d/init.d/postgresql restart >&2
620 else
621         echo "Run \"/etc/rc.d/init.d/postgresql start\" to start postgresql server."
622 fi
623
624 %preun
625 if [ "$1" = "0" ]; then
626         if [ -f /var/lock/subsys/postmaster ]; then
627                 /etc/rc.d/init.d/postgresql stop
628         fi
629         /sbin/chkconfig --del postgresql
630 fi
631
632 %post   libs -p /sbin/ldconfig
633 %postun libs -p /sbin/ldconfig
634
635 %post   tcl -p /sbin/ldconfig
636 %postun tcl -p /sbin/ldconfig
637
638 %post   clients -p /sbin/ldconfig
639 %postun clients -p /sbin/ldconfig
640
641 %post   c++ -p /sbin/ldconfig
642 %postun c++ -p /sbin/ldconfig
643
644 %post   odbc -p /sbin/ldconfig
645 %postun odbc -p /sbin/ldconfig
646
647 %clean
648 rm -rf $RPM_BUILD_ROOT
649 rm -f /tmp/tmp_perl_info
650
651 %files doc
652 %defattr(644,root,root,755)
653 %doc doc/unpacked/*
654 %doc howto
655
656 %files
657 %defattr(644,root,root,755)
658 %doc contrib 
659 %doc doc/FAQ doc/FAQ_Linux doc/README* 
660 %doc COPYRIGHT README HISTORY doc/bug.template
661 %doc doc/*.ps.gz
662
663 %attr(754,root,root) /etc/rc.d/init.d/*
664 %attr(644,root,root) /etc/sysconfig/*
665
666 %attr(755,root,root) %{_bindir}/createdb
667 %attr(755,root,root) %{_bindir}/createuser
668 %attr(755,root,root) %{_bindir}/dropdb
669 %attr(755,root,root) %{_bindir}/dropuser
670 %attr(755,root,root) %{_bindir}/initdb
671 %attr(755,root,root) %{_bindir}/initlocation
672 %attr(755,root,root) %{_bindir}/pg_passwd
673 %attr(755,root,root) %{_bindir}/pg_version
674 %attr(755,root,root) %{_bindir}/postgres
675 %attr(755,root,root) %{_bindir}/postmaster
676 %attr(755,root,root) %{_bindir}/ipcclean
677 %attr(755,root,root) %{_bindir}/createlang
678 %attr(755,root,root) %{_bindir}/droplang
679
680 %{_mandir}/man1/createdb.1*
681 %{_mandir}/man1/createlang.1*
682 %{_mandir}/man1/createuser.1*
683 %{_mandir}/man1/dropdb.1*
684 %{_mandir}/man1/droplang.1*
685 %{_mandir}/man1/dropuser.1*
686 %{_mandir}/man1/initdb.1*
687 %{_mandir}/man1/initlocation.1*
688 %{_mandir}/man1/pg_passwd.1*
689 %{_mandir}/man1/postgres.1*
690 %{_mandir}/man1/postmaster.1*
691 %{_mandir}/man1/ipcclean.1*
692
693 %attr(750,postgres,postgres) %dir /var/lib/pgsql
694
695 %files libs
696 %defattr(644,root,root,755)
697 %attr(755,root,root) %{_libdir}/libpq.so.*.*
698 %attr(755,root,root) %{_libdir}/libecpg.so.*.*
699
700 %attr(755,root,root) %{_bindir}/pg_id
701
702 %attr(755,root,root) %dir %{_libdir}/pgsql
703 %attr(644,root,root) %{_libdir}/pgsql/*
704
705 %files devel
706 %defattr(644,root,root,755)
707 %attr(755,root,root) %{_libdir}/libecpg.so
708 %attr(755,root,root) %{_libdir}/libpq.so
709 %dir %{_includedir}/pgsql
710 %{_includedir}/pgsql/c.h
711 %{_includedir}/pgsql/config.h
712 %{_includedir}/pgsql/dynloader.h
713 %{_includedir}/pgsql/ecpgerrno.h
714 %{_includedir}/pgsql/ecpglib.h
715 %{_includedir}/pgsql/ecpgtype.h
716 %{_includedir}/pgsql/fmgr.h
717 %{_includedir}/pgsql/libpgeasy.h
718 %{_includedir}/pgsql/libpgtcl.h
719 %{_includedir}/pgsql/libpq-fe.h
720 %{_includedir}/pgsql/libpq-int.h
721 %{_includedir}/pgsql/miscadmin.h
722 %{_includedir}/pgsql/os.h
723 %{_includedir}/pgsql/postgres.h
724 %{_includedir}/pgsql/postgres_ext.h
725 %{_includedir}/pgsql/pqexpbuffer.h
726 %{_includedir}/pgsql/rusagestub.h
727 %{_includedir}/pgsql/sql3types.h
728 %{_includedir}/pgsql/sqlca.h
729 %{_includedir}/pgsql/strdup.h
730 %{_includedir}/pgsql/version.h
731 %{_includedir}/pgsql/access
732 %{_includedir}/pgsql/bootstrap
733 %{_includedir}/pgsql/catalog
734 %{_includedir}/pgsql/commands
735 %{_includedir}/pgsql/executor
736 %{_includedir}/pgsql/iodbc
737 %{_includedir}/pgsql/lib
738 %{_includedir}/pgsql/libpq
739 %{_includedir}/pgsql/mb
740 %{_includedir}/pgsql/nodes
741 %{_includedir}/pgsql/optimizer
742 %{_includedir}/pgsql/parser
743 %{_includedir}/pgsql/regex
744 %{_includedir}/pgsql/rewrite
745 %{_includedir}/pgsql/storage
746 %{_includedir}/pgsql/tcop
747 %{_includedir}/pgsql/utils
748 %attr(755,root,root) %{_bindir}/ecpg
749 %{_mandir}/man1/ecpg.1*
750
751 %files static
752 %defattr(644,root,root,755)
753 %{_libdir}/libecpg.a
754 %{_libdir}/libpq.a
755
756 %files clients
757 %defattr(644,root,root,755)
758 %attr(755,root,root) %{_libdir}/libec*.so.*.*
759 %attr(755,root,root) %{_libdir}/libpq*.so.*.*
760 %attr(755,root,root) %{_bindir}/pg_dump
761 %attr(755,root,root) %{_bindir}/pg_dumpall
762 %attr(755,root,root) %{_bindir}/pg_upgrade
763 %attr(755,root,root) %{_bindir}/psql
764 %attr(755,root,root) %{_bindir}/vacuumdb
765
766 %{_mandir}/man1/pg_dump.1*
767 %{_mandir}/man1/pg_dumpall.1*
768 %{_mandir}/man1/pg_upgrade.1*
769 %{_mandir}/man1/psql.1*
770 %{_mandir}/manl/*.l*
771
772 %files c++
773 %defattr(644,root,root,755)
774 %attr(755,root,root) %{_libdir}/libpq++.so.*.*
775
776 %files c++-devel
777 %defattr(644,root,root,755)
778 %attr(755,root,root) %{_libdir}/libpq++.so
779 %{_includedir}/pgsql/libpq++.h
780 %{_includedir}/pgsql/libpq++
781
782 %files c++-static
783 %defattr(644,root,root,755)
784 %{_libdir}/libpq++.a
785
786 %files perl
787 %defattr(644,root,root,755)
788 %dir %{perl_sitearch}/auto/Pg
789 %{perl_sitearch}/auto/Pg/Pg.so
790 %attr(755,root,root) %{perl_sitearch}/auto/Pg/Pg.bs
791 %{perl_sitearch}/auto/Pg/autosplit.ix
792 %{perl_sitearch}/auto/Pg/.packlist
793 %{perl_sitearch}/Pg.pm
794 %{_mandir}/man3/*
795
796 %files tcl
797 %defattr(644,root,root,755)
798 %attr(755,root,root) %{_libdir}/libpgtcl.so.*.*
799 %attr(755,root,root) %{_bindir}/pgtclsh
800 %attr(755,root,root) %{_bindir}/pgtksh
801 %attr(755,root,root) %{_bindir}/pgaccess
802
803 %files tcl-devel
804 %defattr(644,root,root,755)
805 %attr(755,root,root) %{_libdir}/libpgtcl.so
806
807 %files tcl-static
808 %defattr(644,root,root,755)
809 %{_libdir}/libpgtcl.a
810
811 %files odbc
812 %defattr(644,root,root,755)
813 %doc src/interfaces/odbc/readme.txt src/interfaces/odbc/notice.txt
814 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/odbc*
815 %attr(755,root,root) %{_libdir}/libpsqlodbc.so.*.*
816
817 %files odbc-devel
818 %defattr(644,root,root,755)
819 %{_includedir}/pgsql/iodbc
820 %attr(755,root,root) %{_libdir}/libpsqlodbc.so
821
822 %files odbc-static
823 %defattr(644,root,root,755)
824 %attr(755,root,root) %{_libdir}/libpsqlodbc.a
825
826 %files module-datetime
827 %defattr(644,root,root,755)
828 %attr(755,root,root) %{pgmoduledir}/datetime_functions.so
829 %attr(644,root,root) %{pgsqldir}/datetime_functions.sql
830
831 %files module-plpgsql
832 %defattr(644,root,root,755)
833 %attr(755,root,root) %{pgmoduledir}/plpgsql.so
834
835 %files module-pltcl
836 %defattr(644,root,root,755)
837 %attr(755,root,root) %{pgmoduledir}/pltcl.so
This page took 0.189123 seconds and 3 git commands to generate.