Package postgresql8.3: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
# -*- mode: rpm-spec; coding: utf-8 -*-
# $Id: postgresql,v 1.13 2002/10/08 10:33:00 lioka Exp $

%def_with devel

%define prog_name            postgresql
%define postgresql_major     8
%define postgresql_minor     3
%define postgresql_subminor  23
%define postgresql_altrel    0.M51.1
%define libpq_major          5
%define libpq_minor          1
%define libecpg_major        6
%define libecpg_minor        0

%add_findreq_skiplist /usr/bin/postgresql-dump
%add_findreq_skiplist /usr/share/pgsql/backup/pg_dumpall_new

Name: %prog_name%postgresql_major.%postgresql_minor
Version: %postgresql_major.%postgresql_minor.%postgresql_subminor
Release: alt%postgresql_altrel

%define PGSQL pgsql
%define ROOT %_localstatedir/%PGSQL-root
%define docdir %_docdir/%prog_name-%version

%define libpq_name    libpq%libpq_major.%libpq_minor
%define libecpg_name  libecpg%libecpg_major.%libecpg_minor

Summary: PostgreSQL client programs and libraries
License: BSD
Group: Databases
URL: http://www.postgresql.org/

Packager: PostgreSQL Maintainers Team <pgsql@packages.altlinux.org>


Source0: %name-%version.tar

Patch0: %prog_name-8.1.0-include.patch
Patch1: %prog_name-8.3.22-alt-chroot.patch
Patch2: %prog_name-8.2.0-tinfo.patch
Patch3: %prog_name-8.2.0-libpq-locale.patch

Patch100: postgresql-8.3.22-alt-fix-buffer_overflow.patch


BuildPreReq: /usr/bin/mksock perl-DBD-Pg perl-DBI perl-Pg autoconf_2.50 libxslt-devel libxml2-devel

Provides: %prog_name = %version-%release
Conflicts: %prog_name < %version-%release
Conflicts: %prog_name > %version-%release
Conflicts: %{prog_name}8.0
Conflicts: %{prog_name}8.1
Conflicts: %{prog_name}8.2
Conflicts: %{prog_name}8.4
Conflicts: %{prog_name}9.0
Conflicts: %{prog_name}9.1

BuildPreReq: libkrb5-devel

BuildRequires: OpenSP docbook-style-dsssl flex libldap-devel libpam-devel
BuildRequires: libreadline-devel libssl-devel libxslt-devel perl-SGMLSpm
BuildRequires: perl-devel python-devel tcl-devel zlib-devel

%description
PostgreSQL is an advanced Object-Relational database management system
(DBMS) that supports almost all SQL constructs (including
transactions, subselects and user-defined types and functions). The
postgresql package includes the client programs and libraries that
you'll need to access a PostgreSQL DBMS server.  These PostgreSQL
client programs are programs that directly manipulate the internal
structure of PostgreSQL databases on a PostgreSQL server. These client
programs can be located on the same machine with the PostgreSQL
server, or may be on a remote machine which accesses a PostgreSQL
server over a network connection. This package contains the docs
in HTML for the whole package, as well as command-line utilities for
managing PostgreSQL databases on a PostgreSQL server.

If you want to manipulate a PostgreSQL database on a remote PostgreSQL
server, you need this package. You also need to install this package
if you're installing the postgresql-server package.

%package -n %libpq_name
Summary: The shared libraries required for any PostgreSQL clients
Group: Databases
Provides: libpq = %version-%release
Provides: libpq%libpq_major = %version-%release
Conflicts: libpq%libpq_major < %version-%release
Conflicts: libpq%libpq_major > %version-%release
Obsoletes: libpq5.3 < 8.3.4-alt2

%description -n %libpq_name
C and C++ libraries to enable user programs to communicate with the
PostgreSQL database backend. The backend can be on another machine and
accessed through TCP/IP.

%if_with devel
%package -n %libpq_name-devel
Summary: Development shared library for %libpq_name
Group: Development/Databases
Requires: %libpq_name = %version-%release
Provides: libpq-devel = %version-%release
Conflicts: libpq-devel < %version-%release
Conflicts: libpq-devel > %version-%release
Provides: libpq%libpq_major-devel = %version-%release
Conflicts: libpq%libpq_major-devel < %version-%release
Conflicts: libpq%libpq_major-devel > %version-%release

