]> git.pld-linux.org Git - packages/barnyard2.git/blame - barnyard2.spec
- adapterized
[packages/barnyard2.git] / barnyard2.spec
CommitLineData
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
6Summary: Snort Log Backend
7Name: barnyard2
8Version: 1.10beta2
9Release: 1
10License: GPL
11Group: Networking
12Source0: https://github.com/firnsy/barnyard2/tarball/v2-1.10-beta2
13# Source0-md5: af417a3491c5a4e5605c8fbd529f2255
14Source2: %{name}.config
15Source3: %{name}
16URL: https://github.com/firnsy/barnyard2
17%{?with_mysql:BuildRequires: mysql-devel}
18%{?with_postgresql:BuildRequires: postgresql-devel}
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21%description
112f1876 22Barnyard has 3 modes of operation: One-shot, continual, continual w/
23checkpoint. In one-shot mode, barnyard will process the specified file
24and exit. In continual mode, barnyard will start with the specified
25file and continue to process new data (and new spool files) as it
26appears. Continual mode w/ checkpointing will also use a checkpoint
27file (or waldo file in the snort world) to track where it is. In the
28event the barnyard process ends while a waldo file is in use, barnyard
29will 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
47rm -rf $RPM_BUILD_ROOT
48%{__make} install \
49 DESTDIR=$RPM_BUILD_ROOT
50
112f1876 51install -d -p $RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,rc.d/init.d,snort}
52install -d -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/contrib
53install -d -p $RPM_BUILD_ROOT%{_mandir}/man8
54install -d -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/doc
55install etc/barnyard2.conf $RPM_BUILD_ROOT%{_sysconfdir}/snort/
56install $RPM_SOURCE_DIR/barnyard2.config $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/barnyard2
57install $RPM_SOURCE_DIR/barnyard2 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/barnyard2
58install doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/doc/
65fff0cc 59
60%clean
61if [ -d $RPM_BUILD_ROOT ] && [ "$RPM_BUILD_ROOT" != "/" ] ; then
62 rm -rf $RPM_BUILD_ROOT
63fi
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
This page took 0.065269 seconds and 4 git commands to generate.