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