%description -n %libpq_name-devel
Development shared library for %libpq_name

%package -n %libpq_name-devel-static
Summary: Development static library for %libpq_name
Group: Development/Databases
Requires: %libpq_name-devel = %version-%release
Provides: libpq-devel-static = %version-%release
Conflicts: libpq-devel-static < %version-%release
Conflicts: libpq-devel-static > %version-%release
Provides: libpq%libpq_major-devel-static = %version-%release
Conflicts: libpq%libpq_major-devel-static < %version-%release
Conflicts: libpq%libpq_major-devel-static > %version-%release

%description -n %libpq_name-devel-static
Development static library for %libpq_name
%endif

%package -n %libecpg_name
Summary: Shared library %libecpg_name for PostgreSQL
Group: Databases
Provides: libecpg = %version-%release
Provides: libecpg%libecpg_major = %version-%release
Conflicts: libecpg%libecpg_major < %version-%release
Conflicts: libecpg%libecpg_major > %version-%release

%description -n %libecpg_name
%libecpg_name is used by programs built with ecpg (Embedded PostgreSQL for C)
Use postgresql-dev to develop such programs.

%if_with devel
%package -n %libecpg_name-devel
Summary: Development shared library to %libecpg_name
Group: Development/Databases
Requires: %libecpg_name = %version-%release
Provides: libecpg-devel = %version-%release
Conflicts: libecpg-devel < %version-%release
Conflicts: libecpg-devel > %version-%release
Provides: libecpg%libecpg_major-devel = %version-%release
Conflicts: libecpg%libecpg_major-devel < %version-%release
Conflicts: libecpg%libecpg_major-devel > %version-%release

%description -n %libecpg_name-devel
Development shared library for %libecpg_name and the ecpg Embedded C
Postgres preprocessor.

%package -n %libecpg_name-devel-static
Summary: Development static library to %libecpg_name
Group: Development/Databases
Requires: %libecpg_name-devel = %version-%release
Provides: libecpg-devel-static = %version-%release
Conflicts: libecpg-devel-static < %version-%release
Conflicts: libecpg-devel-static > %version-%release
Provides: libecpg%libecpg_major-devel-static = %version-%release
Conflicts: libecpg%libecpg_major-devel-static < %version-%release
Conflicts: libecpg%libecpg_major-devel-static > %version-%release

%description -n %libecpg_name-devel-static
Development static library to %libecpg_name
%endif

%package docs
Summary: Extra documentation for PostgreSQL
Group: Databases

%description docs
The postgresql-docs package includes the SGML source for the documentation
as well as the documentation in other formats, and some extra documentation.
Install this package if you want to help with the PostgreSQL documentation
project, or if you want to generate printed documentation.

%package contrib
Summary: Contributed source and binaries distributed with PostgreSQL
Group: Databases
Requires: %name = %version-%release

%description contrib
The postgresql-contrib package includes the contrib tree distributed with
the PostgreSQL tarball.  Selected contrib modules are prebuilt.

%package server
Summary: The programs needed to create and run a PostgreSQL server
Group: Databases
PreReq: shadow-utils, syslogd-daemon, grep, %__subst, chrooted
PreReq: postgresql-common > 1.0-alt3
Requires: %name = %version-%release
Requires: glibc-locales
Provides: %prog_name-server = %version-%release
Conflicts: %prog_name-server < %version-%release
Conflicts: %prog_name-server > %version-%release

%description server
The postgresql-server package includes the programs needed to create
and run a PostgreSQL server, which will in turn allow you to create
and maintain PostgreSQL databases.  PostgreSQL is an advanced
Object-Relational database management system (DBMS) that supports
almost all SQL constructs (including transactions, subselects and
user-defined types and functions). You should install
postgresql-server if you want to create and maintain your own
PostgreSQL databases and/or your own PostgreSQL server. You also need
to install the postgresql package.

%if_with devel
%package devel
Summary: PostgreSQL development header files
Group: Development/Databases
Requires: %libpq_name-devel = %version-%release, %libecpg_name-devel = %version-%release
Provides: postgresql-devel = %version-%release

%description devel
The postgresql-devel package contains the header files needed to compile applications
which will directly interact with a PostgreSQL database management server.
You need to install this package if you want to develop applications which will interact
with a PostgreSQL server.
%endif

