-
Notifications
You must be signed in to change notification settings - Fork 51
/
glbd.spec
66 lines (51 loc) · 1.9 KB
/
glbd.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Name: glbd
Version: 1.0.1
Release: 1%{?dist}
Summary: glbd and libglb: TCP proxy daemon and load balancing library in one bottle
License: GPLv2
URL: https://github.com/codership/glb
Source0: %{name}-%{version}.tar.gz
BuildRequires: autoconf, automake, libtool
BuildRequires: gcc, make
%description
glbd is a simple TCP connection balancer made with scalability and performance in mind.
It was inspired by pen, but unlike pen its functionality is limited only to balancing generic TCP connections.
%prep
%setup -q
%build
autoreconf -i -f
%configure
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
%make_install
%{__install} -d %{buildroot}/%{_sysconfdir}/sysconfig
%{__install} -d %{buildroot}/%{_initddir}
%{__install} -d %{buildroot}/%{_docdir}/%{name}-%{version}/examples
%{__install} -m 644 %{_builddir}/%{name}-%{version}/files/glbd.cfg %{buildroot}/%{_sysconfdir}/sysconfig/glbd
%{__install} -m 755 %{_builddir}/%{name}-%{version}/files/glbd.sh %{buildroot}/%{_initddir}/glbd
%{__install} -m 644 %{_builddir}/%{name}-%{version}/files/curl.sh %{buildroot}/%{_docdir}/%{name}-%{version}/examples
%{__install} -m 644 %{_builddir}/%{name}-%{version}/files/mysql.sh %{buildroot}/%{_docdir}/%{name}-%{version}/examples
%files
%doc README COPYING AUTHORS BUGS ChangeLog
%doc %{_docdir}/%{name}-%{version}/examples/curl.sh
%doc %{_docdir}/%{name}-%{version}/examples/mysql.sh
%{_sbindir}/glbd
%{_libdir}/libglb.*
%config(noreplace) %{_sysconfdir}/sysconfig/glbd
%attr(0755,root,root) %{_initddir}/glbd
%post
%if 0%{?rhel}
chkconfig --add %{name}
%endif
%preun
%if 0%{?rhel}
if [ "$1" = "0" ]; then
chkconfig --del %{name}
fi
%endif
%changelog
* Wed Oct 20 2021 Alexey Bychko <[email protected]> - 1.0.1-1
- Initial RPM release
* Tue Sep 26 2021 ALexey Yurchenko <[email protected]> - 1.0.1-1
- Remove gcc-c++ dependecy