]> git.pld-linux.org Git - packages/Perlbal.git/blame - Perlbal.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/Perlbal.git] / Perlbal.spec
CommitLineData
db4687e9
ER
1# TODO
2# - split perl-devel for Devel::Peek?
8c9f6f7a 3#
4# Conditional build:
5%bcond_without autodeps # don't BR packages needed only for resolving deps
71a464f9 6%bcond_without tests # perform "make test"
8c9f6f7a 7#
8c9f6f7a 8Summary: Perlbal - Reverse-proxy load balancer and webserver
b848b4d8 9Summary(pl.UTF-8): Perlbal - odwrotne proxy z równoważeniem obciążenia oraz serwer WWW
8c9f6f7a 10Name: Perlbal
4af55767 11Version: 1.79
521fb61f 12Release: 1
8c9f6f7a 13# same as perl
14License: GPL v1+ or Artistic
15Group: Development/Languages/Perl
71a464f9 16Source0: http://www.cpan.org/modules/by-authors/id/D/DO/DORMANDO/%{name}-%{version}.tar.gz
4af55767 17# Source0-md5: 565ba843bd3b8b38287e20eceab62fe5
8c9f6f7a 18Source1: perlbal.init
19Source2: perlbal.sysconfig
20Patch0: %{name}-no_use_lib.patch
8cae5748 21Patch2: perlbal-freeport.patch
8c9f6f7a 22URL: http://www.danga.com/perlbal/
8c9f6f7a 23BuildRequires: perl-devel >= 1:5.8.0
24BuildRequires: rpm-perlprov >= 4.1-13
b848b4d8 25BuildRequires: rpmbuild(macros) >= 1.228
8c9f6f7a 26%if %{with autodeps} || %{with tests}
27BuildRequires: perl-BSD-Resource
28BuildRequires: perl-Danga-Socket >= 1.44
4dddc3dc 29BuildRequires: perl-IO-AIO
30BuildRequires: perl-Net-Netmask
8c9f6f7a 31BuildRequires: perl-Sys-Syscall
32BuildRequires: perl-libwww
33%endif
b848b4d8
JB
34Requires(post,preun): /sbin/chkconfig
35Requires: rc-scripts
8c9f6f7a 36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
6dec619c 39%define _noautoreq 'perl(Perlbal.*)'
8c9f6f7a 40
41%description
42Perlbal is a single-threaded event-based server supporting HTTP load
43balancing, web serving, and a mix of the two.
44
45One of the defining things about Perlbal is that almost everything can
46be configured or reconfigured on the fly without needing to restart
6dec619c
ER
47the software. A basic configuration file containing a management port
48enables you to easily perform operations on a running instance of
49Perlbal.
8c9f6f7a 50
b848b4d8
JB
51%description -l pl.UTF-8
52Perlbal to jednowątkowy, oparty na zdarzeniach serwer obsługujący
53równoważenie obciążenia HTTP, świadczenie usług WWW oraz połączenie
54obu.
55
56Jedną z cech charakterystycznych dla Perlbala jest to, że prawie
57wszystko można skonfigurować lub przekonfigurować w locie, bez
58potrzeby restartu programu. Podstawowy plik konfiguracyjny zawierający
59port zarządzający pozwala na łatwe wykonywanie operacji na działającej
60instancji Perlbala.
8c9f6f7a 61
62%prep
63%setup -q
64%patch0 -p1
8cae5748 65%patch2 -p1
8c9f6f7a 66
67%build
68%{__perl} Makefile.PL \
69 INSTALLDIRS=vendor
70%{__make}
71
8cae5748
ER
72%if %{with tests}
73# randomize the first base port a little
e0ec2e4c 74export TEST_TCP_FREE_PORT=$(perl -e 'print (4096 + $$) % 65536')
8cae5748
ER
75%{__make} test
76%endif
8c9f6f7a 77
78%install
79rm -rf $RPM_BUILD_ROOT
80
81%{__make} pure_install \
82 DESTDIR=$RPM_BUILD_ROOT
83
84install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/perlbal
85install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/perlbal
86cp -r conf $RPM_BUILD_ROOT%{_sysconfdir}/perlbal
6dec619c 87rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Perlbal/.packlist
8c9f6f7a 88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%post
93/sbin/chkconfig --add perlbal
94%service perlbal restart
95
96%preun
97if [ "$1" = "0" ]; then
98 %service -q perlbal stop
99 /sbin/chkconfig --del perlbal
100fi
101
102%files
103%defattr(644,root,root,755)
104%doc CHANGES doc conf
5d0ba92f
ER
105%dir %{_sysconfdir}/perlbal
106%attr(640,root,root) %{_sysconfdir}/perlbal/*.conf
107%attr(640,root,root) %{_sysconfdir}/perlbal/*.dat
108%attr(754,root,root) /etc/rc.d/init.d/perlbal
109%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/perlbal
110%attr(755,root,root) %{_bindir}/perlbal
b848b4d8
JB
111%{perl_vendorlib}/*.pm
112%{perl_vendorlib}/Perlbal
8c9f6f7a 113%{_mandir}/man?/*
This page took 0.123082 seconds and 4 git commands to generate.