%package tcl
Summary: The PL/Tcl procedural language for PostgreSQL
Group: Databases
Requires: %name = %version-%release tcl >= 8.4.0-alt1
Provides: postgresql-tcl

%description tcl
PostgreSQL is an advanced Object-Relational database management
system.  The postgresql-tcl package contains the PL/Tcl procedural language
for the backend.

%package perl
Summary: The PL/Perl procedural language for PostgreSQL
Group: Databases
Requires: %name = %version-%release
AutoReqProv: yes, perl

%description perl
PostgreSQL is an advanced Object-Relational database management
system.  The postgresql-perl package contains the PL/Perl procedural
language for the backend.

%package python
Summary: Development module for Python code to access a PostgreSQL DB
Group: Databases
Requires: %name = %version-%release

%description python
PostgreSQL is an advanced Object-Relational database management
system.  The postgresql-python package includes a module for
developers to use when writing Python code for accessing a PostgreSQL
database.

%prep
%setup

%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%patch100 -p1

%build
autoreconf-2.5 -fisv
%configure --includedir=%_includedir/%PGSQL \
--sysconfdir=%_sysconfdir/%PGSQL \
    --datadir=%_datadir/%PGSQL \
    --disable-rpath \
    --enable-nls \
    --enable-thread-safety \
    --with-docdir=%docdir \
    --with-includes=%_includedir/krb5 \
    --with-pam \
    --with-openssl \
    --with-perl \
    --with-gssapi \
    --with-krb5 \
    --with-ldap \
    --with-tcl --with-tclconfig=%_libdir \
    --with-readline \
    --with-python \
    --with-libxml \
    --with-libxslt \
    --with-gnu-ld

%make_build pkglibdir=%_libdir/%PGSQL

pushd contrib
%make_build all libdir=%_libdir/%PGSQL/contrib
popd

%install
%make_build install DESTDIR=%buildroot pkglibdir=%_libdir/%PGSQL
ln -s /usr/include/pgsql %buildroot%_libdir/%PGSQL/pgxs/src/include


##### ALT-stuff
pushd altlinux

# the postgresql-dump manpage.....
install -m 644 %prog_name-dump.1           %buildroot%_man1dir/
install -m 755 upgrade.pl                  %buildroot%_datadir/%PGSQL/upgrade.pl

# The initscripts....
install -p -m755 -D %prog_name.init.in        %buildroot%_initdir/%prog_name
install -p -m750 -D %prog_name.chroot.lib.in  %buildroot%_sysconfdir/chroot.d/%prog_name.lib
install -p -m750 -D %prog_name.chroot.conf.in %buildroot%_sysconfdir/chroot.d/%prog_name.conf
install -p -m750 -D %prog_name.chroot.all     %buildroot%_sysconfdir/chroot.d/%prog_name.all
install -p -m750 -D %prog_name.chroot.bin.in  %buildroot%_sysconfdir/chroot.d/%prog_name.bin

# README.ALT
install -p -m 644 -D %name.README.ALT-ru_RU.UTF-8 %buildroot%docdir/README.ALT-ru_RU.UTF-8

popd
##### ALT-stuff

%__subst -p 's|@CHROOTDIR@|%ROOT|g' %buildroot%_initdir/%prog_name
pushd %buildroot%_sysconfdir/chroot.d
for f in %prog_name.*; do
 if [ -f "$f" ]; then
   %__subst -p 's|@CHROOTDIR@|%ROOT|g; s|@LIB@|%_lib|g' $f
 fi
done
popd

# PGDATA needs removal of group and world permissions due to pg_pwd hole.
install -d -m700 %buildroot%_localstatedir/%PGSQL/data

# backups of data go here...
install -d -m700 %buildroot%_localstatedir/%PGSQL/backups

############################################
# Upgrade scripts.
cp -R -p usr %buildroot
############################################

# Fix a dangling symlink
mkdir -p %buildroot%_includedir/%PGSQL/port
cp src/include/port/linux.h %buildroot%_includedir/%PGSQL/port/
ln -s port/linux.h %buildroot%_includedir/%PGSQL/os.h

# Chrooted environment
mkdir -p %buildroot%ROOT/{bin,dev,%_lib,tmp,%_sysconfdir/%PGSQL,%_localstatedir,%_libdir/%PGSQL,%_libdir/locale}

