comparison packages/redhat/noffle.spec @ 238:dbafa3954bbe noffle

[svn] * packages/redhat/noffle.spec: Incorporate changes from Carles Arjona.
author bears
date Thu, 14 Feb 2002 17:16:27 +0000
parents 9fb4b7d7e64b
children d6e02253fb76
comparison
equal deleted inserted replaced
237:f8a91e2b4060 238:dbafa3954bbe
2 Name: noffle 2 Name: noffle
3 Version: 1.1.1 3 Version: 1.1.1
4 Release: 1 4 Release: 1
5 Group: Networking/Daemons 5 Group: Networking/Daemons
6 Copyright: GPL 6 Copyright: GPL
7 Packager: Soenke J. Peters <peters+rpm@simprovement.com> 7 Packager: Carles Arjona <nospammer@bigfoot.com>
8 URL: http://home.t-online.de/home/markus.enzenberger/noffle.html 8 URL: http://noffle.sourceforge.net
9 BuildRoot: /var/tmp/%{name}-%{version}-root 9 BuildRoot: /var/tmp/%{name}-%{version}-root
10 Source: http://download.sourceforge.net/noffle/%{name}-%{version}.tar.gz 10 Source: http://prdownloads.sourceforge.net/noffle/%{name}-%{version}.tar.gz
11 Source1: noffle-expire
11 Requires: gdbm 12 Requires: gdbm
12 Requires: sendmail
13 13
14 %description 14 %description
15 NOFFLE is a news server optimized for low speed dialup connection to the 15 NOFFLE is a news server optimized for low speed dialup connection to the
16 Internet and few users. It allows reading news offline with many news reader 16 Internet and few users. It allows reading news offline with many news reader
17 programs, even if they do not support offline reading by themselves. 17 programs, even if they do not support offline reading by themselves.
20 %setup 20 %setup
21 21
22 %build 22 %build
23 CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" 23 CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s"
24 export CFLAGS LDFLAGS 24 export CFLAGS LDFLAGS
25 ./configure --prefix=/usr --enable-debug=no 25 ./configure --prefix=/usr --enable-debug=no --mandir=%{_mandir} \
26 --with-docdir=%{_docdir}
26 make 27 make
27 28
28 %install 29 %install
29 install -o 0 -g 0 -d $RPM_BUILD_ROOT/usr/bin 30 install -o 0 -g 0 -d $RPM_BUILD_ROOT%{_bindir}
30 install -s -m 4755 -o news -g news src/noffle $RPM_BUILD_ROOT/usr/bin 31 install -s -m 4755 -o news -g news src/noffle $RPM_BUILD_ROOT%{_bindir}
31 install -o 0 -g 0 -d $RPM_BUILD_ROOT/usr/man/man1 32 install -o 0 -g 0 -d $RPM_BUILD_ROOT%{_mandir}/man1
32 install -m 0644 -o 0 -g 0 docs/noffle.1 $RPM_BUILD_ROOT/usr/man/man1/noffle.1 33 install -m 0644 -o 0 -g 0 docs/noffle.1 $RPM_BUILD_ROOT%{_mandir}/man1/noffle.1
33 install -o 0 -g 0 -d $RPM_BUILD_ROOT/usr/man/man5 34 install -o 0 -g 0 -d $RPM_BUILD_ROOT%{_mandir}/man5
34 install -m 0644 -o 0 -g 0 docs/noffle.conf.5 $RPM_BUILD_ROOT/usr/man/man5/noffle.conf.5 35 install -m 0644 -o 0 -g 0 docs/noffle.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5/noffle.conf.5
35 install -m 2755 -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle 36 install -m 2755 -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle
36 install -o 0 -g 0 -d $RPM_BUILD_ROOT/etc
37 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/data 37 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/data
38 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/lock 38 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/lock
39 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/requested 39 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/requested
40 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/outgoing 40 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/outgoing
41 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/overview 41 install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/overview
42 install -o 0 -g 0 -d $RPM_BUILD_ROOT/etc/cron.daily
43 install -m 0755 -o news -g news $RPM_SOURCE_DIR/noffle-expire $RPM_BUILD_ROOT/etc/cron.daily/noffle-expire
42 install -m 0600 -o news -g news noffle.conf.example $RPM_BUILD_ROOT/etc/noffle.conf 44 install -m 0600 -o news -g news noffle.conf.example $RPM_BUILD_ROOT/etc/noffle.conf
43 install -o 0 -g 0 -d $RPM_BUILD_ROOT/etc/cron.daily
44 install -m 0755 -o news -g news packages/redhat/noffle-expire $RPM_BUILD_ROOT/etc/cron.daily/noffle-expire
45 45
46 %post 46 %post
47 # Create inews line 47 # Create inews line
48 ln -sf /usr/bin/noffle /usr/bin/inews 48 ln -sf %{_bindir}/noffle %{_bindir}/inews
49 # Update /etc/inetd.conf 49 # Update /etc/inetd.conf
50 if ! grep -q '^[# \t]*nntp' /etc/inetd.conf ; then 50 if ! grep -q '^[# \t]*nntp' /etc/inetd.conf ; then
51 echo >> /etc/inetd.conf 51 echo >> /etc/inetd.conf
52 echo "nntp stream tcp nowait news /usr/sbin/tcpd usr/bin/noffle -r" >> /etc/inetd.conf 52 echo "nntp stream tcp nowait news /usr/sbin/tcpd usr/bin/noffle -r" >> /etc/inetd.conf
53 if [ -f /var/run/inetd.pid ] ; then 53 if [ -f /var/run/inetd.pid ] ; then
54 kill -HUP `cat /var/run/inetd.pid` 54 kill -HUP `cat /var/run/inetd.pid`
55 fi 55 fi
56 fi
57 # xinetd configuration file
58 if [ -d /etc/xinetd.d ]; then
59 cat << END > /etc/xinetd.d/nntp
60 # default: on
61 # description: The noffle news server serves NNTP connections.
62 service nntp
63 {
64 disable = no
65 socket_type = stream
66 protocol = tcp
67 wait = no
68 user = news
69 server = %{_bindir}/noffle
70 server_args = -r
71 }
72 END
56 fi 73 fi
57 if ! grep -q '^[# \t]*noffle' /etc/hosts.deny ; then 74 if ! grep -q '^[# \t]*noffle' /etc/hosts.deny ; then
58 echo >> /etc/hosts.deny 75 echo >> /etc/hosts.deny
59 echo "noffle: ALL EXCEPT LOCAL" >> /etc/hosts.deny 76 echo "noffle: ALL EXCEPT LOCAL" >> /etc/hosts.deny
60 fi 77 fi
74 if [ -f /var/run/inetd.pid ] ; then 91 if [ -f /var/run/inetd.pid ] ; then
75 kill -HUP `cat /var/run/inetd.pid` 92 kill -HUP `cat /var/run/inetd.pid`
76 fi 93 fi
77 fi 94 fi
78 fi 95 fi
96 if [ -f /etc/xinetd.d/nntp ]; then
97 rm -f /etc/xinetd.d/nntp
98 fi
79 if [ -f /etc/hosts.deny ] && 99 if [ -f /etc/hosts.deny ] &&
80 grep noffle /etc/hosts.deny > /dev/null 2>&1 ; then 100 grep noffle /etc/hosts.deny > /dev/null 2>&1 ; then
81 if grep -v noffle /etc/hosts.deny > /tmp/hosts.deny.$$ ; then 101 if grep -v noffle /etc/hosts.deny > /tmp/hosts.deny.$$ ; then
82 mv -f /tmp/hosts.deny.$$ /etc/hosts.deny 102 mv -f /tmp/hosts.deny.$$ /etc/hosts.deny
83 fi 103 fi
86 106
87 %clean 107 %clean
88 [ "$RPM_BUILD_ROOT" != "" ] && rm -rf $RPM_BUILD_ROOT 108 [ "$RPM_BUILD_ROOT" != "" ] && rm -rf $RPM_BUILD_ROOT
89 109
90 %files 110 %files
91 %config /etc/noffle.conf 111 %config(noreplace) /etc/noffle.conf
92 %doc README INSTALL ChangeLog docs/FAQ docs/NOTES docs/INTERNALS 112 %doc README INSTALL ChangeLog docs/FAQ docs/NOTES docs/INTERNALS
93 %doc docs/noffle.lsm COPYING noffle.conf.example 113 %doc docs/noffle.lsm COPYING noffle.conf.example
94 /usr/bin/noffle 114 %{_bindir}/noffle
95 /usr/man/* 115 %{_mandir}/man?/*
96 /etc/cron.daily/noffle-expire 116 /etc/cron.daily/noffle-expire
97 %dir /var/spool/noffle 117 %dir /var/spool/noffle
98 %dir /var/spool/noffle/data 118 %dir /var/spool/noffle/*
99 %dir /var/spool/noffle/lock
100 %dir /var/spool/noffle/requested
101 %dir /var/spool/noffle/outgoing
102 %dir /var/spool/noffle/overview
103 119
104 %changelog 120 %changelog
121 * Sun Jan 13 2002 Jim Hague <jim.hague@acm.org>
122 - Incorporate changes from Carles Arjona <nospammer@bigfoot.com>
123 - Version 1.1.1-2 RPM
124 - Added support for xinetd
125 - Separated noffle.expire from the original tarball sources
126
105 * Wed Oct 31 2001 Jim Hague <jim.hague@acm.org> 127 * Wed Oct 31 2001 Jim Hague <jim.hague@acm.org>
106 - Up version to 1.1-1, and remove inews from %files as it is created by %post. 128 - Up version to 1.1-1, and remove inews from %files as it is created by %post.
107 Remove relocation prefix - it wasn't working properly. Also 129 Remove relocation prefix - it wasn't working properly. Also
108 RPM 4 seems to automatically compress man pages, so put man pages in 130 RPM 4 seems to automatically compress man pages, so put man pages in
109 %files as /usr/man/* so we pick up whatever is there, compressed or not. 131 %files as /usr/man/* so we pick up whatever is there, compressed or not.