]> git.pld-linux.org Git - packages/haproxy.git/blame - haproxy.spec
up to 1.7.2 (2017-01-13)
[packages/haproxy.git] / haproxy.spec
CommitLineData
bfcde319
ER
1# TODO
2# - examples/seamless_reload.txt
03783eeb
ER
3#
4# Conditional build:
36a3acc8 5%bcond_without lua # LUA support
03783eeb
ER
6%bcond_without zlib # zlib support
7%bcond_without pcre # pcre support
8%bcond_without ssl # SSL support
9
30276fc4 10Summary: haproxy - high-performance TCP/HTTP load balancer
bb79c767 11Summary(pl.UTF-8): haproxy - wysoko wydajny load balancer TCP/HTTP
30276fc4 12Name: haproxy
99098730
ER
13Version: 1.7.2
14Release: 1
259c0035 15License: GPL v2
30276fc4 16Group: Networking/Daemons
f132aea2 17Source0: http://www.haproxy.org/download/1.7/src/%{name}-%{version}.tar.gz
99098730 18# Source0-md5: 7330b36f3764ebe409e9305803dc30e2
f5598710
ER
19Source1: https://github.com/makinacorpus/haproxy-1.5/raw/master/debian/halog.1
20# Source1-md5: df4631f3cbc59893a2cd5e4364c9e755
4ca49865
ER
21Source2: https://github.com/janeczku/haproxy-acme-validation-plugin/raw/master/acme-http01-webroot.lua
22# Source2-md5: b68e49e7f7a862d504a4ab335a7cee2a
f5598710 23Source3: %{name}.cfg
f7c2305f 24Source4: %{name}-ft.vim
4ca49865 25Source5: %{name}.init
8041b7cc 26URL: http://www.haproxy.org/
36a3acc8 27%{?with_lua:BuildRequires: lua53-devel}
03783eeb 28%{?with_ssl:BuildRequires: openssl-devel}
a3a75902 29%{?with_pcre:BuildRequires: pcre-devel}
4ea16131 30BuildRequires: rpmbuild(macros) >= 1.268
03783eeb 31%{?with_zlib:BuildRequires: zlib-devel}
30276fc4 32Requires(post,preun): /sbin/chkconfig
1f3ce518
ER
33Requires(postun): /usr/sbin/groupdel
34Requires(postun): /usr/sbin/userdel
35Requires(pre): /bin/id
36Requires(pre): /usr/bin/getgid
37Requires(pre): /usr/sbin/groupadd
38Requires(pre): /usr/sbin/useradd
4ea16131 39Requires: rc-scripts
7b462bd6 40Requires: uname(release) >= 2.6
f1cbcb64 41Suggests: vim-syntax-haproxy
1f3ce518
ER
42Provides: group(haproxy)
43Provides: user(haproxy)
deb1617b 44Conflicts: rpm < 4.4.2-45
30276fc4 45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
bec50f27
ER
47%define _vimdatadir %{_datadir}/vim/vimfiles
48
30276fc4 49%description
50HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for
d2eb0ecd
JB
51high availability environments. Indeed, it can:
52- route HTTP requests depending on statically assigned cookies;
30276fc4 53- spread the load among several servers while assuring server
d2eb0ecd
JB
54 persistence through the use of HTTP cookies;
55- switch to backup servers in the event a main one fails;
56- accept connections to special ports dedicated to service monitoring;
57- stop accepting connections without breaking existing ones;
58- add/modify/delete HTTP headers both ways;
59- block requests matching a particular pattern.
30276fc4 60
61It needs very little resource. Its event-driven architecture allows it
62to easily handle thousands of simultaneous connections on hundreds of
63instances without risking the system's stability.
64
e6ff3d12
JR
65%description -l pl.UTF-8
66HA-Proxy to odwrotne proxy TCP/HTTP przeznaczone w szczególności dla
67środowisk o wysokiej dostępności. W rzeczywistości może:
68- przekazywać żądania HTTP w zależności od statycznie przypisanych
d2eb0ecd 69 ciasteczek;
e6ff3d12
JR
70- rozdzielać obciążenie między różne serwery zapewniając ciągłość
71 łączności z serwerem poprzez użycie ciasteczek HTTP;
72- przełączać na serwery zapasowe w przypadku, gdy główny zawiedzie;
73- przyjmować połączenia na specjalne porty przeznaczone do
74 monitorowania usług;
75- zaprzestać przyjmowania połączeń bez zrywania istniejących;
76- dodawać/modyfikować/usuwać nagłówki HTTP w obie strony;
77- blokować żądania pasujące do określonego wzorca.
d2eb0ecd 78
e6ff3d12
JR
79Wymaga bardzo niewiele zasobów. Jego sterowana zdarzeniami
80architektura pozwala łatwo obsługiwać tysiące jednoczesnych połączeń
81do setek instancji bez ryzykowania stabilności systemu.
d2eb0ecd 82
d2088461
PG
83%package -n vim-syntax-haproxy
84Summary: Vim syntax: haproxy configuration files syntax
85Summary(pl.UTF-8): Opis składni dla Vima: podświetlanie składni dla plików konfiguracyjnych haproxy
86Group: Applications/Editors/Vim
5773bfca 87Requires: vim-rt >= 4:6.3.058-3
b004b6f4
ER
88%if "%{_rpmversion}" >= "5"
89BuildArch: noarch
90%endif
d2088461
PG
91
92%description -n vim-syntax-haproxy
93This plugin provides syntax highlighting for haproxy configuration
94files.
95
bec50f27 96%description -n vim-syntax-haproxy -l pl.UTF-8
d2088461
PG
97Ta wtyczka dostarcza podświetlanie składni dla plików konfiguracyjnych
98haproxy.
99
30276fc4 100%prep
101%setup -q
102
4ca49865 103cp -p %{SOURCE2} .
8fa7926d
ER
104mv examples/haproxy.vim .
105mv examples/errorfiles .
4ca49865 106mv doc/gpl.txt .
1f3ce518 107
30276fc4 108%build
03783eeb
ER
109regparm_opts=
110%ifarch %{ix86} %{x8664}
111regparm_opts="USE_REGPARM=1"
112%endif
113
114%{__make} $regparm_opts \
115 TARGET="linux2628" \
116 CPU="generic" \
36a3acc8 117 %{?with_lua:USE_LUA=1 LUA_LIB_NAME=lua5.3 LUA_INC=%{_includedir}/lua5.3} \
03783eeb
ER
118 %{?with_ssl:USE_OPENSSL=1} \
119 %{?with_pcre:USE_PCRE=1} \
120 %{?with_zlib:USE_ZLIB=1} \
d8649183 121 CC="%{__cc}" \
03783eeb
ER
122 ADDINC="%{rpmcflags}" \
123 ADDLIB="%{rpmldflags}"
30276fc4 124
a3a75902
ER
125%{__make} -C contrib/halog halog \
126 CC="%{__cc}" \
127 OPTIMIZE="%{optflags}"
128
129%{__make} -C contrib/iprange iprange \
130 CC="%{__cc}" \
131 OPTIMIZE="%{optflags}"
132
30276fc4 133%install
134rm -rf $RPM_BUILD_ROOT
4ca49865 135install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_datadir}/%{name}/lua,/etc/rc.d/init.d} \
cdd63d6d 136 $RPM_BUILD_ROOT%{_vimdatadir}/{syntax,ftdetect}
30276fc4 137
f7c2305f
ER
138%{__make} install-bin install-man \
139 TARGET="linux2628" \
140 PREFIX=%{_prefix} \
141 DESTDIR=$RPM_BUILD_ROOT \
142
a3a75902
ER
143install -p contrib/halog/halog $RPM_BUILD_ROOT%{_sbindir}/halog
144install -p contrib/iprange/iprange $RPM_BUILD_ROOT%{_sbindir}/iprange
4ca49865 145install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
f5598710
ER
146cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1
147cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/haproxy.cfg
8041b7cc 148cp -p haproxy.vim $RPM_BUILD_ROOT%{_vimdatadir}/syntax
cdd63d6d 149cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/haproxy.vim
8fa7926d 150cp -a errorfiles $RPM_BUILD_ROOT%{_datadir}/%{name}
4ca49865 151cp -p acme-http01-webroot.lua $RPM_BUILD_ROOT%{_datadir}/%{name}/lua
420085f1 152
30276fc4 153%clean
154rm -rf $RPM_BUILD_ROOT
155
1f3ce518
ER
156%pre
157%groupadd -g 185 %{name}
158%useradd -u 185 -d /usr/share/empty -g %{name} -c "haproxy user" %{name}
159
30276fc4 160%post
161/sbin/chkconfig --add %{name}
4ea16131 162%service %{name} restart
30276fc4 163
164%preun
4ea16131
ER
165if [ "$1" = "0" ]; then
166 %service %{name} stop
167 /sbin/chkconfig --del %{name}
30276fc4 168fi
30276fc4 169
1f3ce518
ER
170%postun
171if [ "$1" = "0" ]; then
172 %userremove %{name}
173 %groupremove %{name}
174fi
175
30276fc4 176%files
177%defattr(644,root,root,755)
8fa7926d 178%doc CHANGELOG README README ROADMAP examples/* doc/* tests
30276fc4 179%dir %{_sysconfdir}/%{name}
1f3ce518 180%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/haproxy.cfg
30276fc4 181%attr(754,root,root) /etc/rc.d/init.d/%{name}
a3a75902 182%attr(755,root,root) %{_sbindir}/halog
f7c2305f
ER
183%attr(755,root,root) %{_sbindir}/haproxy
184%attr(755,root,root) %{_sbindir}/haproxy-systemd-wrapper
a3a75902 185%attr(755,root,root) %{_sbindir}/iprange
f5598710 186%{_mandir}/man1/halog.1*
f7c2305f 187%{_mandir}/man1/haproxy.1*
8fa7926d 188%{_datadir}/%{name}
d2088461
PG
189
190%files -n vim-syntax-haproxy
191%defattr(644,root,root,755)
1f3ce518 192%{_vimdatadir}/syntax/haproxy.vim
cdd63d6d 193%{_vimdatadir}/ftdetect/haproxy.vim
This page took 0.105656 seconds and 4 git commands to generate.