mksock %buildroot%ROOT/dev/log
mkdir -p -m700 %buildroot%_sysconfdir/syslog.d
ln -s %ROOT/dev/log %buildroot%_sysconfdir/syslog.d/%prog_name

mv %buildroot%_localstatedir/%PGSQL %buildroot%ROOT/%_localstatedir/%PGSQL
#ln -s %ROOT%_localstatedir/%PGSQL %buildroot%_localstatedir/%PGSQL
ln -s $(relative %ROOT%_localstatedir/%PGSQL %_localstatedir/) %buildroot%_localstatedir/%PGSQL

pushd contrib
%make_build install DESTDIR=%buildroot pkglibdir=%_libdir/%PGSQL
popd

cp -a COPYRIGHT README HISTORY altlinux/{upgrade_tips_7.3,README.rpm-dist} \
    doc/{FAQ,KNOWN_BUGS,MISSING_FEATURES,TODO,FAQ_russian,bug.template} \
    src/tutorial %buildroot%docdir/

bzip2 %buildroot%docdir/FAQ*

%find_lang libpq-%libpq_major
%find_lang pg_dump
%find_lang postgres
%find_lang psql
%find_lang pg_resetxlog
%find_lang pg_controldata
%find_lang pgscripts
%find_lang initdb
%find_lang pg_config
%find_lang pg_ctl

cat psql.lang pg_dump.lang pgscripts.lang> main.lang
cat postgres.lang pg_resetxlog.lang pg_controldata.lang initdb.lang pg_ctl.lang> server.lang
cat pg_config.lang> devel.lang

# buildreq substitution rules.
mkdir -p %buildroot%_sysconfdir/buildreqs/packages/substitute.d
echo "%prog_name-devel" > "%buildroot%_sysconfdir/buildreqs/packages/substitute.d/%name-devel"
echo "libpq-devel" > "%buildroot%_sysconfdir/buildreqs/packages/substitute.d/%libpq_name-devel"
echo "libpq-devel-static" > "%buildroot%_sysconfdir/buildreqs/packages/substitute.d/%libpq_name-devel-static"
echo "libecpg-devel" > "%buildroot%_sysconfdir/buildreqs/packages/substitute.d/%libecpg_name-devel"
echo "libecpg-devel-static" > "%buildroot%_sysconfdir/buildreqs/packages/substitute.d/%libecpg_name-devel-static"
chmod 644 %buildroot%_sysconfdir/buildreqs/packages/substitute.d/*


%pre
# Need to make backups of some executables if an upgrade
# They will be needed to do a dump of the old version's database.
# All output redirected to /dev/null.
exec &>/dev/null
if [ $1 -gt 1 -a -d %_libdir/%PGSQL ]
then
    if [ ! -d %_libdir/%PGSQL/backup ]; then
        mkdir -p %_libdir/%PGSQL/backup
    fi
    cd %_bindir
    cp -fp pg_dump pg_dumpall psql %_libdir/%PGSQL/backup || :
fi

%pre server
exec &>/dev/null

if [ $1 -gt 1 ]
then
   if [ ! -d %_libdir/%PGSQL/backup ]; then
       mkdir -p %_libdir/%PGSQL/backup
   fi
   cd %_bindir
   cp -fp postmaster postgres %_libdir/%PGSQL/backup
fi

%pre -n %libpq_name
exec &>/dev/null
if [ $1 -gt 1 -a -d %_libdir/%PGSQL ]
then
    if [ ! -d %_libdir/%PGSQL/backup ]; then
        mkdir -p %_libdir/%PGSQL/backup
    fi
    cd %_libdir > /dev/null
    cp -fp libpq.* %_libdir/%PGSQL/backup
fi

%post server
echo PGLIB=%_datadir/%PGSQL >> ~postgres/.bash_profile
echo PGDATA=%_localstatedir/%PGSQL/data >> ~postgres/.bash_profile
echo export PGLIB PGDATA >> ~postgres/.bash_profile
chown postgres:postgres ~postgres/.bash_profile

SYSLOGD_SCRIPT=/etc/init.d/syslogd
SYSLOGD_CONFIG=/etc/sysconfig/syslogd
if grep -qs '^SYSLOGD_OPTIONS=.*-a %ROOT/dev/log' "$SYSLOGD_CONFIG"; then
    %__subst 's|^\(SYSLOGD_OPTIONS=.*\) \?-a %ROOT/dev/log|\1|' "$SYSLOGD_CONFIG"
    if [ -x "$SYSLOGD_SCRIPT" ]; then
        "$SYSLOGD_SCRIPT" condreload ||:
    fi
fi

%_sysconfdir/chroot.d/%prog_name.all force

%post_service %prog_name

%preun server
%preun_service %prog_name

%files -f main.lang
%_bindir/clusterdb
%_bindir/createdb
%_bindir/createlang
%_bindir/createuser
%_bindir/dropdb
%_bindir/droplang
%_bindir/dropuser
%_bindir/pg_dump
%_bindir/pg_dumpall
%_bindir/pg_restore
%_bindir/psql
%_bindir/reindexdb
%_bindir/vacuumdb
%_man1dir/clusterdb.1*
%_man1dir/createdb.1*
%_man1dir/createlang.1*
%_man1dir/createuser.1*
%_man1dir/dropdb.1*
%_man1dir/droplang.1*
%_man1dir/dropuser.1*
%_man1dir/pg_dump.1*
%_man1dir/pg_restore.1*
%_man1dir/pg_dumpall.1*
%_man1dir/psql.1*
%_man1dir/reindexdb.1*
%_man1dir/vacuumdb.1*
%_man7dir/*
%dir %docdir
%docdir/FAQ.bz2
%docdir/KNOWN_BUGS
%docdir/MISSING_FEATURES
%docdir/TODO
%docdir/FAQ_russian.bz2
%docdir/COPYRIGHT
%docdir/README
%docdir/HISTORY
%docdir/bug.template
%docdir/README.rpm-dist
%docdir/upgrade_tips_7.3

%files docs
%dir %docdir/html
%docdir/html/*.html
%docdir/html/*.css
%dir %docdir/tutorial
%docdir/tutorial/*

%files contrib
%dir %docdir/contrib
%docdir/contrib/*

%_datadir/pgsql/contrib/*sql

%_bindir/oid2name
%_bindir/pg_standby
%_bindir/pgbench
%_bindir/vacuumlo

%_libdir/pgsql/_int.so
%_libdir/pgsql/adminpack.so
%_libdir/pgsql/autoinc.so
%_libdir/pgsql/btree_gist.so
%_libdir/pgsql/chkpass.so
%_libdir/pgsql/cube.so
%_libdir/pgsql/dblink.so
%_libdir/pgsql/dict_int.so
%_libdir/pgsql/dict_xsyn.so
%_libdir/pgsql/earthdistance.so
%_libdir/pgsql/fuzzystrmatch.so
%_libdir/pgsql/hstore.so
%_libdir/pgsql/insert_username.so
%_libdir/pgsql/int_aggregate.so
%_libdir/pgsql/isn.so
%_libdir/pgsql/lo.so
%_libdir/pgsql/ltree.so
%_libdir/pgsql/moddatetime.so
%_libdir/pgsql/pageinspect.so
%_libdir/pgsql/pg_buffercache.so
%_libdir/pgsql/pg_freespacemap.so
%_libdir/pgsql/pg_trgm.so
%_libdir/pgsql/pgcrypto.so
%_libdir/pgsql/pgrowlocks.so
%_libdir/pgsql/pgstattuple.so
%_libdir/pgsql/pgxml.so
%_libdir/pgsql/refint.so
%_libdir/pgsql/seg.so
%_libdir/pgsql/sslinfo.so
%_libdir/pgsql/tablefunc.so
%_libdir/pgsql/test_parser.so
%_libdir/pgsql/timetravel.so
%_libdir/pgsql/tsearch2.so

%files -f libpq-%libpq_major.lang -n %libpq_name
%_libdir/libpq.so.%libpq_major
%_libdir/libpq.so.%libpq_major.*

%files -n %libecpg_name
%_libdir/libecpg.so.%libecpg_major
%_libdir/libecpg.so.%libecpg_major.*
%_libdir/libecpg_compat.so.*
%_libdir/libpgtypes.so.*

%files -f server.lang server
%config %_initdir/%prog_name
%config %_sysconfdir/chroot.d/%prog_name.*
%_bindir/initdb
%_bindir/ipcclean
%_bindir/pg_controldata
%_bindir/pg_ctl
%_bindir/pg_resetxlog
%_bindir/postgres
%_bindir/postmaster
%_bindir/%prog_name-dump

%_man1dir/initdb.1*
#%_man1dir/initlocation.1*
%_man1dir/ipcclean.1*
%_man1dir/pg_controldata.1
%_man1dir/pg_resetxlog.1*
%_man1dir/pg_ctl.1*
%_man1dir/postgres.1*
%_man1dir/postmaster.1*
%_man1dir/%prog_name-dump.1*
%dir %_libdir/%PGSQL
%_libdir/%PGSQL/plpgsql.so
%_libdir/%PGSQL/dict_snowball.so
%_libdir/%PGSQL/*_and_*.so
%dir %_datadir/%PGSQL
%dir %_datadir/%PGSQL/backup
%dir %_datadir/%PGSQL/timezone
%_datadir/%PGSQL/timezone/*
%dir %_datadir/%PGSQL/timezonesets
%_datadir/%PGSQL/timezonesets/*
%dir %_datadir/%PGSQL/tsearch_data
%_datadir/%PGSQL/tsearch_data/*
%_datadir/%PGSQL/postgres.bki
%_datadir/%PGSQL/postgres.description
%_datadir/%PGSQL/postgres.shdescription
%_datadir/%PGSQL/*.sample
%_datadir/%PGSQL/backup/pg_dumpall_new
%_datadir/%PGSQL/conversion_create.sql
%_datadir/%PGSQL/upgrade.pl
%_datadir/%PGSQL/information_schema.sql
%_datadir/%PGSQL/sql_features.txt
%_datadir/%PGSQL/system_views.sql
%_datadir/%PGSQL/snowball_create.sql
%_datadir/%PGSQL/unknown.pltcl
%_localstatedir/%PGSQL
%_sysconfdir/syslog.d/%prog_name
%docdir/README.ALT-ru_RU.UTF-8

%attr(751,root,root)  %dir %ROOT
%attr(751,root,root)  %dir %ROOT/bin
%attr(751,root,root)  %dir %ROOT/etc
%attr(751,root,root)  %dir %ROOT/etc/%PGSQL
%attr(751,root,root)  %dir %ROOT/dev
%attr(751,root,root)  %dir %ROOT/%_lib
%attr(1777,root,root) %dir %ROOT/tmp
%attr(751,root,root)  %dir %ROOT/usr
%attr(751,root,root)  %dir %ROOT/var
%attr(751,root,root)  %dir %ROOT%_libdir
%attr(751,root,root)  %dir %ROOT%_libdir/%PGSQL
%attr(751,root,root)  %dir %ROOT%_libdir/locale
%attr(751,root,root)  %dir %ROOT%_localstatedir
%attr(700,postgres,postgres)  %dir %ROOT%_localstatedir/%PGSQL
%attr(700,postgres,postgres)  %dir %ROOT%_localstatedir/%PGSQL/backups
%attr(700,postgres,postgres)  %dir %ROOT%_localstatedir/%PGSQL/data
%attr(666,root,root) %ghost %ROOT/dev/log

%if_with devel
%files -f devel.lang devel
%_includedir/%PGSQL
%_bindir/pg_config
%_man1dir/pg_config.*
%dir %_libdir/%PGSQL/pgxs/
%_libdir/%PGSQL/pgxs/*
%_sysconfdir/buildreqs/packages/substitute.d/%name-devel

%files -n %libpq_name-devel
%_libdir/libpq*.so
%_sysconfdir/buildreqs/packages/substitute.d/%libpq_name-devel

%files -n %libecpg_name-devel
%_bindir/ecpg
%_libdir/libecpg*.so
%_libdir/libpgtypes.so
%_man1dir/ecpg.*
%_sysconfdir/buildreqs/packages/substitute.d/%libecpg_name-devel

%files -n %libpq_name-devel-static
%_libdir/libpq*.a
%_sysconfdir/buildreqs/packages/substitute.d/%libpq_name-devel-static

%files -n %libecpg_name-devel-static
%_libdir/libecpg*.a
%_libdir/libpgtypes.a
%_libdir/libpgport.a
%_sysconfdir/buildreqs/packages/substitute.d/%libecpg_name-devel-static
%endif

%files tcl
%_bindir/pltcl_delmod
%_bindir/pltcl_listmod
%_bindir/pltcl_loadmod
%_libdir/%PGSQL/pltcl.so

%files perl
%_libdir/%PGSQL/plperl.so

%files python
%dir %docdir
%_libdir/%PGSQL/plpython.so

%changelog
* Fri Feb 08 2013 Alexei Takaseev <taf@altlinux.org> 8.3.23-alt0.M51.1
- 8.3.23

* Tue Jan 08 2013 Alexei Takaseev <taf@altlinux.org> 8.3.22-alt0.M51.2
- implicit conflicts to 8.4, 9.0 and 9.1
- Fix unneeded req
- Removed unnecessary require to be able to older versions of the
  utilities on the new libraries.Removed unnecessary dependency to
  be able to older versions of the utilities on the new libraries.

* Fri Dec 28 2012 Alexei Takaseev <taf@altlinux.org> 8.3.22-alt0.M51.1
- 8.3.22
- update alt-chroot.patch
- update alt-fix-buffer_overflow.patch

* Tue Mar 23 2010 Konstantin Pavlov <thresh@altlinux.org> 8.3.10-alt1
- 8.3.10

* Thu Mar 04 2010 Konstantin Pavlov <thresh@altlinux.org> 8.3.8-alt2
- Rebuild without devel.

* Mon Nov 23 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 8.3.8-alt1.1
- Rebuilt with python 2.6

* Sat Nov 07 2009 Michael Bochkaryov <misha@altlinux.ru> 8.3.8-alt1
- 8.3.8

* Sat Sep 05 2009 Michael Bochkaryov <misha@altlinux.ru> 8.3.7-alt4
- Apply buffer overflow patch by Ivan Fedorov

* Sat Aug 01 2009 Michael Bochkaryov <misha@altlinux.ru> 8.3.7-alt3
- fix buffer overflow (import from postgresql-8.3eter)

* Thu Mar 19 2009 Ivan Fedorov <ns@altlinux.org> 8.3.7-alt2
- fix building

* Thu Mar 19 2009 Ivan Fedorov <ns@altlinux.org> 8.3.7-alt1
- 8.3.7

* Thu Nov 06 2008 Ivan Fedorov <ns@altlinux.org> 8.3.5-alt1
- 8.3.5
  + Fix GiST index corruption

* Fri Oct 17 2008 Ivan Fedorov <ns@altlinux.org> 8.3.4-alt2
- fixed #10861, #14576.
- spec cleanup.
- rework contrib subsytem.
- rename libpq subpackages to real names.

* Mon Oct 13 2008 Pavlov Konstantin <thresh@altlinux.ru> 8.3.4-alt1
- updated to 8.3.4 version (fixes #17534).
- added support to use non-chrooted postgresql server, see control postgresql.
- fixed #16683.

* Sat Aug 09 2008 ALT QA Team Robot <qa-robot@altlinux.org> 8.3.3-alt1.1
- Automated rebuild due to libssl.so.6 -> libssl.so.7 soname change.

* Sun Jun 15 2008 Michael Bochkaryov <misha@altlinux.ru> 8.3.3-alt1
- updated to 8.3.3 version

* Tue Jun 03 2008 Michael Bochkaryov <misha@altlinux.ru> 8.3.1-alt5
- Built with GSSAPI, thanks to Dmitry M. Maslennikov (fix #15877)
- Built with LDAP support

* Tue May 13 2008 Michael Bochkaryov <misha@altlinux.ru> 8.3.1-alt4
- fixed tsearch_data directory packaging bug

* Thu Apr 10 2008 Michael Bochkaryov <misha@altlinux.ru> 8.3.1-alt3
- LSB compatible init header added
- init script fix (#15269)
- full text search data added
- explicit build with libxml2 and libxslt support

* Sat Mar 29 2008 Michael Bochkaryov <misha@altlinux.ru> 8.3.1-alt2
- fix libpq name to avoid unmets

* Fri Mar 28 2008 Michael Bochkaryov <misha@altlinux.ru> 8.3.1-alt1
- rebuild for ALT Linux Sisyphus

* Thu Mar 27 2008 Serge A. Ribalchenko <fisher@netstyle.com.ua> 8.3.1-nets1
- chroot patch from postgresql-8.2.4 merged;
- libpgport.a exclude discarded
1