]> git.pld-linux.org Git - packages/Perlbal.git/commitdiff
- new auto/th/Perlbal-1_59-1
authorradek <radek@pld-linux.org>
Sun, 16 Sep 2007 17:14:29 +0000 (17:14 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    Perlbal-no_use_lib.patch -> 1.1
    Perlbal.spec -> 1.1
    perlbal.init -> 1.1
    perlbal.sysconfig -> 1.1

Perlbal-no_use_lib.patch [new file with mode: 0644]
Perlbal.spec [new file with mode: 0644]
perlbal.init [new file with mode: 0644]
perlbal.sysconfig [new file with mode: 0644]

diff --git a/Perlbal-no_use_lib.patch b/Perlbal-no_use_lib.patch
new file mode 100644 (file)
index 0000000..2bd799a
--- /dev/null
@@ -0,0 +1,11 @@
+--- Perlbal-1.59/perlbal~      2006-11-03 23:30:51.000000000 +0000
++++ Perlbal-1.59/perlbal       2007-09-16 18:00:38.637075003 +0100
+@@ -30,7 +30,7 @@
+ use strict;
+ use warnings;
+-use lib 'lib';
++#use lib 'lib';
+ use Perlbal;
+ my $opt_daemonize;
diff --git a/Perlbal.spec b/Perlbal.spec
new file mode 100644 (file)
index 0000000..b89a7e0
--- /dev/null
@@ -0,0 +1,93 @@
+#
+# Conditional build:
+%bcond_without autodeps        # don't BR packages needed only for resolving deps
+%bcond_without tests           # do not perform "make test"
+#
+%include       /usr/lib/rpm/macros.perl
+Summary:       Perlbal - Reverse-proxy load balancer and webserver
+#Summary(pl.UTF-8):    
+Name:          Perlbal
+Version:       1.59
+Release:       1
+# same as perl
+License:       GPL v1+ or Artistic
+Group:         Development/Languages/Perl
+Source0:       http://www.cpan.org/modules/by-authors/id/B/BR/BRADFITZ/Perlbal-%{version}.tar.gz
+# Source0-md5: 7d098abd4434b70f13638cdff3e2383a
+Source1:       perlbal.init
+Source2:       perlbal.sysconfig
+Patch0:                %{name}-no_use_lib.patch
+URL:           http://www.danga.com/perlbal/
+Requires(post,preun):  /sbin/chkconfig
+BuildRequires: rpmbuild(macros) >= 1.228
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+%if %{with autodeps} || %{with tests}
+BuildRequires: perl-BSD-Resource
+BuildRequires: perl-Danga-Socket >= 1.44
+BuildRequires: perl-Sys-Syscall
+BuildRequires: perl-libwww
+%endif
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define        _noautoreq      'perl(Perlbal.*)'
+
+%description
+Perlbal is a single-threaded event-based server supporting HTTP load
+balancing, web serving, and a mix of the two.
+
+One of the defining things about Perlbal is that almost everything can
+be configured or reconfigured on the fly without needing to restart
+the software. A basic configuration file containing a management
+port enables you to easily perform operations on a running instance
+of Perlbal.
+
+# %description -l pl.UTF-8
+# TODO
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__perl} Makefile.PL \
+       INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/perlbal
+install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/perlbal
+cp -r conf $RPM_BUILD_ROOT%{_sysconfdir}/perlbal
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add perlbal
+%service perlbal restart
+
+%preun
+if [ "$1" = "0" ]; then
+       %service -q perlbal stop
+       /sbin/chkconfig --del perlbal
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGES doc conf
+%{perl_vendorlib}/*.pm
+%{perl_vendorlib}/Perlbal/
+%attr(755,root,root) %{_bindir}/*
+%{_mandir}/man?/*
+%attr(754,root,root) /etc/rc.d/init.d/perlbal
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/perlbal
+%dir %{_sysconfdir}/perlbal
+%attr(740,root,root) %{_sysconfdir}/perlbal/*
diff --git a/perlbal.init b/perlbal.init
new file mode 100644 (file)
index 0000000..1e87c11
--- /dev/null
@@ -0,0 +1,95 @@
+#!/bin/sh
+#
+# perlbal      Perlbal - Reverse-proxy load balancer and webserver
+#
+# chkconfig:   345 86 13
+#
+# description: Perlbal - Reverse-proxy load balancer and webserver
+#
+# processname: perlbal
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+[ -f /etc/sysconfig/perlbal ] && . /etc/sysconfig/perlbal
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+               msg_network_down perlbal
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+start() {
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/perlbal ]; then
+               msg_starting perlbal
+               daemon perlbal $PERLBAL_OPTS
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/perlbal
+       else
+               msg_already_running perlbal
+       fi
+}
+
+stop() {
+       if [ -f /var/lock/subsys/perlbal ]; then
+               # Stop daemons.
+               msg_stopping perlbal
+               killproc perlbal
+               rm -f /var/lock/subsys/perlbal
+       else
+               msg_not_running perlbal
+       fi
+}
+
+reload() {
+       if [ -f /var/lock/subsys/perlbal ]; then
+               msg_reloading perlbal
+               killproc perlbal -HUP
+               RETVAL=$?
+       else
+               msg_not_running perlbal
+               RETVAL=7
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  reload)
+       reload
+       ;;
+# ONLY if program allows reloading without stopping
+# otherwise include force-reload with 'reload'
+  force-reload)
+       reload
+       ;;
+  status)
+       status perlbal
+       RETVAL=$?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/perlbal.sysconfig b/perlbal.sysconfig
new file mode 100644 (file)
index 0000000..a0fe20a
--- /dev/null
@@ -0,0 +1,7 @@
+# $Id$
+
+#PERLBAL_OPTS="--daemon --config=/etc/perlbal/perlbal.conf"
+PERLBAL_OPTS="--daemon --config=/etc/perlbal/echoservice.conf"
+
+# SERVICE_NICE_RUN_LEVEL=5
+
This page took 0.089141 seconds and 4 git commands to generate.