diff options
-rw-r--r-- | newsd.spec | 146 |
1 files changed, 50 insertions, 96 deletions
@@ -1,116 +1,70 @@ -# -# "$Id: newsd.spec,v 1.1 2008-10-06 13:56:54 glen Exp $" -# -# RPM "spec" file for newsd. -# -# Copyright 2003-2005 Michael Sweet -# Copyright 2002 Greg Ercolano -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public Licensse as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -Summary: newsd usenet news server -Name: newsd -Version: 1.44 -Release: 1 -Copyright: GPL -Group: System Environment/Daemons -Source: http://ftp.easysw.com/pub/newsd/newsd-%{version}-source.tar.gz -Url: http://www.easysw.com/~mike/newsd/ -Packager: Anonymous <anonymous@foo.com> -Vendor: Greg Ercolano and Michael Sweet - -# Use buildroot so as not to disturb the version already installed -BuildRoot: /var/tmp/%{name}-root +# TODO +# - run as 'news' user +# - pldize initscript +Summary: newsd usenet news server +Name: newsd +Version: 1.44 +Release: 1 +License: GPL +Group: Networking/Daemons +Source0: http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/newsd/%{version}/%{name}-%{version}-source.tar.bz2 +# Source0-md5: 74081b4a51ac94a250f21953eca83ee9 +URL: http://www.easysw.com/~mike/newsd/ +BuildRequires: libstdc++-devel +Requires(post,preun): /sbin/chkconfig +Requires: rc-scripts +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -Newsd is a standalone local NNTP news server for private -newsgroup serving on a single server. It is useful for serving -private newsgroup(s) to an intranet or the Internet and can act -as a simple mail gateway, however it does not interface with -other news servers and cannot manage distributed news feeds, -i.e. Usenet news. +Newsd is a standalone local NNTP news server for private newsgroup +serving on a single server. It is useful for serving private +newsgroup(s) to an intranet or the Internet and can act as a simple +mail gateway, however it does not interface with other news servers +and cannot manage distributed news feeds, i.e. Usenet news. %prep -%setup +%setup -q %build -CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr - -# If we got this far, all prerequisite libraries must be here. -make +%configure +%{__make} \ + OPTIM="" %install -# Make sure the RPM_BUILD_ROOT directory exists. rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install +%{__make} install \ + initdir="" \ + INSTALL_BIN=install \ + DESTDIR=$RPM_BUILD_ROOT -%preun -if test -f /sbin/init.d/newsd; then - /sbin/init.d/newsd stop -fi -if test -f /etc/rc.d/init.d/newsd; then - /etc/rc.d/init.d/newsd stop -fi -if test -f /etc/init.d/newsd; then - /etc/init.d/newsd stop -fi +install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/newsd +install newsd.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/newsd + +rm -rf $RPM_BUILD_ROOT%{_mandir}/cat* +rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} + +%post +/sbin/chkconfig --add %{name} +%service %{name} restart -if test -x /sbin/chkconfig; then - /sbin/chkconfig --del newsd +%preun +if [ "$1" = "0" ]; then + %service -q %{name} stop + /sbin/chkconfig --del %{name} fi %clean rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root) -%config(noreplace) /etc/newsd.conf - -# RC dirs are a pain under Linux... Uncomment the appropriate ones if you -# don't use Red Hat or Mandrake... - -# OLD RedHat/Mandrake -/etc/rc.d/init.d/* -/etc/rc.d/rc0.d/* -/etc/rc.d/rc2.d/* -/etc/rc.d/rc3.d/* -/etc/rc.d/rc5.d/* - -#/sbin/rc.d/* -#/sbin/rc.d/rc0.d/* -#/sbin/rc.d/rc2.d/* -#/sbin/rc.d/rc3.d/* -#/sbin/rc.d/rc5.d/* - -# NEW RedHat/Mandrake -#/etc/init.d/* -#/etc/rc0.d/* -#/etc/rc2.d/* -#/etc/rc3.d/* -#/etc/rc5.d/* - -/usr/sbin/* -%dir /usr/share/doc/newsd -/usr/share/doc/newsd/* -/usr/share/man/* +%defattr(644,root,root,755) +%doc CHANGES README +%doc inn2newsd.sh +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/newsd.conf +%attr(754,root,root) /etc/rc.d/init.d/newsd +%attr(755,root,root) %{_sbindir}/newsd +%{_mandir}/man5/newsd.conf.5* +%{_mandir}/man8/newsd.8* %dir /var/spool/newsd - - -# -# End of "$Id: newsd.spec,v 1.1 2008-10-06 13:56:54 glen Exp $". -# |