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