]> git.pld-linux.org Git - packages/barnyard2.git/blame - barnyard2.spec
- callout autotools from spec, include progs in BR
[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
b29b5dd3
ER
6%define subver beta2
7%define rel 1
65fff0cc 8Summary: Snort Log Backend
9Name: barnyard2
b29b5dd3
ER
10Version: 1.10
11Release: 0.%{subver}.%{rel}
65fff0cc 12License: GPL
13Group: Networking
b29b5dd3 14Source0: https://github.com/firnsy/barnyard2/tarball/v2-%{version}-%{subver}/%{name}-%{version}.tar.gz
65fff0cc 15# Source0-md5: af417a3491c5a4e5605c8fbd529f2255
16Source2: %{name}.config
17Source3: %{name}
18URL: https://github.com/firnsy/barnyard2
64ce76ab
ER
19BuildRequires: autoconf
20BuildRequires: automake
21BuildRequires: libtool
65fff0cc 22%{?with_mysql:BuildRequires: mysql-devel}
23%{?with_postgresql:BuildRequires: postgresql-devel}
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
112f1876 27Barnyard has 3 modes of operation: One-shot, continual, continual w/
28checkpoint. In one-shot mode, barnyard will process the specified file
29and exit. In continual mode, barnyard will start with the specified
30file and continue to process new data (and new spool files) as it
31appears. Continual mode w/ checkpointing will also use a checkpoint
32file (or waldo file in the snort world) to track where it is. In the
33event the barnyard process ends while a waldo file is in use, barnyard
34will resume processing at the last entry as listed in the waldo file.
b29b5dd3 35
65fff0cc 36%{?with_mysql:barnyard2 binary compiled with mysql support.}
37%{?with_postgresql:barnyard2 binary compiled with postgresql support.}
38
39%prep
b29b5dd3
ER
40%setup -qc
41mv 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 \
65fff0cc 51 %{?with_postgresql:--with-postgresql} \
b29b5dd3 52 %{?with_mysql:--with-mysql-libraries=%{_libdir}} \
65fff0cc 53
54%{__make}
55
56
57%install
58rm -rf $RPM_BUILD_ROOT
59%{__make} install \
60 DESTDIR=$RPM_BUILD_ROOT
61
64ce76ab 62install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/snort}
b29b5dd3
ER
63cp -p etc/barnyard2.conf $RPM_BUILD_ROOT%{_sysconfdir}/snort
64cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/barnyard2
65install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/barnyard2
65fff0cc 66
67%clean
b29b5dd3 68rm -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
This page took 0.061584 seconds and 4 git commands to generate.