firnsy/barnyard2 — pull request #21 by fprimex (2012-02-02 16:15:09+00:00)
Title: More spec file updates

%changelog
* Thu Feb 02 2012 Brent Woodruff
- Removed Source2 and Source3
- Removed unused realname variable
- Removed unused noShell variable
- Removed unused SnortRulesDir variable
- Added BuildRequires: libpcap-devel
- Added --with libpcap1 option
- Removed unneeded -n barnyard2-%{version} from setup
- Removed empty directories created by install
- Removed duplicate barnyard2.conf from install command
- Add mv command to put barnyard2.conf installed by %makeinstall in /etc/snort
(mv instead of rm; doesn't really matter either way but this is 'cleaner' imho)
- Changed doc/* to doc/INSTALL doc/README.*

Tested with both RHEL6 stock libpcap and Vincent Cojot's libpcap1 on RHEL6. Method is to just cp barnyard2.spec to ~/rpmbuild/SPECS and cp barnyard2-%{version}.tar.gz to ~/rpmbuild/SOURCES. Removed the need for other sources.

Results of both builds:
rpmbuild -ba --clean --with mysql --with libpcap1 barnyard2.spec
rpmbuild -ba --clean --with mysql barnyard2.spec

# rpm -qlp ../RPMS/x86_64/barnyard2-1.9-1.el6.x86_64.rpm
/etc/rc.d/init.d/barnyard2
/etc/snort/barnyard2.conf
/etc/sysconfig/barnyard2
/usr/bin/barnyard2
/usr/share/doc/barnyard2-1.9
/usr/share/doc/barnyard2-1.9/INSTALL
/usr/share/doc/barnyard2-1.9/LICENSE
/usr/share/doc/barnyard2-1.9/README.aruba
/usr/share/doc/barnyard2-1.9/README.database
/usr/share/doc/barnyard2-1.9/README.sguil