Source2: pgsql-Database-HOWTO-html.tar.gz
# Source2-md5: 5b656ddf1db41965761f85204a14398e
Source3: postgresql.sysconfig
-Source4: postgresql.logrotate
Patch0: postgresql-conf.patch
Patch1: postgresql-absolute_dbpaths.patch
Patch2: postgresql-ecpg-includedir.patch
%description dirs -l pl.UTF-8
Wspólne pliki i katalogi dla PostgreSQL %{pgsqlversion}
-%package -n postgresql-devel
-Summary: PostgreSQL development header files and libraries
-Summary(de.UTF-8): PostgreSQL-Entwicklungs-Header-Dateien und Libraries
-Summary(es.UTF-8): Archivos de inclusión y bibliotecas PostgreSQL
-Summary(fr.UTF-8): En-têtes et bibliothèques de développement PostgreSQL
-Summary(pl.UTF-8): PostgreSQL - pliki nagłówkowe i biblioteki
-Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento com o PostgreSQL
-Summary(ru.UTF-8): PostgreSQL - хедеры и библиотеки разработчика
-Summary(tr.UTF-8): PostgreSQL başlık dosyaları ve kitaplıklar
-Summary(uk.UTF-8): PostgreSQL - хедери та бібліотеки програміста
-Group: Development/Libraries
-Requires: alternatives
-Requires: postgresql-libs >= %{version}-%{release}
-
-%description -n postgresql-devel
-This package contains header files and libraries required to compile
-applications that are talking directly to the PostgreSQL backend
-server.
-
-%description -n postgresql-devel -l pl.UTF-8
-Pakiet zawiera nagłówki oraz biblioteki wymagane do kompilacji
-aplikacji łączących się bezpośrednio z serwerem PostgreSQL.
-
%package backend-devel
Summary: PostgreSQL backend development header files
Summary(pl.UTF-8): PostgreSQL - pliki nagłówkowe dla backendu
Pakiet ten zawiera dokumentację oraz HOWTO m.in. dla programistów,
administratorów w formacie HTML.
-%package -n postgresql-libs
-Summary: PostgreSQL libraries
-Summary(es.UTF-8): Biblioteca compartida del PostgreSQL
-Summary(pl.UTF-8): Biblioteki dzielone programu PostgreSQL
-Summary(pt_BR.UTF-8): Biblioteca compartilhada do PostgreSQL
-Summary(zh_CN.UTF-8): PostgreSQL 客户所需要的共享库
-Group: Libraries
-Requires: postgresql-common >= %{version}-%{release}
-
-%description -n postgresql-libs
-PostgreSQL shared libraries.
-
-%description -n postgresql-libs -l pl.UTF-8
-Biblioteki dzielone programu PostgreSQL.
-
%package ecpg
Summary: Embedded SQL in C interface
Summary(pl.UTF-8): Interfejs wbudowanego SQL-a w język C
%description ecpg -l pl.UTF-8
Interfejs wbudowanego SQL-a w język C.
-%package -n postgresql-ecpg-libs
-Summary: PostgreSQL libraries
-Summary(es.UTF-8): Biblioteca compartida del PostgreSQL
-Summary(pl.UTF-8): Biblioteki dzielone programu PostgreSQL
-Summary(pt_BR.UTF-8): Biblioteca compartilhada do PostgreSQL
-Summary(zh_CN.UTF-8): PostgreSQL 客户所需要的共享库
-Group: Libraries
-
-%description -n postgresql-ecpg-libs
-PostgreSQL shared libraries.
-
-%description -n postgresql-ecpg-libs -l pl.UTF-8
-Biblioteki dzielone programu PostgreSQL.
-
-%package -n postgresql-ecpg-devel
-Summary: Embedded SQL in C interface files
-Summary(pl.UTF-8): Pliki programistyczne interfejsu wbudowanego SQL-a w język C
-Group: Development/Libraries
-Requires: postgresql-devel >= %{version}-%{release}
-Requires: postgresql-ecpg-devel >= %{version}-%{release}
-
-%description -n postgresql-ecpg-devel
-Embedded SQL in C interface files.
-
-%description -n postgresql-ecpg-devel -l pl.UTF-8
-Pliki programistyczne interfejsu wbudowanego SQL-a w język C.
-
-%package -n postgresql-ecpg-static
-Summary: PostgreSQL static libraries
-Summary(es.UTF-8): Bibliotecas estaticas PostgreSQL
-Summary(pl.UTF-8): Biblioteki statyczne programu PostgreSQL
-Summary(pt_BR.UTF-8): Bibliotecas estáticas PostgreSQL
-Summary(ru.UTF-8): Статические библиотеки для программирования с PostgreSQL
-Summary(uk.UTF-8): Статичні бібліотеки для програмування з PostgreSQL
-Group: Development/Libraries
-Requires: postgresql-devel >= %{version}-%{release}
-
-%description -n postgresql-ecpg-static
-PostgreSQL static libraries.
-
-%description -n postgresql-ecpg-static -l pl.UTF-8
-Biblioteki statyczne programu PostgreSQL.
-
-%package -n postgresql-static
-Summary: PostgreSQL static libraries
-Summary(es.UTF-8): Bibliotecas estaticas PostgreSQL
-Summary(pl.UTF-8): Biblioteki statyczne programu PostgreSQL
-Summary(pt_BR.UTF-8): Bibliotecas estáticas PostgreSQL
-Summary(ru.UTF-8): Статические библиотеки для программирования с PostgreSQL
-Summary(uk.UTF-8): Статичні бібліотеки для програмування з PostgreSQL
-Group: Development/Libraries
-Requires: postgresql-devel >= %{version}-%{release}
-
-%description -n postgresql-static
-PostgreSQL static libraries.
-
-%description -n postgresql-static -l pl.UTF-8
-Biblioteki statyczne programu PostgreSQL.
-
%package module-plperl
Summary: PL/perl - PostgreSQL procedural language
Summary(pl.UTF-8): PL/perl - język proceduralny bazy danych PostgreSQL
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{logrotate.d,rc.d/init.d,sysconfig}} \
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
$RPM_BUILD_ROOT/var/{lib/postgresql/%{pgsqlversion},log/{archive,}/postgresql,run/postgresql} \
$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
$RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
sed -e 's,@pgsqlbindir@,%{pgsqllibdir}/bin,g; s,@pgsqlversion@,%{pgsqlversion},g;' %{SOURCE1} >$RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql-%{pgsqlversion}
sed -e 's,@pgsqlversion@,%{pgsqlversion},g;' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/postgresql-%{pgsqlversion}
-cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/postgresql
install -d howto
tar zxf %{SOURCE2} -C howto
# find locales
for f in libpq5 pgscripts postgres psql initdb ecpg ecpglib6 \
plpgsql %{?with_perl:plperl} %{?with_python:plpython} \
- pg_amcheck pg_archivecleanup pg_basebackup pg_checksums pg_config pg_controldata pg_ctl pg_dump pg_resetwal pg_rewind pg_test_fsync pg_test_timing pg_upgrade pg_verifybackup pg_waldump; do
+ pg_amcheck pg_archivecleanup pg_basebackup pg_checksums pg_controldata pg_ctl pg_dump pg_resetwal pg_rewind pg_test_fsync pg_test_timing pg_upgrade pg_verifybackup pg_waldump; do
%find_lang $f-%{pgsqlversion}
done
# merge locales
cat $(for f in $@; do echo ${f}-%{pgsqlversion}.lang ; done)
}
merge_lang pgscripts postgres plpgsql \
- pg_amcheck pg_basebackup pg_checksums pg_config pg_controldata pg_resetwal pg_rewind pg_test_fsync pg_test_timing pg_upgrade pg_verifybackup pg_waldump > main.lang
+ pg_amcheck pg_basebackup pg_checksums pg_controldata pg_resetwal pg_rewind pg_test_fsync pg_test_timing pg_upgrade pg_verifybackup pg_waldump > main.lang
merge_lang psql initdb \
pg_archivecleanup pg_ctl pg_dump > clients.lang
cp -p src/pl/plperl/ppport.h $RPM_BUILD_ROOT%{_includedir}/postgresql/%{pgsqlversion}/server/
-%{__mv} $RPM_BUILD_ROOT{%{pgsqllibdir}/bin,%{_bindir}}/pg_config
-%{__mv} $RPM_BUILD_ROOT{%{pgsqldatadir}/man,%{_mandir}}/man1/pg_config.1
-
# package it...? nah, why bother.
%{__rm} -r $RPM_BUILD_ROOT%{pgsqldatadir}/doc/html
%{__rm} -r $RPM_BUILD_ROOT%{pgsqldatadir}/doc/extension/*.example
+# remove common files provided by PostgreSQL from master branch
+%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/{ecpg*,libpq*,pg_config*,postgres_ext.h,postgresql/internal}
+%{__rm} -r $RPM_BUILD_ROOT{%{_libdir}/{libecpg*,libpg*,libpq*,pkgconfig},%{pgsqllibdir}/bin/pg_config,%{pgsqldatadir}/man/man1/pg_config.1*}
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{ecpglib*,libpq*,pg_config*}
+
%clean
rm -rf $RPM_BUILD_ROOT
/sbin/chkconfig --del postgresql-%{pgsqlversion}
fi
-%pre -n postgresql-common
-%groupadd -g 88 -r postgres
-%useradd -M -o -r -u 88 -d /var/lib/postgresql -s /bin/sh -g postgres -c "PostgreSQL Server" postgres
-
%posttrans clients
update-alternatives \
--install %{_bindir}/clusterdb clusterdb %{pgsqllibdir}/bin/clusterdb %{pgsqlpriority} \
update-alternatives --remove vacuumdb %{pgsqllibdir}/bin/vacuumdb || :
fi
-%postun -n postgresql-devel
- update-alternatives --remove pg_config %{pgsqllibdir}/bin/pg_config || :
-
-%post -n postgresql-libs -p /sbin/ldconfig
-%postun -n postgresql-libs -p /sbin/ldconfig
-
-%post -n postgresql-ecpg-libs -p /sbin/ldconfig
-%postun -n postgresql-ecpg-libs -p /sbin/ldconfig
-
%files -f main.lang
%defattr(644,root,root,755)
%doc COPYRIGHT README HISTORY doc/{KNOWN_BUGS,MISSING_FEATURES,TODO}
%{pgsqldatadir}/man/man1/postgres.1*
%{pgsqldatadir}/man/man1/postmaster.1*
-%files -n postgresql-common
-%defattr(644,root,root,755)
-%dir %{_libdir}/postgresql
-%dir %{_datadir}/postgresql
-%attr(700,postgres,postgres) %dir /var/lib/postgresql
-%attr(750,postgres,postgres) %dir /var/log/postgresql
-%attr(750,postgres,postgres) %dir /var/log/archive/postgresql
-%attr(700,postgres,postgres) %dir /var/run/postgresql
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/postgresql
-
%files dirs
%defattr(644,root,root,755)
%dir %{pgsqllibdir}
%doc doc/src/sgml/html howto
%{_examplesdir}/%{name}-%{version}
-%files -n postgresql-libs -f libpq5-%{pgsqlversion}.lang
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libpq.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpq.so.5
-
%files ecpg -f ecpg-%{pgsqlversion}.lang
%defattr(644,root,root,755)
%attr(755,root,root) %{pgsqllibdir}/bin/ecpg
%{pgsqldatadir}/man/man1/ecpg.1*
-%files -n postgresql-ecpg-libs -f ecpglib6-%{pgsqlversion}.lang
-%attr(755,root,root) %{_libdir}/libecpg.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libecpg.so.6
-%attr(755,root,root) %{_libdir}/libecpg_compat.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libecpg_compat.so.3
-%attr(755,root,root) %{_libdir}/libpgtypes.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpgtypes.so.3
-
-%files -n postgresql-ecpg-devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libecpg.so
-%attr(755,root,root) %{_libdir}/libecpg_compat.so
-%attr(755,root,root) %{_libdir}/libpgtypes.so
-%{_includedir}/ecpg*
-%{_libdir}/pkgconfig/libecpg.pc
-%{_libdir}/pkgconfig/libecpg_compat.pc
-%{_libdir}/pkgconfig/libpgtypes.pc
-
-%files -n postgresql-ecpg-static
-%defattr(644,root,root,755)
-%{_libdir}/libecpg.a
-%{_libdir}/libecpg_compat.a
-%{_libdir}/libpgtypes.a
-
-%files -n postgresql-devel -f pg_config-%{pgsqlversion}.lang
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/pg_config
-%attr(755,root,root) %{_libdir}/libpq.so
-%dir %{_includedir}/postgresql
-%{_includedir}/libpq-events.h
-%{_includedir}/libpq-fe.h
-%{_includedir}/pg_config.h
-%{_includedir}/pg_config_ext.h
-%{_includedir}/pg_config_manual.h
-%{_includedir}/pg_config_os.h
-%{_includedir}/postgres_ext.h
-%dir %{_includedir}/postgresql/internal
-%{_includedir}/postgresql/internal/c.h
-%{_includedir}/postgresql/internal/fe-auth-sasl.h
-%{_includedir}/postgresql/internal/libpq-int.h
-%{_includedir}/postgresql/internal/port.h
-%{_includedir}/postgresql/internal/postgres_fe.h
-%{_includedir}/postgresql/internal/pqexpbuffer.h
-%{_includedir}/postgresql/internal/libpq
-%{_includedir}/libpq
-%{_libdir}/pkgconfig/libpq.pc
-%{_mandir}/man1/pg_config.1*
-
%files backend-devel
%defattr(644,root,root,755)
%dir %{_includedir}/postgresql/%{pgsqlversion}
%{moduledir}/pgxs/src
%{pgsqldatadir}/man/man3/SPI_*.3*
-%files -n postgresql-static
-%defattr(644,root,root,755)
-%{_libdir}/libpq.a
-%{_libdir}/libpgcommon.a
-%{_libdir}/libpgfeutils.a
-%{_libdir}/libpgport.a
-%{_libdir}/libpgcommon_shlib.a
-%{_libdir}/libpgport_shlib.a
-
%files clients -f clients.lang
%defattr(644,root,root,755)
%attr(755,root,root) %{pgsqllibdir}/bin/clusterdb