]> git.pld-linux.org Git - packages/Perlbal.git/blob - Perlbal.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/Perlbal.git] / Perlbal.spec
1 # TODO
2 # - split perl-devel for Devel::Peek?
3 #
4 # Conditional build:
5 %bcond_without  autodeps        # don't BR packages needed only for resolving deps
6 %bcond_without  tests           # perform "make test"
7 #
8 Summary:        Perlbal - Reverse-proxy load balancer and webserver
9 Summary(pl.UTF-8):      Perlbal - odwrotne proxy z równoważeniem obciążenia oraz serwer WWW
10 Name:           Perlbal
11 Version:        1.79
12 Release:        1
13 # same as perl
14 License:        GPL v1+ or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://www.cpan.org/modules/by-authors/id/D/DO/DORMANDO/%{name}-%{version}.tar.gz
17 # Source0-md5:  565ba843bd3b8b38287e20eceab62fe5
18 Source1:        perlbal.init
19 Source2:        perlbal.sysconfig
20 Patch0:         %{name}-no_use_lib.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-IO-AIO
30 BuildRequires:  perl-Net-Netmask
31 BuildRequires:  perl-Sys-Syscall
32 BuildRequires:  perl-libwww
33 %endif
34 Requires(post,preun):   /sbin/chkconfig
35 Requires:       rc-scripts
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _noautoreq      'perl(Perlbal.*)'
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
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.
50
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.
61
62 %prep
63 %setup -q
64 %patch0 -p1
65 %patch2 -p1
66
67 %build
68 %{__perl} Makefile.PL \
69         INSTALLDIRS=vendor
70 %{__make}
71
72 %if %{with tests}
73 # randomize the first base port a little
74 export TEST_TCP_FREE_PORT=$(perl -e 'print (4096 + $$) % 65536')
75 %{__make} test
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %{__make} pure_install \
82         DESTDIR=$RPM_BUILD_ROOT
83
84 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/perlbal
85 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/perlbal
86 cp -r conf $RPM_BUILD_ROOT%{_sysconfdir}/perlbal
87 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Perlbal/.packlist
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %post
93 /sbin/chkconfig --add perlbal
94 %service perlbal restart
95
96 %preun
97 if [ "$1" = "0" ]; then
98         %service -q perlbal stop
99         /sbin/chkconfig --del perlbal
100 fi
101
102 %files
103 %defattr(644,root,root,755)
104 %doc CHANGES doc conf
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
111 %{perl_vendorlib}/*.pm
112 %{perl_vendorlib}/Perlbal
113 %{_mandir}/man?/*
This page took 0.071334 seconds and 3 git commands to generate.