Files
rpms/fedora/SPECS/archive/libmodsecurity.spec

123 lines
3.2 KiB
RPMSpec

Name: libmodsecurity
Version: 3.0.3
Release: 2%{?dist}
License: ASL 2.0
URL: http://www.modsecurity.org/
Group: System Environment/Daemons
Summary: A library that loads/interprets rules written in the ModSecurity SecRules
Source0: https://github.com/SpiderLabs/ModSecurity/releases/download/v%{version}/modsecurity-v%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: flex
BuildRequires: bison
BuildRequires: git-core
BuildRequires: ssdeep-devel
BuildRequires: yajl-devel
BuildRequires: libcurl-devel
BuildRequires: lmdb-devel
BuildRequires: libmaxminddb-devel
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(yajl)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(geoip)
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(lmdb)
#Requires:
BuildRequires: libxml2-devel pcre-devel lua-devel libmaxminddb-devel lmdb-devel ssdeep-devel libcurl-devel
# libinjection is supposed to be bundled (same as with mod_security 2.x)
# See: https://github.com/client9/libinjection#embedding
Provides: bundled(libinjection) = 3.9.2
%description
Libmodsecurity is one component of the ModSecurity v3 project.
The library codebase serves as an interface to ModSecurity Connectors
taking in web traffic and applying traditional ModSecurity processing.
In general, it provides the capability to load/interpret rules written
in the ModSecurity SecRules format and apply them to HTTP content provided
by your application via Connectors.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package static
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description static
The %{name}-static package contains static libraries for developing
applications that use %{name}.
%prep
%autosetup -n modsecurity-v%{version}
%build
%configure \
--enable-shared \
--enable-fast-install \
--enable-examples \
--enable-parser-generation \
--enable-mutex-on-pm \
--disable-doxygen-doc \
--enable-valgrind \
--enable-valgrind-sgcheck \
--with-yajl \
--with-maxmind \
--with-geoip \
--without-lmdb \
--with-ssdeep \
--with-lua \
--with-pic
# remove rpath from libtool
sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build
%install
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}/*
make install DESTDIR=%{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc README.md AUTHORS
%{_libdir}/*.so.*
%{_bindir}/*
%license LICENSE
%files devel
%doc README.md AUTHORS
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/modsecurity.pc
%license LICENSE
%files static
%{_libdir}/*.a
%{_libdir}/*.la
%clean
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}/*
[ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/*
%changelog
* Thu Mar 7 2019 Daniel Steiner <daniel.steiner@daniel-steiner.org>
- lmdb disabled
* Tue Jan 22 2019 Daniel Steiner <daniel.steiner@daniel-steiner.org>
- New 3.x build for Fedora 29.