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