File postgresql-init.spec of Package postgresql-init
#
# spec file for package postgresql-init
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Url: http://www.postgresql.org/
Summary: Init script and other infrastructure for PostgreSQL
Name: postgresql-init
Version: 9.2
Release: 0.6.<RELEASE12>
License: PostgreSQL
Group: Productivity/Databases/Servers
Source0: postgresql-init
Source1: postgresql-sysconfig
Source2: postgresql-firewall
BuildRequires: SuSEfirewall2
Requires(post): %fillup_prereq
Requires(postun): %insserv_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%if 0%{?suse_version} > 1100
%define fwdir /etc/sysconfig/SuSEfirewall2.d/services
%define fwname postgresql
%else
%define fwdir /etc/sysconfig/scripts
%define fwname SuSEfirewall2-postgresql
%endif
%description
This package contains the init script, sysconfig template and firewall
service file for the PostgreSQL server. It was separated from the
postgresql*-server binary package to allow parallel installation of
several server versions.
Authors:
--------
Marc G. Fournier <scrappy@hub.org>
Tom Lane <tgl@sss.pgh.pa.us>
Vadim B. Mikheev <vadim4o@yahoo.com>
Bruce Momjian <pgman@candle.pha.pa.us>
Jan Wieck <JanWieck@Yahoo.com>
%prep
%build
%install
install -m755 -d %buildroot/etc/init.d
install -m755 %{S:0} %buildroot/etc/init.d/postgresql
install -m755 -d %buildroot/var/adm/fillup-templates
install -m644 %{S:1} %buildroot/var/adm/fillup-templates/sysconfig.postgresql
install -m755 -d %buildroot%fwdir
install -m644 %{S:2} %buildroot%fwdir/%fwname
install -m755 -d %buildroot/usr/sbin
ln -sf /etc/init.d/postgresql %buildroot/usr/sbin/rcpostgresql
%post
%fillup_only -n postgresql
test -x /bin/systemctl && /bin/systemctl daemon-reload || :
%preun
%stop_on_removal postgresql
%postun
%insserv_cleanup
test -x /bin/systemctl && /bin/systemctl daemon-reload || :
%files
%defattr(-,root,root,-)
%config /etc/init.d/postgresql
%config %fwdir/%fwname
/var/adm/fillup-templates/sysconfig.postgresql
/usr/sbin/rcpostgresql
%changelog