File leafnode.spec of Package leafnode
# leafnode.spec. Generated from leafnode.spec.in by configure.
# norootforbuild
Version: 1.11.8
Summary: A leaf site NNTP client/server (Version %version)
Summary(de): Ein offline-Newsserver (Version %version)
Name: leafnode
Release: 1
License: GPL
Group: Productivity/Networking/News/Servers
Source: http://prdownloads.sourceforge.net/leafnode/leafnode-%version.tar.xz
Prefix: /usr
Buildroot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pcre-devel xz
Requires: xinetd cron
Conflicts: inn cnews
URL: http://www.leafnode.org/
PreReq: permissions
Recommends: %{name}-doc = %{version}
# 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
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
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
%setup -q
%{?suse_update_config:%{suse_update_config -f}}
export CFLAGS="${CFLAGS} -ggdb3 $RPM_OPT_FLAGS"
%configure \
--with-spooldir="%spooldir" \
--sysconfdir="%confdir" --with-lockfile="%lockfile"
%build
make %{?_smp_mflags}
%install
%makeinstall
for i in "$RPM_BUILD_ROOT/%{confdir}/"*.example ; do
mv "$i" "${i%%.example}"
done
rm -f "$RPM_BUILD_ROOT/%{_docdir}/setup-daemontools.sh"
for i in UNINSTALL-daemontools run.tcpd.dist run.tcpserver.dist \
Makefile.dist nntp.rules.dist
do
rm -f "$RPM_BUILD_ROOT/%{confdir}/$i"
done
install -m755 tools/*.pl "$RPM_BUILD_ROOT/%{_sbindir}"
rm tools/*.pl
# 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"
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
%files
%defattr(-,root,root,-)
%attr(750,root,root) %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
%_bindir/*
%_sbindir/*
%doc %_mandir/man1/*
%doc %_mandir/man8/*
%doc %_mandir/de/*/*
%dir %attr(775,news,news) %spooldir
%dir %attr(775,news,news) %spooldir/leaf.node
%dir %attr(775,news,news) %spooldir/failed.postings
%dir %attr(775,news,news) %spooldir/interesting.groups
%dir %attr(755,news,news) %spooldir/out.going
%dir %attr(755,news,news) %spooldir/temp.files
%dir %attr(755,news,news) %spooldir/message.id
%package doc
Summary: Documentation for the leafnode news server
Requires: %name = %version
%description doc
This package contains the documentation for leafnode news server
software package, split out from the main package.
%files doc
%defattr(-,root,root,-)
%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-*
%if !0%{?opensuse_bs}
%{?debug_package}
%endif
%post
echo "Remember to edit /etc/xinetd.d/leafnode and reload xinetd."
%clean
rm -rf "$RPM_BUILD_ROOT" "%{_builddir}/%name-%version"
%changelog