1 # TODO: review i and tests (especially .inet), %%post, %%preun,
2 # %%postun scripts for NewsCache-{standalone,inet}, fix
3 # subpackages group descriptions.
6 Summary(pl): nisza dla newsów
12 Group: Applications/News
13 Source0: http://www.hstraub.at/linux/downloads/src/%{name}-%{version}.tar.gz
16 # Source0-md5: 8cd84c15429fbf70b9f24ab877387ab3
17 Patch0: %{name}-ac_no_debug_flag_hack.patch
18 # http://cmeerw.org/debian/
19 # http://download.cmeerw.net/debian/newscache/source/newscache_1.1.92-0cmeerw.diff.gz
20 Patch1: http://download.cmeerw.net/debian/newscache/source/newscache_1.1.92-0cmeerw.diff.gz
21 URL: http://members.aon.at/hstraub/linux/newscache
22 BuildRequires: socket++-devel
23 BuildRequires: libwrap-devel
24 #Requires(pre): /bin/id
25 #Requires(pre): /usr/bin/getgid
26 #Requires(pre): /usr/sbin/groupadd
27 #Requires(pre): /usr/sbin/useradd
28 #Requires(postun): /usr/sbin/userdel
29 #Requires(postun): /usr/sbin/groupdel
30 #Requires(post,preun): /sbin/chkconfig
31 #Requires(post,postun): /sbin/ldconfig
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _sysconfdir /etc/%{name}
37 NewsCache is a free cache server for USENET News. NewsCache acts to
38 news reading clients like a news server, except that it stores only
39 those articles that have been requested by at least one client.
40 NewsCache targets problems of the current News System like network
41 bandwidth consumption or the IO load caused by news clients.
44 NewsCache to wolnodostêpny serwer keszuj±cy dla sieci USENET.
45 NewsCache jest widziany jako serwer nntp, ale przechowuje tylko te
46 artyku³y o które czya³ choæ jeden klient. NewsCache rozwi±zuje
47 problemy takie jak zajmowanie pasma czy obci±¿enie systemu We/Wy
48 spowodowane obs³ug± klientów news.
51 Summary: NewsCache standalone mode
52 Summary(pl): NewsCache w trybie samodzielnym
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
55 Obsoletes: %{name}-inetd
57 %description standalone
58 Run NewsCache in the standalone mode.
60 %description standalone -l pl
61 Uruchamia NewsCache w trybie samodzielnym.
64 Summary: NewsCache inetd mode
65 Summary(pl): NewsCache w trybie inetd
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
69 Obsoletes: %{name}-standalone
72 Run NewsCache from the inetd.
74 %description inetd -l pl
75 Uruchamia NewsCache pod konrol± inetd.
83 %define specflags '-O0'
93 rm -rf $RPM_BUILD_ROOT
96 DESTDIR=$RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT{/var/cache/newscache,{%_sysconfdir},/etc/{rc.d/init.d,sysconfig/rc-inetd}}
98 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/newscache
99 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/newscache
100 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/newscache.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/newscache.conf
101 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/newscache.auth-dist $RPM_BUILD_ROOT%{_sysconfdir}/newscache.auth
104 rm -rf $RPM_BUILD_ROOT
106 # setup provides this user/group
108 #if [ "`getgid news`" ]; then
109 # /usr/sbin/groupadd -g 13 -r -f news
111 #if [ "`id -u news 2>/dev/null`" ]; then
112 # /usr/sbin/useradd -u 9 -r -d /var/spool/news -s /bin/false -c "NEWS User" -g news news 1>&2
116 %defattr(644,root,root,755)
117 %doc AUTHORS ChangeLog NEWS README THANKS TODO
119 %attr(755,root,root) %{_bindir}/*
120 %attr(755,root,root) %{_sbindir}/*
122 %config(noreplace) %verify(not size mtime md5) %attr(755,news,news) %dir /var/cache/newscache
124 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
127 %defattr(644,root,root,755)
128 %attr(640,root,root) /etc/sysconfig/rc-inetd/newscache
131 %defattr(644,root,root,755)
132 %attr(754,root,root) /etc/rc.d/init.d/newscache