Blob Blame Raw
Name:           prewikka
Version:        4.1.5
Release:        4%{?dist}
Summary:        Graphical front-end analysis console for IDMEF
License:        GPLv2+
URL:            https://www.prelude-siem.org/
Source0:        https://www.prelude-siem.org/pkg/src/%{version}/%{name}-%{version}.tar.gz
# https://www.prelude-siem.org/issues/912
Patch0:         prewikka-4.1.5-fix_python3.patch

BuildRequires:  gettext
BuildRequires:  python3-devel
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3-configargparse
BuildRequires:  python3-babel
BuildRequires:  python3-lesscpy
BuildRequires:  python3-setuptools

Requires:       python3-%{name} >= 4.1.0

# Since mass rebuild, debugpackage wont works for prewikka
%define debug_package %{nil}

%description
Prewikka is the backend of the web browser interface of Prelude SIEM. Providing
numerous features, Prewikka facilitates the work of users and analysts. It
provides alert aggregation and heartbeat views, and has user customization and
configurable filters. Prewikka also provides access to external tools such as
whois and traceroute.

%package -n python3-%{name}
Summary:        Graphical front-end analysis console for IDMEF
Requires:       %{name} = %{version}-%{release}
Requires:       python3-prelude >= 4.1.0
Requires:       python3-preludedb >= 4.1.0
Requires:       python3-babel
Requires:       python3-mako
Requires:       python3-PyYAML
Requires:       python3-werkzeug
Requires:       python3-dateutil
Requires:       python3-pytz
%{?python_provide:%python_provide python3-%{name}}

%description -n python3-%{name}
Prewikka is the backend of the web browser interface of Prelude SIEM. Providing
numerous features, Prewikka facilitates the work of users and analysts. It
provides alert aggregation and heartbeat views, and has user customization and
configurable filters. Prewikka also provides access to external tools such as
whois and traceroute.

%prep
%autosetup -p1

%build
%py3_build

%install
install -d -m 0755 %{buildroot}%{_sbindir}

# We have to use this because py3_install do other things and siteconfig.py
# will be not installed
%{__python3} setup.py install --root=%{buildroot}
mv %{buildroot}%{_bindir}/%{name}-httpd %{buildroot}%{_sbindir}/%{name}-httpd-%{python3_version}
mv %{buildroot}%{_bindir}/%{name}-crontab %{buildroot}%{_sbindir}/%{name}-crontab-%{python3_version}

ln -s ./%{name}-httpd-%{python3_version} %{buildroot}%{_sbindir}/%{name}-httpd-3
ln -s ./%{name}-httpd-3 %{buildroot}%{_sbindir}/%{name}-httpd
ln -s ./%{name}-crontab-%{python3_version} %{buildroot}%{_sbindir}/%{name}-crontab-3
ln -s ./%{name}-crontab-3 %{buildroot}%{_sbindir}/%{name}-crontab

rm -f %{buildroot}%{_sysconfdir}/%{name}/*-dist

## Language files; not under /usr/share/locale, need to move them
install -d -m 0755 %{buildroot}%{_datadir}/locale
cp -r %{buildroot}%{python3_sitelib}/%{name}/locale/* %{buildroot}%{_datadir}/locale/
rm -rf %{buildroot}%{python3_sitelib}/%{name}/locale
ln -s %{_datadir}/locale %{buildroot}%{python3_sitelib}/%{name}/locale

%find_lang %{name}

%files -f %{name}.lang
%license COPYING
%doc AUTHORS NEWS README
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}/menu.yml
%{_datadir}/%{name}

%files -n python3-%{name}
%{_sbindir}/%{name}-httpd
%{_sbindir}/%{name}-httpd-3
%{_sbindir}/%{name}-httpd-%{python3_version}
%{_sbindir}/%{name}-crontab
%{_sbindir}/%{name}-crontab-3
%{_sbindir}/%{name}-crontab-%{python3_version}
%{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info

%changelog
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 4.1.5-2
- Rebuilt for Python 3.7

* Wed Apr 25 2018 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.1.5-1
- Bump version 4.1.5

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Oct 11 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 4.0.0-1
- Bump version 4.0.0

* Thu Aug 10 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 3.1.0-4
- Temporary disable debugsource since Mass rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 17 2017 Thomas Andrejak <thomas.andrejak@gmail.com> - 3.1.0-1
- Bump version

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Wed May 12 2010 Steve Grubb <sgrubb@redhat.com> 1.0.0-1
- new upstream release

* Fri Feb 12 2010 Steve Grubb <sgrubb@redhat.com> 1.0.0rc3-1
- new upstream release

* Wed Feb 10 2010 Steve Grubb <sgrubb@redhat.com> 1.0.0rc2-1
- new upstream release

* Sat Jan 30 2010 Steve Grubb <sgrubb@redhat.com> 1.0.0rc1-1
- new upstream release

* Tue Sep 29 2009 Steve Grubb <sgrubb@redhat.com> 0.9.17.1-1
- new upstream release

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jul 09 2009 Steve Grubb <sgrubb@redhat.com> 0.9.17-1
- new upstream release

* Wed Jun 17 2009 Steve Grubb <sgrubb@redhat.com> 0.9.15-1
- new upstream release

* Fri Apr 17 2009 Steve Grubb <sgrubb@redhat.com> 0.9.14-4
- Change default perms on conf file

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.14-2
- Rebuild for Python 2.6

* Thu Apr 24 2008 Steve Grubb <sgrubb@redhat.com> 0.9.14-1
- new upstream release

* Mon Jan 14 2008 Steve Grubb <sgrubb@redhat.com> 0.9.13-1
- new upstream version 0.9.13

* Sun Apr  8 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.10-1
- moved to upstream version 0.9.10

* Fri Jan 12 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.8-1
- moved to upstream version 0.9.8

* Thu Jan 11 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.7.1-5
- changed docs handling
- fixed python settings

* Mon Jan 01 2007 Thorsten Scherf <tscherf@redhat.com> 0.9.7.1-4
- corrected perms on python files 
- moved prewikka-httpd to /sbin
- added README.fedora

* Mon Nov 20 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.7.1-3
- disabled dependency-generator 

* Mon Nov 20 2006 Thorsten Scherf <tscherf@redhat.com> 0.9.7.1-2
- Some minor fixes in requirements

* Sat Nov 06 2004 Thorsten Scherf <tscherf@redhat.com> 0.9.7.1-1
- test build for fc6