]> 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 %include        /usr/lib/rpm/macros.perl
9 Summary:        Perlbal - Reverse-proxy load balancer and webserver
10 Summary(pl.UTF-8):      Perlbal - odwrotne proxy z równoważeniem obciążenia oraz serwer WWW
11 Name:           Perlbal
12 Version:        1.79
13 Release:        1
14 # same as perl
15 License:        GPL v1+ or Artistic
16 Group:          Development/Languages/Perl
17 Source0:        http://www.cpan.org/modules/by-authors/id/D/DO/DORMANDO/%{name}-%{version}.tar.gz
18 # Source0-md5:  565ba843bd3b8b38287e20eceab62fe5
19 Source1:        perlbal.init
20 Source2:        perlbal.sysconfig
21 Patch0:         %{name}-no_use_lib.patch
22 Patch2:         perlbal-freeport.patch
23 URL:            http://www.danga.com/perlbal/
24 BuildRequires:  perl-devel >= 1:5.8.0
25 BuildRequires:  rpm-perlprov >= 4.1-13
26 BuildRequires:  rpmbuild(macros) >= 1.228
27 %if %{with autodeps} || %{with tests}
28 BuildRequires:  perl-BSD-Resource
29 BuildRequires:  perl-Danga-Socket >= 1.44
30 BuildRequires:  perl-IO-AIO
31 BuildRequires:  perl-Net-Netmask
32 BuildRequires:  perl-Sys-Syscall
33 BuildRequires:  perl-libwww
34 %endif
35 Requires(post,preun):   /sbin/chkconfig
36 Requires:       rc-scripts
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         _noautoreq      'perl(Perlbal.*)'
41
42 %description
43 Perlbal is a single-threaded event-based server supporting HTTP load
44 balancing, web serving, and a mix of the two.
45
46 One of the defining things about Perlbal is that almost everything can
47 be configured or reconfigured on the fly without needing to restart
48 the software. A basic configuration file containing a management port
49 enables you to easily perform operations on a running instance of
50 Perlbal.
51
52 %description -l pl.UTF-8
53 Perlbal to jednowątkowy, oparty na zdarzeniach serwer obsługujący
54 równoważenie obciążenia HTTP, świadczenie usług WWW oraz połączenie
55 obu.
56
57 Jedną z cech charakterystycznych dla Perlbala jest to, że prawie
58 wszystko można skonfigurować lub przekonfigurować w locie, bez
59 potrzeby restartu programu. Podstawowy plik konfiguracyjny zawierający
60 port zarządzający pozwala na łatwe wykonywanie operacji na działającej
61 instancji Perlbala.
62
63 %prep
64 %setup -q
65 %patch0 -p1
66 %patch2 -p1
67
68 %build
69 %{__perl} Makefile.PL \
70         INSTALLDIRS=vendor
71 %{__make}
72
73 %if %{with tests}
74 # randomize the first base port a little
75 export TEST_TCP_FREE_PORT=$(perl -e 'print (4096 + $$) % 65536')
76 %{__make} test
77 %endif
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
88 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Perlbal/.packlist
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
106 %dir %{_sysconfdir}/perlbal
107 %attr(640,root,root) %{_sysconfdir}/perlbal/*.conf
108 %attr(640,root,root) %{_sysconfdir}/perlbal/*.dat
109 %attr(754,root,root) /etc/rc.d/init.d/perlbal
110 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/perlbal
111 %attr(755,root,root) %{_bindir}/perlbal
112 %{perl_vendorlib}/*.pm
113 %{perl_vendorlib}/Perlbal
114 %{_mandir}/man?/*
This page took 0.107794 seconds and 3 git commands to generate.