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: autoconf
23 BuildRequires: automake
24 BuildRequires: socket++-devel
25 BuildRequires: libwrap-devel
26 #BuildRequires: rpmbuild(macros) >= 1.202
27 #Requires(pre): /bin/id
28 #Requires(pre): /usr/bin/getgid
29 #Requires(pre): /usr/sbin/groupadd
30 #Requires(pre): /usr/sbin/useradd
31 #Requires(postun): /usr/sbin/userdel
32 #Requires(postun): /usr/sbin/groupdel
33 #Requires(post,preun): /sbin/chkconfig
34 #Requires(post,postun): /sbin/ldconfig
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _sysconfdir /etc/%{name}
40 NewsCache is a free cache server for USENET News. NewsCache acts to
41 news reading clients like a news server, except that it stores only
42 those articles that have been requested by at least one client.
43 NewsCache targets problems of the current News System like network
44 bandwidth consumption or the IO load caused by news clients.
47 NewsCache to wolnodostêpny serwer keszuj±cy dla sieci USENET.
48 NewsCache jest widziany jako serwer nntp, ale przechowuje tylko te
49 artyku³y, o które pyta³ choæ jeden klient. NewsCache rozwi±zuje
50 problemy takie jak zajmowanie pasma czy obci±¿enie systemu We/Wy
51 spowodowane obs³ug± klientów news.
54 Summary: NewsCache standalone mode
55 Summary(pl): NewsCache w trybie samodzielnym
56 Group: Development/Libraries
57 Requires: %{name} = %{version}-%{release}
58 Obsoletes: %{name}-inetd
60 %description standalone
61 Run NewsCache in the standalone mode.
63 %description standalone -l pl
64 Uruchamia NewsCache w trybie samodzielnym.
67 Summary: NewsCache inetd mode
68 Summary(pl): NewsCache w trybie inetd
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
72 Obsoletes: %{name}-standalone
75 Run NewsCache from the inetd.
77 %description inetd -l pl
78 Uruchamia NewsCache pod konrol± inetd.
86 %define specflags '-O0'
96 rm -rf $RPM_BUILD_ROOT
99 DESTDIR=$RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT{/var/cache/newscache,{%_sysconfdir},/etc/{rc.d/init.d,sysconfig/rc-inetd}}
101 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/newscache
102 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/newscache
103 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/newscache.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/newscache.conf
104 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/newscache.auth-dist $RPM_BUILD_ROOT%{_sysconfdir}/newscache.auth
107 rm -rf $RPM_BUILD_ROOT
109 # setup provides this user/group
111 #if [ "`getgid news`" ]; then
112 # %groupadd -g 13 -r -f news
114 #if [ "`id -u news 2>/dev/null`" ]; then
115 # %useradd -u 9 -r -d /var/spool/news -s /bin/false -c "NEWS User" -g news news
119 %defattr(644,root,root,755)
120 %doc AUTHORS ChangeLog NEWS README THANKS TODO
122 %attr(755,root,root) %{_bindir}/*
123 %attr(755,root,root) %{_sbindir}/*
125 %config(noreplace) %verify(not size mtime md5) %attr(755,news,news) %dir /var/cache/newscache
127 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
130 %defattr(644,root,root,755)
131 %attr(640,root,root) /etc/sysconfig/rc-inetd/newscache
134 %defattr(644,root,root,755)
135 %attr(754,root,root) /etc/rc.d/init.d/newscache