SPECS: newsd.spec - pldiz, builds, with optflags preserved

glen glen at pld-linux.org
Mon Oct 6 16:09:20 CEST 2008


Author: glen                         Date: Mon Oct  6 14:09:20 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- pldiz, builds, with optflags preserved

---- Files affected:
SPECS:
   newsd.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/newsd.spec
diff -u SPECS/newsd.spec:1.1 SPECS/newsd.spec:1.2
--- SPECS/newsd.spec:1.1	Mon Oct  6 15:56:54 2008
+++ SPECS/newsd.spec	Mon Oct  6 16:09:14 2008
@@ -1,116 +1,83 @@
-#
-# "$Id$"
-#
-# 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 at foo.com>
-Vendor: Greg Ercolano and Michael Sweet
-
-# Use buildroot so as not to disturb the version already installed
-BuildRoot: /var/tmp/%{name}-root
+# $Revision$, $Date$
+# 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
+
+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
 
 %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
-
-if test -x /sbin/chkconfig; then
-	/sbin/chkconfig --del newsd
+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
 
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.2  2008/10/06 14:09:14  glen
+- pldiz, builds, with optflags preserved
 
-#
-# End of "$Id$".
-#
+Revision 1.1  2008/10/06 13:56:54  glen
+- raw from http://svn.easysw.com/public/newsd/trunk/newsd.spec
\ No newline at end of file
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/newsd.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list