]>
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 | |
8 | #Summary(pl.UTF-8): | |
9 | Name: Perlbal | |
10 | Version: 1.59 | |
11 | Release: 1 | |
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 | |
20 | URL: http://www.danga.com/perlbal/ | |
21 | Requires(post,preun): /sbin/chkconfig | |
22 | BuildRequires: rpmbuild(macros) >= 1.228 | |
23 | BuildRequires: perl-devel >= 1:5.8.0 | |
24 | BuildRequires: rpm-perlprov >= 4.1-13 | |
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 | |
31 | BuildArch: noarch | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %define _noautoreq 'perl(Perlbal.*)' | |
35 | ||
36 | %description | |
37 | Perlbal is a single-threaded event-based server supporting HTTP load | |
38 | balancing, web serving, and a mix of the two. | |
39 | ||
40 | One of the defining things about Perlbal is that almost everything can | |
41 | be configured or reconfigured on the fly without needing to restart | |
42 | the software. A basic configuration file containing a management | |
43 | port enables you to easily perform operations on a running instance | |
44 | of Perlbal. | |
45 | ||
46 | # %description -l pl.UTF-8 | |
47 | # TODO | |
48 | ||
49 | %prep | |
50 | %setup -q | |
51 | %patch0 -p1 | |
52 | ||
53 | %build | |
54 | %{__perl} Makefile.PL \ | |
55 | INSTALLDIRS=vendor | |
56 | %{__make} | |
57 | ||
58 | %{?with_tests:%{__make} test} | |
59 | ||
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %{__make} pure_install \ | |
64 | DESTDIR=$RPM_BUILD_ROOT | |
65 | ||
66 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/perlbal | |
67 | install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/perlbal | |
68 | cp -r conf $RPM_BUILD_ROOT%{_sysconfdir}/perlbal | |
69 | ||
70 | %clean | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %post | |
74 | /sbin/chkconfig --add perlbal | |
75 | %service perlbal restart | |
76 | ||
77 | %preun | |
78 | if [ "$1" = "0" ]; then | |
79 | %service -q perlbal stop | |
80 | /sbin/chkconfig --del perlbal | |
81 | fi | |
82 | ||
83 | %files | |
84 | %defattr(644,root,root,755) | |
85 | %doc CHANGES doc conf | |
86 | %{perl_vendorlib}/*.pm | |
87 | %{perl_vendorlib}/Perlbal/ | |
88 | %attr(755,root,root) %{_bindir}/* | |
89 | %{_mandir}/man?/* | |
90 | %attr(754,root,root) /etc/rc.d/init.d/perlbal | |
91 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/perlbal | |
92 | %dir %{_sysconfdir}/perlbal | |
93 | %attr(740,root,root) %{_sysconfdir}/perlbal/* |