]> git.pld-linux.org Git - packages/prewikka.git/blame - prewikka.spec
- up to 5.1.1
[packages/prewikka.git] / prewikka.spec
CommitLineData
305407af 1# TODO: apache (and other webservers?) configuration for prewikka WSGI
5a89229d 2Summary: Prelude IDS web application
a1312073 3Summary(pl.UTF-8): Aplikacja WWW dla Prelude IDS
5a89229d 4Name: prewikka
5a0ca727 5Version: 5.1.1
93287c70 6Release: 1
0edb9475 7License: GPL v2+
191a32e9 8Group: Applications/Networking
305407af 9#Source0Download: https://www.prelude-siem.org/projects/prelude/files
5a0ca727
JR
10Source0: https://www.prelude-siem.org/attachments/download/1182/%{name}-%{version}.tar.gz
11# Source0-md5: aa5f3621ec027211f8e4bb4474821562
93287c70
AM
12Source1: %{name}.init
13Source2: %{name}.sysconfig
305407af
JB
14Patch0: %{name}-localedir.patch
15Patch1: %{name}-install.patch
5a0ca727 16Patch2: locale.patch
305407af
JB
17URL: https://www.prelude-siem.org/
18BuildRequires: python >= 1:2.6
5a0ca727 19BuildRequires: python-lesscpy
305407af 20BuildRequires: python-setuptools
0edb9475 21BuildRequires: rpm-pythonprov
305407af 22BuildRequires: rpmbuild(macros) >= 1.714
9e12854b
JB
23Requires: python-Mako
24Requires: python-PyYAML
305407af 25Requires: python-babel
5a0ca727
JR
26Requires: python-libprelude >= 5.1.0
27Requires: python-libpreludedb >= 5.1.0
9e12854b
JB
28Requires: python-modules >= 1:2.6
29Requires: python-pytz
30Requires: python-werkzeug
5a89229d
AM
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
f71f87df 35Prewikka is a professional looking application providing advanced
36feature like contextual filtering, aggregation, etc.
5a89229d 37
ac06ee93
JR
38%description -l pl.UTF-8
39Prewikka to profesjonalnie wyglądająca aplikacja dająca zaawansowane
40możliwości, takie jak filtrowanie kontekstowe, agregację itp.
7ba8f1f7 41
305407af
JB
42%package httpd
43Summary: Standalone Prewikka HTTP server
44Summary(pl.UTF-8): Samodzielny serwer HTTP dla Prewikki
45Group: Daemons
46Requires(pre): /bin/id
47Requires(pre): /usr/bin/getgid
48Requires(pre): /usr/sbin/groupadd
49Requires(pre): /usr/sbin/useradd
50Requires(post,preun): /sbin/chkconfig
51Requires(postun): /usr/sbin/groupdel
52Requires(postun): /usr/sbin/userdel
53Requires: rc-scripts
54Provides: group(http)
55Provides: user(http)
56Requires: %{name} = %{version}-%{release}
57
58%description httpd
59Standalone Prewikka HTTP server. Allows to run Prewikka on user
60available port (>= 1024, 8000 by default).
61
62%description httpd -l pl.UTF-8
63Samodzielny serwer HTTP dla Prewikki. Pozwala na uruchomienie Prewikki
64na porcie dostępnym dla użytkownika (>= 1024, domyślnie 8000).
65
5a89229d 66%prep
d05a2acc 67%setup -q
305407af
JB
68%patch0 -p1
69%patch1 -p1
5a0ca727 70%patch2 -p1
5a89229d
AM
71
72%build
305407af 73%py_build
5a89229d
AM
74
75%install
76rm -rf $RPM_BUILD_ROOT
77
305407af 78%py_install
5a89229d 79
93287c70
AM
80install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
81install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
82install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
83
f991dd18 84install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
85install conf/prewikka.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
86
305407af
JB
87install -d $RPM_BUILD_ROOT%{_datadir}
88%{__mv} $RPM_BUILD_ROOT%{py_sitescriptdir}/prewikka/locale $RPM_BUILD_ROOT%{_datadir}
89
0edb9475
JB
90%py_postclean
91
92%find_lang %{name}
93
5a89229d
AM
94%clean
95rm -rf $RPM_BUILD_ROOT
96
305407af
JB
97%pre httpd
98%groupadd -g 51 http
99%useradd -u 51 -r -d /home/services/httpd -s /bin/false -c "HTTP User" -g http http
100
101%post httpd
93287c70
AM
102/sbin/chkconfig --add prewikka
103if [ "$1" = "1" ]; then
104%banner -e %{name} <<EOF
105
305407af
JB
106Create new database and database user for Prewikka (or update an existing
107one if needed) and configure Prewikka. For reference visit:
108https://www.prelude-siem.org/projects/prelude/wiki/InstallingPreludePrewikka
93287c70
AM
109
110To connect to console point Your browser to:
0edb9475 111http://`hostname`:8000/
305407af 112REMEMBER to change password for admin (default: admin)
93287c70
AM
113
114EOF
115fi
116%service prewikka restart "Prewikka"
117
305407af 118%preun httpd
93287c70 119if [ "$1" = "0" ]; then
d1452c63 120 %service prewikka stop
93287c70
AM
121 /sbin/chkconfig --del prewikka
122fi
123
305407af
JB
124%postun httpd
125if [ "$1" = "0" ]; then
126 %userremove http
127 %groupremove http
128fi
129
0edb9475 130%files -f %{name}.lang
5a89229d 131%defattr(644,root,root,755)
305407af 132%doc AUTHORS COPYING.* NEWS README
5a0ca727 133%attr(755,root,root) %{_bindir}/prewikka-cli
9e12854b 134%attr(755,root,root) %{_bindir}/prewikka-crontab
93287c70 135%dir %{_sysconfdir}/%{name}
0edb9475 136%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/prewikka.conf
9e12854b 137%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/menu.yml
305407af
JB
138%dir %{_datadir}/%{name}
139%dir %{_datadir}/%{name}/prewikka.wsgi
140%{py_sitescriptdir}/prewikka
141%{py_sitescriptdir}/prewikka-%{version}-py*.egg-info
142%attr(770,root,http) %dir /var/lib/prewikka
143
144%files httpd
145%defattr(644,root,root,755)
146%attr(755,root,root) %{_bindir}/prewikka-httpd
93287c70
AM
147%attr(754,root,root) /etc/rc.d/init.d/%{name}
148%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
This page took 0.091678 seconds and 4 git commands to generate.