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