Mercurial > noffle
changeset 245:d6e02253fb76 noffle
[svn] * Makefile.am,docs/Makefile.am,packages/redhat/noffle.spec,
packages/redhat/noffle-xinetd: Update RPM spec file for RH7.2. Fix up
'make install' to work properly with 'make install DESTDIR=nnnn' to
enable 'make install' use in spec file. Convert from inetd to xinetd.
author | bears |
---|---|
date | Fri, 15 Mar 2002 15:25:13 +0000 |
parents | 4e69e9b722ae |
children | 6f3a55d18659 |
files | Makefile.am docs/Makefile.am packages/redhat/noffle-xinetd packages/redhat/noffle.spec |
diffstat | 4 files changed, 107 insertions(+), 118 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.am Fri Mar 15 10:50:33 2002 +0000 +++ b/Makefile.am Fri Mar 15 15:25:13 2002 +0000 @@ -5,49 +5,49 @@ EXTRA_DIST = $(PACKAGE).conf.example install-data-local: - $(INSTALL) -m 2755 -o news -g news -d $(SPOOLDIR) - $(INSTALL) -o news -g news -d $(SPOOLDIR)/data - $(INSTALL) -o news -g news -d $(SPOOLDIR)/lock - $(INSTALL) -o news -g news -d $(SPOOLDIR)/requested - $(INSTALL) -o news -g news -d $(SPOOLDIR)/outgoing - $(INSTALL) -o news -g news -d $(SPOOLDIR)/overview - chown -R news.news $(SPOOLDIR) - $(INSTALL) -m 755 -o 0 -g 0 -d $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/AUTHORS $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/COPYING $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/ChangeLog $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/INSTALL $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/NEWS $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/README $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/TODO $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/noffle.conf.example \ - $(CONFIGFILE).example - chown news.news $(CONFIGFILE).example - chmod 600 $(CONFIGFILE).example + $(INSTALL) -m 2755 -o news -g news -d $(DESTDIR)$(SPOOLDIR) + $(INSTALL) -o news -g news -d $(DESTDIR)$(SPOOLDIR)/data + $(INSTALL) -o news -g news -d $(DESTDIR)$(SPOOLDIR)/lock + $(INSTALL) -o news -g news -d $(DESTDIR)$(SPOOLDIR)/requested + $(INSTALL) -o news -g news -d $(DESTDIR)$(SPOOLDIR)/outgoing + $(INSTALL) -o news -g news -d $(DESTDIR)$(SPOOLDIR)/overview + chown -R news.news $(DESTDIR)$(SPOOLDIR) + $(INSTALL) -m 755 -o 0 -g 0 -d $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/AUTHORS $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/COPYING $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/ChangeLog $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/INSTALL $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/NEWS $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/README $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/TODO $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -D -o 0 -g 0 $(srcdir)/noffle.conf.example \ + $(DESTDIR)$(CONFIGFILE).example + chown news.news $(DESTDIR)$(CONFIGFILE).example + chmod 600 $(DESTDIR)$(CONFIGFILE).example @echo @echo "****************************************************************" - @echo "You should now copy $(CONFIGFILE).example to $(CONFIGFILE)" + @echo "You should now copy $(DESTDIR)$(CONFIGFILE).example to $(CONFIGFILE)" @echo "and edit that copy." @echo "****************************************************************" @echo install-exec-local: - chown news.news $(bindir)/`echo $(PACKAGE)|sed '$(transform)'` - chmod 4755 $(bindir)/`echo $(PACKAGE)|sed '$(transform)'` + chown news.news $(DESTDIR)$(bindir)/`echo $(PACKAGE)|sed '$(transform)'` + chmod 4755 $(DESTDIR)$(bindir)/`echo $(PACKAGE)|sed '$(transform)'` uninstall-local: - rm -f $(DOCDIR)/AUTHORS - rm -f $(DOCDIR)/COPYING - rm -f $(DOCDIR)/ChangeLog - rm -f $(DOCDIR)/INSTALL - rm -f $(DOCDIR)/NEWS - rm -f $(DOCDIR)/README - rm -f $(DOCDIR)/TODO - rm -f $(CONFIGFILE).example + rm -f $(DESTDIR)$(DOCDIR)/AUTHORS + rm -f $(DESTDIR)$(DOCDIR)/COPYING + rm -f $(DESTDIR)$(DOCDIR)/ChangeLog + rm -f $(DESTDIR)$(DOCDIR)/INSTALL + rm -f $(DESTDIR)$(DOCDIR)/NEWS + rm -f $(DESTDIR)$(DOCDIR)/README + rm -f $(DESTDIR)$(DOCDIR)/TODO + rm -f $(DESTDIR)$(CONFIGFILE).example @echo @echo "****************************************************************" - @echo "The NOFFLE spool directory $(SPOOLDIR) and the configfile" - @echo "$(CONFIGFILE) have *not* been removed. Please do this" + @echo "The NOFFLE spool directory $(DESTDIR)$(SPOOLDIR) and the configfile" + @echo "$(DESTDIR)$(CONFIGFILE) have *not* been removed. Please do this" @echo "manually." @echo "****************************************************************" @echo
--- a/docs/Makefile.am Fri Mar 15 10:50:33 2002 +0000 +++ b/docs/Makefile.am Fri Mar 15 15:25:13 2002 +0000 @@ -5,17 +5,17 @@ EXTRA_DIST = INTERNALS FAQ NOTES testing.txt ${man_MANS} $(PACKAGE).lsm install-data-local: - $(INSTALL) -o 0 -g 0 -d $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/INTERNALS $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/FAQ $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/NOTES $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/testing.txt $(DOCDIR) - $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/$(PACKAGE).lsm $(DOCDIR) + $(INSTALL) -o 0 -g 0 -d $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/INTERNALS $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/FAQ $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/NOTES $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/testing.txt $(DESTDIR)$(DOCDIR) + $(INSTALL_DATA) -o 0 -g 0 $(srcdir)/$(PACKAGE).lsm $(DESTDIR)$(DOCDIR) uninstall-local: - rm -f $(DOCDIR)/INTERNALS - rm -f $(DOCDIR)/FAQ - rm -f $(DOCDIR)/NOTES - rm -f $(DOCDIR)/testing.txt - rm -f $(DOCDIR)/$(PACKAGE).lsm + rm -f $(DESTDIR)$(DOCDIR)/INTERNALS + rm -f $(DESTDIR)$(DOCDIR)/FAQ + rm -f $(DESTDIR)$(DOCDIR)/NOTES + rm -f $(DESTDIR)$(DOCDIR)/testing.txt + rm -f $(DESTDIR)$(DOCDIR)/$(PACKAGE).lsm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/packages/redhat/noffle-xinetd Fri Mar 15 15:25:13 2002 +0000 @@ -0,0 +1,15 @@ +# default: off +# description: Usenet newsserver for small sites + +service nntp +{ + disable = yes + socket_type = stream + protocol = tcp + wait = no + user = news + group = news + only_from = 127.0.0.1 + server = /usr/bin/noffle + server_args = -r +}
--- a/packages/redhat/noffle.spec Fri Mar 15 10:50:33 2002 +0000 +++ b/packages/redhat/noffle.spec Fri Mar 15 15:25:13 2002 +0000 @@ -1,15 +1,20 @@ Summary: Usenet newsserver for small sites Name: noffle -Version: 1.1.1 +Version: 1.1.2 Release: 1 -Group: Networking/Daemons +Group: System Environment/Daemons Copyright: GPL -Packager: Carles Arjona <nospammer@bigfoot.com> +Packager: Jim Hague <jim.hague@acm.org> URL: http://noffle.sourceforge.net -BuildRoot: /var/tmp/%{name}-%{version}-root -Source: http://prdownloads.sourceforge.net/noffle/%{name}-%{version}.tar.gz -Source1: noffle-expire +Buildroot: %{_tmppath}/%{name}-root +Source: http://prdownloads.sf.net/noffle/%{name}-%{version}.tar.gz Requires: gdbm +BuildRequires: gdbm-devel +Conflicts: inn + +%define spooldir %{_var}/spool/%{name} +%define cfgfiledir %{_sysconfdir} +%define cfgfilename %{cfgfiledir}/%{name}.conf %description NOFFLE is a news server optimized for low speed dialup connection to the @@ -17,85 +22,39 @@ programs, even if they do not support offline reading by themselves. %prep -%setup +%setup -q %build -CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" -export CFLAGS LDFLAGS -./configure --prefix=/usr --enable-debug=no --mandir=%{_mandir} \ - --with-docdir=%{_docdir} +%configure --enable-debug=no --with-configfile=%{cfgfilename} \ + --with-spooldir=%{spooldir} make %install -install -o 0 -g 0 -d $RPM_BUILD_ROOT%{_bindir} -install -s -m 4755 -o news -g news src/noffle $RPM_BUILD_ROOT%{_bindir} -install -o 0 -g 0 -d $RPM_BUILD_ROOT%{_mandir}/man1 -install -m 0644 -o 0 -g 0 docs/noffle.1 $RPM_BUILD_ROOT%{_mandir}/man1/noffle.1 -install -o 0 -g 0 -d $RPM_BUILD_ROOT%{_mandir}/man5 -install -m 0644 -o 0 -g 0 docs/noffle.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5/noffle.conf.5 -install -m 2755 -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle -install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/data -install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/lock -install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/requested -install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/outgoing -install -o news -g news -d $RPM_BUILD_ROOT/var/spool/noffle/overview -install -o 0 -g 0 -d $RPM_BUILD_ROOT/etc/cron.daily -install -m 0755 -o news -g news $RPM_SOURCE_DIR/noffle-expire $RPM_BUILD_ROOT/etc/cron.daily/noffle-expire -install -m 0600 -o news -g news noffle.conf.example $RPM_BUILD_ROOT/etc/noffle.conf +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +mkdir -p %{buildroot}%{_sysconfdir}{,/{cron.daily,xinetd.d}} +install packages/redhat/noffle-expire %{buildroot}%{_sysconfdir}/cron.daily/noffle +install packages/redhat/noffle-xinetd %{buildroot}%{_sysconfdir}/xinetd.d/noffle + +ln -s noffle %{buildroot}%{_bindir}/inews + +mv %{buildroot}%{_sysconfdir}/noffle.conf.example %{buildroot}%{_sysconfdir}/noffle.conf %post -# Create inews line -ln -sf %{_bindir}/noffle %{_bindir}/inews -# Update /etc/inetd.conf -if ! grep -q '^[# \t]*nntp' /etc/inetd.conf ; then - echo >> /etc/inetd.conf - echo "nntp stream tcp nowait news /usr/sbin/tcpd usr/bin/noffle -r" >> /etc/inetd.conf - if [ -f /var/run/inetd.pid ] ; then - kill -HUP `cat /var/run/inetd.pid` - fi -fi -# xinetd configuration file -if [ -d /etc/xinetd.d ]; then - cat << END > /etc/xinetd.d/nntp -# default: on -# description: The noffle news server serves NNTP connections. -service nntp -{ - disable = no - socket_type = stream - protocol = tcp - wait = no - user = news - server = %{_bindir}/noffle - server_args = -r -} -END -fi -if ! grep -q '^[# \t]*noffle' /etc/hosts.deny ; then +if [ -f /etc/hosts.deny ] && ! grep -q '^[# \t]*noffle' /etc/hosts.deny ; then echo >> /etc/hosts.deny echo "noffle: ALL EXCEPT LOCAL" >> /etc/hosts.deny fi echo -echo " Don't forget to edit /etc/noffle.conf !!! " +echo " Don't forget to edit %{cfgfilename} !!! " echo %postun # The script gets 0 on uninstall, 1 on upgrade. Don't remove # hosts.deny/inetd.conf lines on upgrade. -rm /usr/bin/inews if [ "$1" = 0 ] ; then - if [ -f /etc/inetd.conf ] && - grep noffle /etc/inetd.conf > /dev/null 2>&1 ; then - if grep -v noffle /etc/inetd.conf > /tmp/inetd.$$ ; then - mv -f /tmp/inetd.$$ /etc/inetd.conf - if [ -f /var/run/inetd.pid ] ; then - kill -HUP `cat /var/run/inetd.pid` - fi - fi - fi - if [ -f /etc/xinetd.d/nntp ]; then - rm -f /etc/xinetd.d/nntp - fi if [ -f /etc/hosts.deny ] && grep noffle /etc/hosts.deny > /dev/null 2>&1 ; then if grep -v noffle /etc/hosts.deny > /tmp/hosts.deny.$$ ; then @@ -108,16 +67,31 @@ [ "$RPM_BUILD_ROOT" != "" ] && rm -rf $RPM_BUILD_ROOT %files -%config(noreplace) /etc/noffle.conf + +%defattr(-,root,root) %doc README INSTALL ChangeLog docs/FAQ docs/NOTES docs/INTERNALS -%doc docs/noffle.lsm COPYING noffle.conf.example -%{_bindir}/noffle -%{_mandir}/man?/* -/etc/cron.daily/noffle-expire -%dir /var/spool/noffle -%dir /var/spool/noffle/* +%doc docs/noffle.lsm +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/xinetd.d/noffle +%{_bindir}/inews +%defattr(-,news,news) +%attr(4755,news,news) %{_bindir}/noffle +%attr(0644,root,root) %doc %{_mandir}/man*/noffle* +%attr(0600,news,news) %config(noreplace) %{cfgfilename} +%attr(0755,news,news) %config(noreplace) %{_sysconfdir}/cron.daily/noffle +%attr(2755,news,news) %dir %{spooldir} +%attr(0755,news,news) %dir %{spooldir}/data +%attr(0755,news,news) %dir %{spooldir}/lock +%attr(0755,news,news) %dir %{spooldir}/requested +%attr(0755,news,news) %dir %{spooldir}/outgoing +%attr(0755,news,news) %dir %{spooldir}/overview %changelog +* Fri Mar 15 2002 Jim Hague <jim.hague@acm.org> +- Revamp spec file, making use of the first version Mandrake spec file + by Alexander Skwar <ASkwar@Linux-Mandrake.com>. +- Make noffle-expire just plain /etc/cron.daily/noffle. +- Version 1.1.2-1 RPM + * Sun Jan 13 2002 Jim Hague <jim.hague@acm.org> - Incorporate changes from Carles Arjona <nospammer@bigfoot.com> - Version 1.1.1-2 RPM