]>
Commit | Line | Data |
---|---|---|
30276fc4 | 1 | Summary: haproxy - high-performance TCP/HTTP load balancer |
bb79c767 | 2 | Summary(pl.UTF-8): haproxy - wysoko wydajny load balancer TCP/HTTP |
30276fc4 | 3 | Name: haproxy |
d8b4b23f | 4 | Version: 1.4.25 |
9c29064f | 5 | Release: 1 |
259c0035 | 6 | License: GPL v2 |
30276fc4 | 7 | Group: Networking/Daemons |
9d82df9c | 8 | Source0: http://haproxy.1wt.eu/download/1.4/src/%{name}-%{version}.tar.gz |
d8b4b23f | 9 | # Source0-md5: 74b5ec1f0f9b4d148c8083bcfb512ccd |
a8f5a57d | 10 | Source1: %{name}.init |
1f3ce518 | 11 | Source2: %{name}.cfg |
259c0035 | 12 | URL: http://haproxy.1wt.eu/ |
30276fc4 | 13 | BuildRequires: pcre-devel |
4ea16131 | 14 | BuildRequires: rpmbuild(macros) >= 1.268 |
30276fc4 | 15 | Requires(post,preun): /sbin/chkconfig |
1f3ce518 ER |
16 | Requires(postun): /usr/sbin/groupdel |
17 | Requires(postun): /usr/sbin/userdel | |
18 | Requires(pre): /bin/id | |
19 | Requires(pre): /usr/bin/getgid | |
20 | Requires(pre): /usr/sbin/groupadd | |
21 | Requires(pre): /usr/sbin/useradd | |
4ea16131 | 22 | Requires: rc-scripts |
7b462bd6 | 23 | Requires: uname(release) >= 2.6 |
1f3ce518 ER |
24 | Provides: group(haproxy) |
25 | Provides: user(haproxy) | |
deb1617b | 26 | Conflicts: rpm < 4.4.2-45 |
30276fc4 | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
bec50f27 ER |
29 | %define _vimdatadir %{_datadir}/vim/vimfiles |
30 | ||
30276fc4 | 31 | %description |
32 | HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for | |
d2eb0ecd JB |
33 | high availability environments. Indeed, it can: |
34 | - route HTTP requests depending on statically assigned cookies; | |
30276fc4 | 35 | - spread the load among several servers while assuring server |
d2eb0ecd JB |
36 | persistence through the use of HTTP cookies; |
37 | - switch to backup servers in the event a main one fails; | |
38 | - accept connections to special ports dedicated to service monitoring; | |
39 | - stop accepting connections without breaking existing ones; | |
40 | - add/modify/delete HTTP headers both ways; | |
41 | - block requests matching a particular pattern. | |
30276fc4 | 42 | |
43 | It needs very little resource. Its event-driven architecture allows it | |
44 | to easily handle thousands of simultaneous connections on hundreds of | |
45 | instances without risking the system's stability. | |
46 | ||
e6ff3d12 JR |
47 | %description -l pl.UTF-8 |
48 | HA-Proxy to odwrotne proxy TCP/HTTP przeznaczone w szczególności dla | |
49 | środowisk o wysokiej dostępności. W rzeczywistości może: | |
50 | - przekazywać żądania HTTP w zależności od statycznie przypisanych | |
d2eb0ecd | 51 | ciasteczek; |
e6ff3d12 JR |
52 | - rozdzielać obciążenie między różne serwery zapewniając ciągłość |
53 | łączności z serwerem poprzez użycie ciasteczek HTTP; | |
54 | - przełączać na serwery zapasowe w przypadku, gdy główny zawiedzie; | |
55 | - przyjmować połączenia na specjalne porty przeznaczone do | |
56 | monitorowania usług; | |
57 | - zaprzestać przyjmowania połączeń bez zrywania istniejących; | |
58 | - dodawać/modyfikować/usuwać nagłówki HTTP w obie strony; | |
59 | - blokować żądania pasujące do określonego wzorca. | |
d2eb0ecd | 60 | |
e6ff3d12 JR |
61 | Wymaga bardzo niewiele zasobów. Jego sterowana zdarzeniami |
62 | architektura pozwala łatwo obsługiwać tysiące jednoczesnych połączeń | |
63 | do setek instancji bez ryzykowania stabilności systemu. | |
d2eb0ecd | 64 | |
d2088461 PG |
65 | %package -n vim-syntax-haproxy |
66 | Summary: Vim syntax: haproxy configuration files syntax | |
67 | Summary(pl.UTF-8): Opis składni dla Vima: podświetlanie składni dla plików konfiguracyjnych haproxy | |
68 | Group: Applications/Editors/Vim | |
69 | # for _vimdatadir existence | |
5773bfca | 70 | Requires: vim-rt >= 4:6.3.058-3 |
d2088461 PG |
71 | |
72 | %description -n vim-syntax-haproxy | |
73 | This plugin provides syntax highlighting for haproxy configuration | |
74 | files. | |
75 | ||
bec50f27 | 76 | %description -n vim-syntax-haproxy -l pl.UTF-8 |
d2088461 PG |
77 | Ta wtyczka dostarcza podświetlanie składni dla plików konfiguracyjnych |
78 | haproxy. | |
79 | ||
30276fc4 | 80 | %prep |
81 | %setup -q | |
82 | ||
1f3ce518 ER |
83 | cp -a examples/haproxy.vim . |
84 | ||
30276fc4 | 85 | %build |
b57d52a8 | 86 | %{__make} \ |
7b462bd6 PG |
87 | TARGET=linux26 \ |
88 | REGEX=pcre \ | |
d8649183 | 89 | CC="%{__cc}" \ |
b57d52a8 | 90 | CPU_OPTS="%{rpmcflags}" \ |
7b462bd6 PG |
91 | LDFLAGS="%{rpmldflags}" \ |
92 | DEBUG= | |
30276fc4 | 93 | |
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
d2088461 PG |
96 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/%{name},/etc/rc.d/init.d} \ |
97 | $RPM_BUILD_ROOT%{_vimdatadir}/syntax | |
30276fc4 | 98 | |
60a8ac69 | 99 | install haproxy $RPM_BUILD_ROOT%{_sbindir} |
a8f5a57d | 100 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
1f3ce518 ER |
101 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/haproxy.cfg |
102 | install haproxy.vim $RPM_BUILD_ROOT%{_vimdatadir}/syntax | |
30276fc4 | 103 | |
420085f1 | 104 | # Some small cleanups: |
d2088461 | 105 | rm -f doc/gpl.txt examples/haproxy.vim |
420085f1 | 106 | |
30276fc4 | 107 | %clean |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
1f3ce518 ER |
110 | %pre |
111 | %groupadd -g 185 %{name} | |
112 | %useradd -u 185 -d /usr/share/empty -g %{name} -c "haproxy user" %{name} | |
113 | ||
30276fc4 | 114 | %post |
115 | /sbin/chkconfig --add %{name} | |
4ea16131 | 116 | %service %{name} restart |
30276fc4 | 117 | |
118 | %preun | |
4ea16131 ER |
119 | if [ "$1" = "0" ]; then |
120 | %service %{name} stop | |
121 | /sbin/chkconfig --del %{name} | |
30276fc4 | 122 | fi |
30276fc4 | 123 | |
1f3ce518 ER |
124 | %postun |
125 | if [ "$1" = "0" ]; then | |
126 | %userremove %{name} | |
127 | %groupremove %{name} | |
128 | fi | |
129 | ||
30276fc4 | 130 | %files |
131 | %defattr(644,root,root,755) | |
420085f1 | 132 | %doc CHANGELOG ROADMAP TODO examples/* doc/* tests |
30276fc4 | 133 | %dir %{_sysconfdir}/%{name} |
1f3ce518 | 134 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/haproxy.cfg |
30276fc4 | 135 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
1f3ce518 | 136 | %attr(755,root,root) %{_sbindir}/haproxy |
d2088461 PG |
137 | |
138 | %files -n vim-syntax-haproxy | |
139 | %defattr(644,root,root,755) | |
1f3ce518 | 140 | %{_vimdatadir}/syntax/haproxy.vim |