]> git.pld-linux.org Git - packages/NewsCache.git/blob - NewsCache.spec
485b925b96df59bf64236901c4847a40cf9bc0e0
[packages/NewsCache.git] / NewsCache.spec
1 # TODO: review i and tests (especially .inet), %%post, %%preun,
2 #       %%postun scripts for NewsCache-{standalone,inet}, fix 
3 #       subpackages group descriptions.
4 #
5 Summary:        News Cache
6 Summary(pl):    nisza dla newsów
7 Name:           NewsCache
8 Version:        1.1.92
9 Release:        1
10 Epoch:          0
11 License:        GPL
12 Group:          Applications/News
13 Source0:        http://www.hstraub.at/linux/downloads/src/%{name}-%{version}.tar.gz
14 Source1:        %{name}.init
15 Source2:        %{name}.inet
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)
33
34 %define         _sysconfdir     /etc/%{name}
35
36 %description
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.
42
43 %description -l pl
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.
49
50 %package standalone
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
56
57 %description standalone
58 Run NewsCache in the standalone mode.
59
60 %description standalone -l pl
61 Uruchamia NewsCache w trybie samodzielnym.
62
63 %package inetd
64 Summary:        NewsCache inetd mode
65 Summary(pl):    NewsCache w trybie inetd
66 Group:          Development/Libraries
67 Requires:       %{name} = %{version}-%{release}
68 Requires:       rc-inetd
69 Obsoletes:      %{name}-standalone
70
71 %description inetd
72 Run NewsCache from the inetd.
73
74 %description inetd -l pl
75 Uruchamia NewsCache pod konrol± inetd.
76
77 %prep
78 %setup -q
79 %patch0 -p0
80 #%patch1 -p1
81
82 %build
83 %define specflags '-O0'
84 %{__aclocal}
85 %{__autoconf}
86 %{__autoheader}
87 %{__automake}
88 %configure      \
89         --enable-notcached
90 %{__make}
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94
95 %{__make} install \
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
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 # setup provides this user/group
107 #%%pre
108 #if [ "`getgid news`" ]; then
109 #       /usr/sbin/groupadd -g 13 -r -f news
110 #fi
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
113 #fi
114
115 %files
116 %defattr(644,root,root,755)
117 %doc AUTHORS ChangeLog NEWS README THANKS TODO
118 %doc %{_infodir}/*
119 %attr(755,root,root) %{_bindir}/*
120 %attr(755,root,root) %{_sbindir}/*
121 %{_mandir}/man?/*
122 %config(noreplace) %verify(not size mtime md5) %attr(755,news,news) %dir /var/cache/newscache
123 %dir %{_sysconfdir}
124 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
125
126 %files inetd
127 %defattr(644,root,root,755)
128 %attr(640,root,root) /etc/sysconfig/rc-inetd/newscache
129
130 %files standalone
131 %defattr(644,root,root,755)
132 %attr(754,root,root) /etc/rc.d/init.d/newscache
This page took 0.058642 seconds and 2 git commands to generate.