]>
Commit | Line | Data |
---|---|---|
65fff0cc | 1 | |
2 | # Conditional build: | |
3 | %bcond_without mysql # don't build support for MySQL | |
4 | %bcond_without postgresql # don't build support for PostgreSQL | |
5 | ||
6 | Summary: Snort Log Backend | |
7 | Name: barnyard2 | |
8 | Version: 1.10beta2 | |
9 | Release: 1 | |
10 | License: GPL | |
11 | Group: Networking | |
12 | Source0: https://github.com/firnsy/barnyard2/tarball/v2-1.10-beta2 | |
13 | # Source0-md5: af417a3491c5a4e5605c8fbd529f2255 | |
14 | Source2: %{name}.config | |
15 | Source3: %{name} | |
16 | URL: https://github.com/firnsy/barnyard2 | |
17 | %{?with_mysql:BuildRequires: mysql-devel} | |
18 | %{?with_postgresql:BuildRequires: postgresql-devel} | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %description | |
112f1876 | 22 | Barnyard has 3 modes of operation: One-shot, continual, continual w/ |
23 | checkpoint. In one-shot mode, barnyard will process the specified file | |
24 | and exit. In continual mode, barnyard will start with the specified | |
25 | file and continue to process new data (and new spool files) as it | |
26 | appears. Continual mode w/ checkpointing will also use a checkpoint | |
27 | file (or waldo file in the snort world) to track where it is. In the | |
28 | event the barnyard process ends while a waldo file is in use, barnyard | |
29 | will resume processing at the last entry as listed in the waldo file. | |
65fff0cc | 30 | %{?with_mysql:barnyard2 binary compiled with mysql support.} |
31 | %{?with_postgresql:barnyard2 binary compiled with postgresql support.} | |
32 | ||
33 | %prep | |
112f1876 | 34 | %setup -q -n firnsy-%{name}-5832a85 |
65fff0cc | 35 | |
36 | ||
37 | %build | |
38 | ./autogen.sh | |
39 | %configure --sysconfdir=%{_sysconfdir}/snort \ | |
40 | %{?with_postgresql:--with-postgresql} \ | |
41 | %{?with_mysql:--with-mysql-libraries=/usr/%{_lib}} \ | |
42 | ||
43 | %{__make} | |
44 | ||
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | %{__make} install \ | |
49 | DESTDIR=$RPM_BUILD_ROOT | |
50 | ||
112f1876 | 51 | install -d -p $RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,rc.d/init.d,snort} |
52 | install -d -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/contrib | |
53 | install -d -p $RPM_BUILD_ROOT%{_mandir}/man8 | |
54 | install -d -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/doc | |
55 | install etc/barnyard2.conf $RPM_BUILD_ROOT%{_sysconfdir}/snort/ | |
56 | install $RPM_SOURCE_DIR/barnyard2.config $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/barnyard2 | |
57 | install $RPM_SOURCE_DIR/barnyard2 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/barnyard2 | |
58 | install doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/doc/ | |
65fff0cc | 59 | |
60 | %clean | |
61 | if [ -d $RPM_BUILD_ROOT ] && [ "$RPM_BUILD_ROOT" != "/" ] ; then | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | fi | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %doc LICENSE doc/ | |
68 | %attr(755,root,root) %{_bindir}/barnyard2 | |
69 | %attr(640,root,root) %config %{_sysconfdir}/snort/barnyard2.conf | |
112f1876 | 70 | %attr(754,root,root) %config /etc/rc.d/init.d/barnyard2 |
71 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/barnyard2 |