-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdnsdist.spec
115 lines (92 loc) · 2.73 KB
/
dnsdist.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
%global _hardened_build 1
%global prever alpha2
%ifnarch %{power64} || 0%{?fedora} || 0%{?rhel} > 7
%global uglify 1
%endif
Name: dnsdist
Version: 1.0.0
Release: 0.7.%{?prever}%{?dist}
Summary: Highly DNS-, DoS- and abuse-aware loadbalancer
Group: System Environment/Daemons
License: GPLv2
URL: http://dnsdist.org
Source0: http://downloads.powerdns.com/releases/%{name}-%{version}-%{?prever}.tar.bz2
BuildRequires: boost-devel
BuildRequires: libedit-devel
BuildRequires: libsodium-devel
BuildRequires: lua-devel
%ifnarch %{power64}
BuildRequires: luajit-devel
%endif
BuildRequires: readline-devel
BuildRequires: systemd-units
%if 0%{?uglify}
BuildRequires: uglify-js
%endif
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description
dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life
is to route traffic to the best server, delivering top performance to
legitimate users while shunting or blocking abusive traffic.
%prep
%setup -q -n %{name}-%{version}-%{?prever}
%build
%configure \
--sysconfdir=%{_sysconfdir}/%{name} \
--disable-static \
--disable-dependency-tracking \
--disable-silent-rules \
--enable-dnscrypt \
--enable-libsodium \
--with-lua \
%ifnarch %{power64}
--with-luajit \
%endif
--enable-unit-tests
rm html/js/*
%if 0%{?uglify}
make min_js
%else
cp src_js/*.js html/js
%endif
make %{?_smp_mflags}
mv dnsdistconf.lua dnsdist.conf.sample
%install
make install DESTDIR=%{buildroot}
# install systemd unit file
%{__install} -D -p -m 644 contrib/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
%{__install} -d %{buildroot}%{_sysconfdir}/%{name}/
%check
make %{?_smp_mflags} check
rm %{buildroot}%{_bindir}/testrunner
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%files
%doc dnsdist.conf.sample
%doc README.md
%license COPYING
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_unitdir}/%{name}.service
%dir %{_sysconfdir}/%{name}/
%changelog
* Mon Feb 08 2016 Sander Hoentjen <[email protected]> - 1.0.0-0.7.alpha2
- Only copy .js files when minify-js is not available
* Mon Feb 08 2016 Sander Hoentjen <[email protected]> - 1.0.0-0.6.alpha2
- PPC on EPEL does not have uglify-js
* Mon Feb 08 2016 Sander Hoentjen <[email protected]> - 1.0.0-0.5.alpha2
- Don't build against luijit on ppc, it is not available there
* Mon Feb 08 2016 Sander Hoentjen <[email protected]> - 1.0.0-0.4.alpha2
- Add sample config file
* Sat Feb 06 2016 Sander Hoentjen <[email protected]> - 1.0.0-0.3.alpha2
- Update to new upstream
* Sun Jan 10 2016 Sander Hoentjen <[email protected]> - 1.0.0-0.2.alpha1
- SPEC fixes for review
* Sun Jan 10 2016 Sander Hoentjen <[email protected]> - 1.0.0-0.1.alpha1
- Initial package