]> git.pld-linux.org Git - SPECS.git/blob - newsportal.spec
SPECS updated Sun 1 Aug 20:28:02 CEST 2021
[SPECS.git] / newsportal.spec
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ę
4 Name:           newsportal
5 Version:        0.38
6 Release:        1
7 License:        GPL
8 Group:          Networking/News
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
15 Requires:       php(iconv)
16 Requires:       php(pcre)
17 Requires:       webapps
18 Requires:       webserver = apache
19 Requires:       webserver(php)
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         _webapps        /etc/webapps
24 %define         _webapp         %{name}
25 %define         _sysconfdir     %{_webapps}/%{_webapp}
26 %define         _appdir         %{_datadir}/%{_webapp}
27
28 %description
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
33 news server.
34
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
43 zugreift.
44
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
48 przeglądarkę WWW.
49
50 %prep
51 %setup -q -n NewsPortal-%{version}
52 %patch0 -p1
53
54 %install
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}}}
57
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
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %triggerin -- apache1 < 1.3.37-3, apache1-base
75 %webapp_register apache %{_webapp}
76
77 %triggerun -- apache1 < 1.3.37-3, apache1-base
78 %webapp_unregister apache %{_webapp}
79
80 %triggerin -- apache < 2.2.0, apache-base
81 %webapp_register httpd %{_webapp}
82
83 %triggerun -- apache < 2.2.0, apache-base
84 %webapp_unregister httpd %{_webapp}
85
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
92         fi
93 done
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
98 fi
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
102 fi
103
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
108 fi
109
110 if [ -d /etc/httpd/webapps.d ]; then
111         /usr/sbin/webapp register httpd %{_webapp}
112         %service -q httpd reload
113 fi
114
115 %files
116 %defattr(644,root,root,755)
117 %doc doc/*
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
123 %{_appdir}
124 %attr(700,http,http) %dir /var/spool/%{name}
This page took 0.334805 seconds and 3 git commands to generate.