]> git.pld-linux.org Git - packages/NewsCache.git/blob - NewsCache.spec
- use %useradd/%groupadd macros
[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 #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)
36
37 %define         _sysconfdir     /etc/%{name}
38
39 %description
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.
45
46 %description -l pl
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.
52
53 %package standalone
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
59
60 %description standalone
61 Run NewsCache in the standalone mode.
62
63 %description standalone -l pl
64 Uruchamia NewsCache w trybie samodzielnym.
65
66 %package inetd
67 Summary:        NewsCache inetd mode
68 Summary(pl):    NewsCache w trybie inetd
69 Group:          Development/Libraries
70 Requires:       %{name} = %{version}-%{release}
71 Requires:       rc-inetd
72 Obsoletes:      %{name}-standalone
73
74 %description inetd
75 Run NewsCache from the inetd.
76
77 %description inetd -l pl
78 Uruchamia NewsCache pod konrol± inetd.
79
80 %prep
81 %setup -q
82 %patch0 -p0
83 #%patch1 -p1
84
85 %build
86 %define specflags '-O0'
87 %{__aclocal}
88 %{__autoconf}
89 %{__autoheader}
90 %{__automake}
91 %configure      \
92         --enable-notcached
93 %{__make}
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 %{__make} install \
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
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 # setup provides this user/group
110 #%%pre
111 #if [ "`getgid news`" ]; then
112 #       %groupadd -g 13 -r -f news
113 #fi
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
116 #fi
117
118 %files
119 %defattr(644,root,root,755)
120 %doc AUTHORS ChangeLog NEWS README THANKS TODO
121 %doc %{_infodir}/*
122 %attr(755,root,root) %{_bindir}/*
123 %attr(755,root,root) %{_sbindir}/*
124 %{_mandir}/man?/*
125 %config(noreplace) %verify(not size mtime md5) %attr(755,news,news) %dir /var/cache/newscache
126 %dir %{_sysconfdir}
127 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
128
129 %files inetd
130 %defattr(644,root,root,755)
131 %attr(640,root,root) /etc/sysconfig/rc-inetd/newscache
132
133 %files standalone
134 %defattr(644,root,root,755)
135 %attr(754,root,root) /etc/rc.d/init.d/newscache
This page took 0.048915 seconds and 3 git commands to generate.