]>
Commit | Line | Data |
---|---|---|
ac6fab7c | 1 | # |
65fff0cc | 2 | # Conditional build: |
ac6fab7c JB |
3 | %bcond_without mysql # MySQL support |
4 | %bcond_without pgsql # PostgreSQL support | |
65fff0cc | 5 | |
b29b5dd3 ER |
6 | %define subver beta2 |
7 | %define rel 1 | |
65fff0cc | 8 | Summary: Snort Log Backend |
9 | Name: barnyard2 | |
b29b5dd3 ER |
10 | Version: 1.10 |
11 | Release: 0.%{subver}.%{rel} | |
65fff0cc | 12 | License: GPL |
13 | Group: Networking | |
b29b5dd3 | 14 | Source0: https://github.com/firnsy/barnyard2/tarball/v2-%{version}-%{subver}/%{name}-%{version}.tar.gz |
65fff0cc | 15 | # Source0-md5: af417a3491c5a4e5605c8fbd529f2255 |
16 | Source2: %{name}.config | |
17 | Source3: %{name} | |
18 | URL: https://github.com/firnsy/barnyard2 | |
64ce76ab ER |
19 | BuildRequires: autoconf |
20 | BuildRequires: automake | |
21 | BuildRequires: libtool | |
ac6fab7c JB |
22 | %{?with_mysql:BuildRequires: mysql-devel} |
23 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
65fff0cc | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
112f1876 | 27 | Barnyard has 3 modes of operation: One-shot, continual, continual w/ |
28 | checkpoint. In one-shot mode, barnyard will process the specified file | |
29 | and exit. In continual mode, barnyard will start with the specified | |
30 | file and continue to process new data (and new spool files) as it | |
31 | appears. Continual mode w/ checkpointing will also use a checkpoint | |
32 | file (or waldo file in the snort world) to track where it is. In the | |
33 | event the barnyard process ends while a waldo file is in use, barnyard | |
34 | will resume processing at the last entry as listed in the waldo file. | |
b29b5dd3 | 35 | |
ac6fab7c JB |
36 | %{?with_mysql:barnyard2 binary compiled with MySQL support.} |
37 | %{?with_pgsql:barnyard2 binary compiled with PostgreSQL support.} | |
65fff0cc | 38 | |
39 | %prep | |
b29b5dd3 ER |
40 | %setup -qc |
41 | mv firnsy-%{name}-*/* . | |
65fff0cc | 42 | |
43 | %build | |
64ce76ab ER |
44 | %{__aclocal} -I m4 |
45 | %{__libtoolize} | |
46 | %{__autoconf} | |
47 | %{__autoheader} | |
48 | %{__automake} --force-missing | |
b29b5dd3 ER |
49 | %configure \ |
50 | --sysconfdir=%{_sysconfdir}/snort \ | |
ac6fab7c | 51 | %{?with_pgsql:--with-postgresql} \ |
b29b5dd3 | 52 | %{?with_mysql:--with-mysql-libraries=%{_libdir}} \ |
65fff0cc | 53 | |
54 | %{__make} | |
55 | ||
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | %{__make} install \ | |
60 | DESTDIR=$RPM_BUILD_ROOT | |
61 | ||
64ce76ab | 62 | install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/snort} |
b29b5dd3 ER |
63 | cp -p etc/barnyard2.conf $RPM_BUILD_ROOT%{_sysconfdir}/snort |
64 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/barnyard2 | |
65 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/barnyard2 | |
65fff0cc | 66 | |
67 | %clean | |
b29b5dd3 | 68 | rm -rf $RPM_BUILD_ROOT |
65fff0cc | 69 | |
70 | %files | |
71 | %defattr(644,root,root,755) | |
b29b5dd3 ER |
72 | %doc LICENSE doc |
73 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snort/barnyard2.conf | |
74 | %attr(754,root,root) /etc/rc.d/init.d/barnyard2 | |
112f1876 | 75 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/barnyard2 |
b29b5dd3 | 76 | %attr(755,root,root) %{_bindir}/barnyard2 |