File FastCGI-scripts.spec of Package FastCGI-scripts
#
# spec file for package
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: FastCGI-scripts
Version: 1.0
Release: 1
License: GPL
Summary: FastCGI scripts for PHP and Perl
Url: https://build.opensuse.org/project/show?project=home%3Aemendonca
Group: Productivity/Networking/Web/Servers
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %fillup_prereq
%description
LSB init scripts for using FastCGI with both PHP and Perl, adapted for SUSE.
%prep
%setup -q
%build
%install
mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}
install -m 755 php-fastcgi ${RPM_BUILD_ROOT}%{_initrddir}/php-fastcgi
install -m 755 perl-fastcgi ${RPM_BUILD_ROOT}%{_initrddir}/perl-fastcgi
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
ln -s %{_initrddir}/php-fastcgi ${RPM_BUILD_ROOT}%{_sbindir}/rcphp-fastcgi
ln -s %{_initrddir}/perl-fastcgi ${RPM_BUILD_ROOT}%{_sbindir}/rcperl-fastcgi
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
install -m 755 fastcgi-wrapper.pl ${RPM_BUILD_ROOT}%{_bindir}/fastcgi-wrapper.pl
mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates
install -m 644 sysconfig.perl-fastcgi ${RPM_BUILD_ROOT}/var/adm/fillup-templates/sysconfig.perl-fastcgi
install -m 644 sysconfig.php-fastcgi ${RPM_BUILD_ROOT}/var/adm/fillup-templates/sysconfig.php-fastcgi
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%post
%fillup_and_insserv php-fastcgi
%restart_on_update php-fastcgi
%fillup_and_insserv perl-fastcgi
%restart_on_update perl-fastcgi
%preun
%stop_on_removal php-fastcgi
%stop_on_removal perl-fastcgi
%postun
%insserv_cleanup php-fastcgi
%restart_on_update php-fastcgi
%insserv_cleanup perl-fastcgi
%restart_on_update perl-fastcgi
%files
%defattr(-,root,root)
%{_initrddir}/php-fastcgi
%{_initrddir}/perl-fastcgi
%{_sbindir}/rcphp-fastcgi
%{_sbindir}/rcperl-fastcgi
%{_bindir}/fastcgi-wrapper.pl
/var/adm/fillup-templates/sysconfig.perl-fastcgi
/var/adm/fillup-templates/sysconfig.php-fastcgi
%changelog
* Sat Feb 25 2012 Erico Mendonca <emendonca@suse.com>
+ Initial build.