]> git.pld-linux.org Git - packages/barnyard2.git/blob - barnyard2.spec
- initial release - barnyard2 is an output processor for snort
[packages/barnyard2.git] / barnyard2.spec
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
22 Barnyard has 3 modes of operation:
23 One-shot, continual, continual w/ checkpoint.  In one-shot mode,
24 barnyard will process the specified file and exit.  In continual mode,
25 barnyard will start with the specified file and continue to process
26 new data (and new spool files) as it appears.  Continual mode w/
27 checkpointing will also use a checkpoint file (or waldo file in the
28 snort world) to track where it is.  In the event the barnyard process
29 ends while a waldo file is in use, barnyard will resume processing at
30 the last entry as listed in the waldo file.
31 %{?with_mysql:barnyard2 binary compiled with mysql support.}
32 %{?with_postgresql:barnyard2 binary compiled with postgresql support.}
33
34 %prep
35 %setup -q -n firnsy-barnyard2-5832a85
36
37
38 %build
39 ./autogen.sh
40 %configure --sysconfdir=%{_sysconfdir}/snort  \
41         %{?with_postgresql:--with-postgresql} \
42         %{?with_mysql:--with-mysql-libraries=/usr/%{_lib}} \
43
44 %{__make}
45
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 %{__make} install \
50         DESTDIR=$RPM_BUILD_ROOT
51
52 %{__install} -d -p $RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,rc.d/init.d,snort} 
53 %{__install} -d -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/contrib
54 %{__install} -d -p $RPM_BUILD_ROOT%{_mandir}/man8
55 %{__install} -d -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/doc
56 %{__install} -m 644 etc/barnyard2.conf $RPM_BUILD_ROOT%{_sysconfdir}/snort/
57 %{__install} -m 644 $RPM_SOURCE_DIR/barnyard2.config $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/barnyard2
58 %{__install} -m 755 $RPM_SOURCE_DIR/barnyard2 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/barnyard2
59 %{__install} -m 644 doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/doc/
60
61 %clean
62 if [ -d $RPM_BUILD_ROOT ] && [ "$RPM_BUILD_ROOT" != "/"  ] ; then
63         rm -rf $RPM_BUILD_ROOT
64 fi
65
66 %files
67 %defattr(644,root,root,755)
68 %doc LICENSE doc/
69 %attr(755,root,root) %{_bindir}/barnyard2
70 %attr(640,root,root) %config %{_sysconfdir}/snort/barnyard2.conf
71 %attr(755,root,root) %config %{_sysconfdir}/rc.d/init.d/barnyard2
72 %attr(644,root,root) %config %{_sysconfdir}/sysconfig/barnyard2
This page took 0.032576 seconds and 3 git commands to generate.