1 Summary: News portal is a PHP based newsreader
2 Summary(de.UTF-8): PHP-Skript, welches den Zugriff auf Newsgruppen über Web ermöglicht
3 Summary(pl.UTF-8): Skrypt w PHP umożliwiający czytanie newsów przez przeglądarkę
9 Source0: http://florian-amrhein.de/nw/newsportal/download/%{name}-%{version}.tar.gz
10 # Source0-md5: 8f8828711acc1a6eb498e45fbc4e517f
11 Source1: %{name}-apache.conf
12 Patch0: %{name}-path.patch
13 URL: http://florian-amrhein.de/newsportal/
14 BuildRequires: rpmbuild(macros) >= 1.268
18 Requires: webserver = apache
19 Requires: webserver(php)
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _webapps /etc/webapps
24 %define _webapp %{name}
25 %define _sysconfdir %{_webapps}/%{_webapp}
26 %define _appdir %{_datadir}/%{_webapp}
29 This PHP script enables the access to a newsserver (by NNTP) from a
30 webpage. It allows you to combine web-forums and newsgroups. The
31 script is also suitable for presentation of announce newsgroups on web
32 pages, without having the user notice that he is in fact accessing a
35 %description -l de.UTF-8
36 NewsPortal ist ein PHP-Skript, welches den Zugriff auf Newsgruppen
37 über Web ermöglicht. Diese Skriptsammlung ermöglicht von einer
38 Webseite aus den Zugriff auf einen Newsserver (per NNTP). Man kann
39 damit Webforen und Newsgruppen verbinden, so daß auf ein "Webforum"
40 auch per NNTP zugegriffen werden kann. Dieses Skript eignet sich auch
41 für die Präsentation von Announce-Newsgruppen auf Webseiten, ohne daß
42 der Benutzer merkt, daß er in Wirklichkeit auf einen Newsserver
45 %description -l pl.UTF-8
46 NewsPortal pozwala na utworzenie prostego i estetycznego interfejsu do
47 czytania grup newsowych (przy użyciu protokołu NNTP) przez
51 %setup -q -n NewsPortal-%{version}
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_appdir}/{img,extras/cancel,extras/registration,extras/rss,extras/white-images,doc,lang,lib},{/var/spool/%{name},%{_sysconfdir}}}
58 install *.{php,inc,txt,css} $RPM_BUILD_ROOT%{_appdir}
59 install extras/cancel/* $RPM_BUILD_ROOT%{_appdir}/extras/cancel
60 install extras/registration/* $RPM_BUILD_ROOT%{_appdir}/extras/registration
61 install extras/rss/* $RPM_BUILD_ROOT%{_appdir}/extras/rss
62 install extras/white-images/* $RPM_BUILD_ROOT%{_appdir}/extras/white-images
63 install img/* $RPM_BUILD_ROOT%{_appdir}/img
64 install lang/*.lang $RPM_BUILD_ROOT%{_appdir}/lang
65 install lib/*.{php,inc} $RPM_BUILD_ROOT%{_appdir}/lib
66 mv $RPM_BUILD_ROOT%{_appdir}/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/config.php
67 mv $RPM_BUILD_ROOT%{_appdir}/groups.txt $RPM_BUILD_ROOT%{_sysconfdir}/groups.txt
68 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
69 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
72 rm -rf $RPM_BUILD_ROOT
74 %triggerin -- apache1 < 1.3.37-3, apache1-base
75 %webapp_register apache %{_webapp}
77 %triggerun -- apache1 < 1.3.37-3, apache1-base
78 %webapp_unregister apache %{_webapp}
80 %triggerin -- apache < 2.2.0, apache-base
81 %webapp_register httpd %{_webapp}
83 %triggerun -- apache < 2.2.0, apache-base
84 %webapp_unregister httpd %{_webapp}
86 %triggerpostun -- newsportal < 0.36-1.1
87 # location before r1.16
88 for i in groups.txt config.inc.php; do
89 if [ -f /home/services/httpd/html/newsportal/$i.rpmsave ]; then
90 mv -f %{_sysconfdir}/$i{,.rpmnew}
91 mv -f /home/services/httpd/html/newsportal/$i.rpmsave %{_sysconfdir}/$i
94 # location before r1.23
95 if [ -f /etc/%{name}/config.inc.rpmsave ]; then
96 mv -f %{_sysconfdir}/config.php{,.rpmnew}
97 mv -f /etc/%{name}/config.inc.rpmsave %{_sysconfdir}/config.php
99 if [ -f /etc/%{name}/groups.txt.rpmsave ]; then
100 mv -f %{_sysconfdir}/groups.txt{,.rpmnew}
101 mv -f /etc/%{name}/groups.txt.rpmsave %{_sysconfdir}/groups.txt
104 # no earlier registration. autodetect based on installed webservers
105 if [ -d /etc/apache/webapps.d ]; then
106 /usr/sbin/webapp register apache %{_webapp}
107 %service -q apache reload
110 if [ -d /etc/httpd/webapps.d ]; then
111 /usr/sbin/webapp register httpd %{_webapp}
112 %service -q httpd reload
116 %defattr(644,root,root,755)
118 %dir %attr(750,root,http) %{_sysconfdir}
119 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
120 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
121 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
122 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/groups.txt
124 %attr(700,http,http) %dir /var/spool/%{name}