]> git.pld-linux.org Git - packages/NewsCache.git/blob - NewsCache.spec
- added missing BR: autoconf,automake
[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:  autoconf
23 BuildRequires:  automake
24 BuildRequires:  socket++-devel
25 BuildRequires:  libwrap-devel
26 #Requires(pre): /bin/id
27 #Requires(pre): /usr/bin/getgid
28 #Requires(pre): /usr/sbin/groupadd
29 #Requires(pre): /usr/sbin/useradd
30 #Requires(postun):      /usr/sbin/userdel
31 #Requires(postun):      /usr/sbin/groupdel
32 #Requires(post,preun):  /sbin/chkconfig
33 #Requires(post,postun): /sbin/ldconfig
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define         _sysconfdir     /etc/%{name}
37
38 %description
39 NewsCache is a free cache server for USENET News. NewsCache acts to
40 news reading clients like a news server, except that it stores only
41 those articles that have been requested by at least one client.
42 NewsCache targets problems of the current News System like network
43 bandwidth consumption or the IO load caused by news clients.
44
45 %description -l pl
46 NewsCache to wolnodostêpny serwer keszuj±cy dla sieci USENET.
47 NewsCache jest widziany jako serwer nntp, ale przechowuje tylko te
48 artyku³y o które czya³ choæ jeden klient. NewsCache rozwi±zuje
49 problemy takie jak zajmowanie pasma czy obci±¿enie systemu We/Wy
50 spowodowane obs³ug± klientów news.
51
52 %package standalone
53 Summary:        NewsCache standalone mode
54 Summary(pl):    NewsCache w trybie samodzielnym
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 Obsoletes:      %{name}-inetd
58
59 %description standalone
60 Run NewsCache in the standalone mode.
61
62 %description standalone -l pl
63 Uruchamia NewsCache w trybie samodzielnym.
64
65 %package inetd
66 Summary:        NewsCache inetd mode
67 Summary(pl):    NewsCache w trybie inetd
68 Group:          Development/Libraries
69 Requires:       %{name} = %{version}-%{release}
70 Requires:       rc-inetd
71 Obsoletes:      %{name}-standalone
72
73 %description inetd
74 Run NewsCache from the inetd.
75
76 %description inetd -l pl
77 Uruchamia NewsCache pod konrol± inetd.
78
79 %prep
80 %setup -q
81 %patch0 -p0
82 #%patch1 -p1
83
84 %build
85 %define specflags '-O0'
86 %{__aclocal}
87 %{__autoconf}
88 %{__autoheader}
89 %{__automake}
90 %configure      \
91         --enable-notcached
92 %{__make}
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96
97 %{__make} install \
98         DESTDIR=$RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT{/var/cache/newscache,{%_sysconfdir},/etc/{rc.d/init.d,sysconfig/rc-inetd}}
100 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/newscache
101 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/newscache
102 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/newscache.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/newscache.conf
103 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/newscache.auth-dist $RPM_BUILD_ROOT%{_sysconfdir}/newscache.auth
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 # setup provides this user/group
109 #%%pre
110 #if [ "`getgid news`" ]; then
111 #       /usr/sbin/groupadd -g 13 -r -f news
112 #fi
113 #if [ "`id -u news 2>/dev/null`" ]; then
114 #       /usr/sbin/useradd -u 9 -r -d /var/spool/news -s /bin/false -c "NEWS User" -g news news 1>&2
115 #fi
116
117 %files
118 %defattr(644,root,root,755)
119 %doc AUTHORS ChangeLog NEWS README THANKS TODO
120 %doc %{_infodir}/*
121 %attr(755,root,root) %{_bindir}/*
122 %attr(755,root,root) %{_sbindir}/*
123 %{_mandir}/man?/*
124 %config(noreplace) %verify(not size mtime md5) %attr(755,news,news) %dir /var/cache/newscache
125 %dir %{_sysconfdir}
126 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
127
128 %files inetd
129 %defattr(644,root,root,755)
130 %attr(640,root,root) /etc/sysconfig/rc-inetd/newscache
131
132 %files standalone
133 %defattr(644,root,root,755)
134 %attr(754,root,root) /etc/rc.d/init.d/newscache
This page took 0.048097 seconds and 3 git commands to generate.