Skip to content

Instantly share code, notes, and snippets.

@topnotcher
Created April 14, 2014 17:28
Show Gist options
  • Save topnotcher/10667569 to your computer and use it in GitHub Desktop.
Save topnotcher/10667569 to your computer and use it in GitHub Desktop.
Name: suricata
Version: 2.0
Release: 1%{?dist}
Summary: Suricata is a high performance Network IDS, IPS and Network Security Monitoring engine
Group: System Environment/Daemons
License: GPLv2
URL: http://suricata-ids.org
Source0: http://www.openinfosecfoundation.org/download/%{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: libpcap-devel
BuildRequires: file-devel
BuildRequires: file
BuildRequires: findutils
BuildRequires: libcap-ng-devel
BuildRequires: libpcap-devel
BuildRequires: libyaml-devel
BuildRequires: nss-devel
BuildRequires: nss-util-devel
BuildRequires: pcre-devel
BuildRequires: pkgconfig
BuildRequires: zlib-devel
Requires: libpcap
Requires: file
Requires: file
Requires: findutils
Requires: libcap-ng
Requires: libpcap
Requires: libyaml
Requires: nss
Requires: nss-util
Requires: pcre
Requires: zlib
%description
%prep
#%patch0
%setup -q
%build
%configure --disable-rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/suricata
%{__install} -m 600 "classification.config" $RPM_BUILD_ROOT%{_sysconfdir}/suricata/
%{__install} -m 600 "reference.config" $RPM_BUILD_ROOT%{_sysconfdir}/suricata/
%{__install} -d $RPM_BUILD_ROOT%{_localstatedir}/log/suricata
%{__install} -m 770 -d $RPM_BUILD_ROOT%{_localstatedir}/run/suricata
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/suricata/rules
%{__install} -m 600 "rules/decoder-events.rules" "$RPM_BUILD_ROOT%{_sysconfdir}/suricata/rules"
%{__install} -m 600 "rules/stream-events.rules" "$RPM_BUILD_ROOT%{_sysconfdir}/suricata/rules"
%{__install} -m 600 "rules/smtp-events.rules" "$RPM_BUILD_ROOT%{_sysconfdir}/suricata/rules"
%{__install} -m 600 "rules/http-events.rules" "$RPM_BUILD_ROOT%{_sysconfdir}/suricata/rules"
%{__install} -m 600 "rules/dns-events.rules" "$RPM_BUILD_ROOT%{_sysconfdir}/suricata/rules"
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/suricata
%{_bindir}/suricatasc
%{_libdir}/python2.6/site-packages/suricatasc-0.9-py2.6.egg-info
%dir %{_libdir}/python2.6/site-packages/suricatasc
%dir %{_sysconfdir}/suricata
%dir %{_localstatedir}/run/suricata
%dir %{_localstatedir}/log/suricata
%doc
%package docs
Group: Documentation
Summary: Documentation for suricata
%description docs
%files docs
%defattr(-,root,root)
%dir %{_datadir}/doc/suricata
%package -n libhtp-devel
Group: System Environment/Libraries
Summary: LibHTP is a security-aware parser for the HTTP protocol and the related bits and pieces
Version: 0.5.10
%description -n libhtp-devel
%files -n libhtp-devel
%defattr (-,root,root)
%dir %{_includedir}/htp
%package -n libhtp
Group: System Environment/Libraries
Summary: LibHTP is a security-aware parser for the HTTP protocol and the related bits and pieces
Version: 0.5.10
%description -n libhtp
%files -n libhtp
%defattr (-,root,root)
%{_libdir}/libhtp-0.5.10.so.*
%{_libdir}/libhtp.a
%{_libdir}/libhtp.la
%{_libdir}/libhtp.so
%{_libdir}/pkgconfig/htp.pc
%changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment