]> git.pld-linux.org Git - packages/barnyard2.git/blob - barnyard2.spec
- callout autotools from spec, include progs in BR
[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 %define         subver  beta2
7 %define         rel             1
8 Summary:        Snort Log Backend
9 Name:           barnyard2
10 Version:        1.10
11 Release:        0.%{subver}.%{rel}
12 License:        GPL
13 Group:          Networking
14 Source0:        https://github.com/firnsy/barnyard2/tarball/v2-%{version}-%{subver}/%{name}-%{version}.tar.gz
15 # Source0-md5:  af417a3491c5a4e5605c8fbd529f2255
16 Source2:        %{name}.config
17 Source3:        %{name}
18 URL:            https://github.com/firnsy/barnyard2
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 BuildRequires:  libtool
22 %{?with_mysql:BuildRequires:            mysql-devel}
23 %{?with_postgresql:BuildRequires:       postgresql-devel}
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
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.
35
36 %{?with_mysql:barnyard2 binary compiled with mysql support.}
37 %{?with_postgresql:barnyard2 binary compiled with postgresql support.}
38
39 %prep
40 %setup -qc
41 mv firnsy-%{name}-*/* .
42
43 %build
44 %{__aclocal} -I m4
45 %{__libtoolize}
46 %{__autoconf}
47 %{__autoheader}
48 %{__automake} --force-missing
49 %configure \
50         --sysconfdir=%{_sysconfdir}/snort \
51         %{?with_postgresql:--with-postgresql} \
52         %{?with_mysql:--with-mysql-libraries=%{_libdir}} \
53
54 %{__make}
55
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 %{__make} install \
60         DESTDIR=$RPM_BUILD_ROOT
61
62 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/snort}
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
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %files
71 %defattr(644,root,root,755)
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
75 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/barnyard2
76 %attr(755,root,root) %{_bindir}/barnyard2
This page took 0.080057 seconds and 3 git commands to generate.