File: leafnode.spec.in

package info (click to toggle)
leafnode 1.11.11-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,468 kB
  • sloc: ansic: 10,914; sh: 1,748; xml: 628; makefile: 291; perl: 84; sed: 4
file content (124 lines) | stat: -rw-r--r-- 3,840 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# DO NOT EDIT!
# @configure_input@

Version: @VERSION@
Summary: Leafnode - a leafsite NNTP server (Version %version)
Summary(de): Leafnode - ein offline-Newsserver (Version %version)
Name: leafnode
Release: 1
License: GPL
Group: Applications/News
Source: http://prdownloads.sourceforge.net/leafnode/leafnode-%version.tar.bz2
Prefix: /usr
# Distribution: ${DISTRIBUTION}
Buildroot: /var/tmp/leafnode-%version-buildroot/
Packager: Matthias Andree <matthias.andree@gmx.de>
BuildPrereq: libpcre.so.0
Requires: xinetd
Conflicts: inn cnews

# WARNING: DO -NOT- REMOVE THE /leafnode COMPONENT FROM confdir!
# If you do, the RPM will subvert original system permissions.
%define confdir /etc/leafnode
%define spooldir /var/spool/news
%define lockfile /var/spool/news/leaf.node/lock.file

%description
Leafnode is a small NNTP server for leaf sites without permanent
connection to the internet. It supports a subset of NNTP and is able to
automatically fetch the newsgroups the user reads regularly from the
newsserver of the ISP.

%description -l de
Leafnode ist ein offline-Newsserver, der vor allem f�r den typischen
Einzelnutzer-Rechner ohne permanente Internetanbindung geeignet ist.
Leafnode bezieht automatisch die Newsgroups, die der oder die Nutzer
regelm��ig lesen, vom Newsserver des Providers.

%prep
test -f /usr/include/pcre/pcre.h \
|| test -f /usr/include/pcre.h \
|| { echo >&2 "You MUST install the pcre-devel package before building this RPM." ; exit 1 ; }
%setup
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --mandir=%_mandir \
 --with-spooldir=%spooldir\
 --sysconfdir=%confdir --with-lockfile=%lockfile

%build
make

%install
rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT install
for i in $RPM_BUILD_ROOT/%{confdir}/*.example ; do
  cp -p $i ${i%%.example}
done

# texpire cron job
mkdir -p $RPM_BUILD_ROOT/etc/cron.daily
install -m755 leafnode.cron.daily \
    $RPM_BUILD_ROOT/etc/cron.daily/leafnode

# xinetd sample file
mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d
install -m644 leafnode.xinetd $RPM_BUILD_ROOT/etc/xinetd.d/leafnode

# German manual pages and documentation
for i in 1 8 ; do
  mkdir -p $RPM_BUILD_ROOT/%{_mandir}/de/man$i
  install -m644 doc_german/*.$i $RPM_BUILD_ROOT/%{_mandir}/de/man$i
  #gzip -9f $RPM_BUILD_ROOT/%{_mandir}/de/man/man$i/*.?
done
rm -f doc_german/*.in doc_german/*.? doc_german/Makefile*

cat >README.rpm <<EOF
Note: this RPM has pre-installed a configuration file for xinetd.
Read /etc/xinetd.d/leafnode for the prerequisites to use it.
EOF

# add -debuginfo package on newer RPM versions
%{?debug_package}

%files
%defattr(-,root,root)
%attr(750,root,news) %dir %confdir/

%config(noreplace) %attr(640,root,news) %confdir/config
%config(noreplace) %attr(640,root,news) %confdir/filters
%config(noreplace) /etc/cron.daily/leafnode
%config(noreplace) /etc/xinetd.d/leafnode

%attr(640,root,news) %confdir/config.example
%attr(640,root,news) %confdir/filters.example
%attr(644,root,root) %confdir/*.dist
%attr(644,root,root) %confdir/UNINSTALL-daemontools
%prefix/bin/*
%prefix/sbin/*

%doc %_mandir/man1/*
%doc %_mandir/man8/*
%doc %_mandir/de/*/*

%doc COPYING COPYING.GPL COPYING.LGPL CREDITS ChangeLog ChangeLog.old
%doc FAQ.txt FAQ.html FAQ.pdf INSTALL
%doc NEWS OLDNEWS README* ADD-ONS
%doc doc_german
%doc leafnode-SA-*

%doc %attr(755,root,root) setup-daemontools.sh
%doc %attr(755,root,root) tools/*.pl

%dir %attr(2755,news,news) %spooldir
%dir %attr(2755,news,news) %spooldir/leaf.node
%dir %attr(775,news,news) %spooldir/failed.postings
%dir %attr(775,news,news) %spooldir/interesting.groups
%dir %attr(2755,news,news) %spooldir/out.going
%dir %attr(755,news,news) %spooldir/temp.files
%dir %attr(2755,news,news) %spooldir/message.id

%post
echo "Remember to edit /etc/xinetd.d/leafnode and reload xinetd."

%clean
rm -rf $RPM_BUILD_ROOT %{_builddir}/%name-%version