update Wed Mar 10 00:37:00 PST 2010
authorCharlie <root@crater.dragonflybsd.org>
Wed, 10 Mar 2010 08:47:51 +0000 (00:47 -0800)
committerCharlie <root@crater.dragonflybsd.org>
Wed, 10 Mar 2010 08:47:51 +0000 (00:47 -0800)
shells/zsh/distinfo
shells/zsh/patches/patch-ba
shells/zsh/patches/patch-bb
wip/spectrum/MESSAGE
wip/spectrum/Makefile
wip/spectrum/PLIST
wip/spectrum/distinfo
wip/spectrum/files/spectrum.sh
wip/spectrum/patches/patch-aa [new file with mode: 0644]
wip/spectrum/patches/patch-ab [new file with mode: 0644]
wip/spectrum/patches/patch-ac [new file with mode: 0644]

index 151b0e0..804e6e0 100644 (file)
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.30 2010/02/23 17:11:01 roy Exp $
+$NetBSD: distinfo,v 1.31 2010/03/10 08:19:57 roy Exp $
 
 SHA1 (zsh-4.2.7.tar.bz2) = 64c598cd48b78dff9d29341ea0cd904e7aa49541
 RMD160 (zsh-4.2.7.tar.bz2) = 454339205c78393cbb9460aa10f37fa341a40b59
@@ -6,5 +6,5 @@ Size (zsh-4.2.7.tar.bz2) = 2303693 bytes
 SHA1 (patch-ab) = b446fd8138f18113c17cee43cd11a5f458b1db40
 SHA1 (patch-ac) = c80876a222ff9584bc53ec807ee2a8bc2b003cd1
 SHA1 (patch-ae) = ac77147eebfebcd042f93a71bb13f9c0be8de211
-SHA1 (patch-ba) = f712bc5beb7c2076dca94ac0d2a95bdf2e65d427
-SHA1 (patch-bb) = 0c95e3aff51c910c817b6527abacd6ad32aed0b2
+SHA1 (patch-ba) = 68e2c61e770f5fa9e74d5f30f7876d657292676c
+SHA1 (patch-bb) = 51c64ee6587e9fe3d7a961f755b40fe6c89808bf
index 7a670e5..0c604ad 100644 (file)
@@ -1,41 +1,11 @@
-$NetBSD: patch-ba,v 1.2 2010/02/23 17:11:01 roy Exp $
+$NetBSD: patch-ba,v 1.3 2010/03/10 08:19:57 roy Exp $
 
-termcap does not require curses.
-
---- Src/Modules/termcap.c.orig 2010-02-07 08:52:07.000000000 +0000
-+++ Src/Modules/termcap.c      2010-02-07 08:54:03.000000000 +0000
-@@ -27,22 +27,10 @@
-  *
-  */
--/*
-- * We need to include the zsh headers later to avoid clashes with
-- * the definitions on some systems, however we need the configuration
-- * file to decide whether we should avoid curses.h, which clashes
-- * with several zsh constants on some systems (e.g. SunOS 4).
-- */
- #include "../../config.h"
- #ifdef HAVE_TGETENT
--# if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
--#  define USES_TERM_H 1
--# else
--#  ifdef HAVE_TERMCAP_H
--#   define USES_TERMCAP_H 1
--#  endif
--# endif
-+# define USES_TERMCAP_H 1
- #endif
- #include "termcap.mdh"
-@@ -51,19 +39,7 @@
- static char termcap_nam[] = "termcap";
- #ifdef HAVE_TGETENT
--# ifdef USES_TERM_H
--#  ifdef HAVE_TERMIO_H
--#   include <termio.h>
--#  endif
+--- Src/Modules/termcap.c.orig 2010-03-10 07:58:25.000000000 +0000
++++ Src/Modules/termcap.c      2010-03-10 07:58:35.000000000 +0000
+@@ -55,14 +55,12 @@
+ #  ifdef HAVE_TERMIO_H
+ #   include <termio.h>
+ #  endif
 -#  ifdef TERM_H_NEEDS_CURSES_H
 -#   include <curses.h>
 -#  endif
@@ -44,8 +14,12 @@ termcap does not require curses.
 -#  ifdef USES_TERMCAP_H
 -#   include <termcap.h>
 -#  endif
--# endif
-+# include <termcap.h>
++# endif
++# ifdef TERM_H_NEEDS_CURSES_H
++#  include <curses.h>
++# endif
++# ifdef HAVE_TERMCAP_H
++#  include <termcap.h>
+ # endif
  
  static Param termcap_pm;
index b912130..7a808c4 100644 (file)
@@ -1,27 +1,15 @@
-$NetBSD: patch-bb,v 1.2 2010/02/23 17:11:01 roy Exp $
+$NetBSD: patch-bb,v 1.3 2010/03/10 08:19:57 roy Exp $
 
-terminfo does not require curses.
-
---- Src/Modules/terminfo.c.orig        2010-02-07 08:54:08.000000000 +0000
-+++ Src/Modules/terminfo.c     2010-02-07 08:55:11.000000000 +0000
-@@ -30,7 +30,7 @@
- #define USES_TERM_H 1
- #include "terminfo.mdh"
--#if defined(HAVE_TIGETFLAG) && defined(HAVE_CURSES_H)
-+#if defined(HAVE_TIGETFLAG) && defined(HAVE_TERM_H)
- # define USE_TERMINFO_MODULE 1
- #else
- # undef USE_TERMINFO_MODULE
-@@ -50,10 +50,7 @@
+--- Src/Modules/terminfo.c.orig        2010-03-10 07:58:30.000000000 +0000
++++ Src/Modules/terminfo.c     2010-03-10 07:58:40.000000000 +0000
+@@ -50,7 +50,9 @@
  #  undef offsetof
  # endif
  
 -# include <curses.h>
--# ifdef HAVE_TERM_H
--#  include <term.h>
--# endif
-+#include <term.h>
- static Param terminfo_pm;
++# ifdef TERM_H_NEEDS_CURSES_H
++#  include <curses.h>
++# endif
+ # ifdef HAVE_TERM_H
+ #  include <term.h>
+ # endif
index 8e29b22..cb67465 100644 (file)
@@ -6,8 +6,8 @@ Create the databases using the following files:
     ${EGDIR}/spectrum-sqlite3.sql for sqlite3
 
 To configure specturm, copy ${EGDIR}/spectrum.cfg
-to a protocol specific name, and update the contents to reflect the
-protocol specific JID.
+to a protocol specific name in ${PKG_SYSCONFDIR},
+and update the contents to reflect the protocol specific JID.
 
 Quick Start:
        Update the following fields in the protocol specific
@@ -31,4 +31,7 @@ Quick Start:
        host/user/database  --  appropriate values for connecting to
                                the database.
 
+Then start the spectrum instances using spectrumctl, or
+the ${PREFIX}/share/examples/rc.d/spectrum rc.d script.
+
 ===========================================================================
index d0a741e..fcf5cf7 100644 (file)
@@ -33,15 +33,17 @@ PY_PATCHPLIST=              yes
 
 # always include bsd.prefs.mk before any .if or .ifdef statements
 .include "../../mk/bsd.prefs.mk"
+.include "../../wip/jabberd/transports.mk"
 
 PKG_SYSCONFSUBDIR=     spectrum
 EGDIR=                 ${PREFIX}/share/examples/spectrum
+RCD_SCRIPTS+=          spectrum
 
 CONF_FILES+=           ${EGDIR}/spectrum.cfg ${PKG_SYSCONFDIR}/spectrum.cfg
 
 .include "options.mk"
 
-SUBST_CLASSES+=                cfgpath
+SUBST_CLASSES+=                cfgpath users
 SUBST_STAGE.cfgpath=   post-patch
 SUBST_FILES.cfgpath=   CMakeLists.txt
 SUBST_FILES.cfgpath+=  src/configfile.cpp
@@ -50,12 +52,28 @@ SUBST_FILES.cfgpath+=       spectrumctl/spectrumctl.py
 SUBST_FILES.cfgpath+=  man/spectrumctl.8
 SUBST_MESSAGE.cfgpath= Correcting configuration directory
 SUBST_SED.cfgpath=     -e 's,/etc/spectrum,${PKG_SYSCONFDIR},g'
+SUBST_SED.cfgpath+=    -e 's,@ETC_SPECTRUM@,${PKG_SYSCONFDIR},g'
+
+SUBST_STAGE.users=     post-patch
+SUBST_FILES.users=     spectrumctl/spectrumctl.py
+SUBST_FILES.users+=    man/spectrumctl.8
+SUBST_MESSAGE.users=   Correcting spectrum user
+SUBST_SED.users=       -e 's/@SPECTRUM@/${JABBER_USER}/g'
+
+MESSAGE_SUBST+=  EGDIR=${EGDIR:Q}
+MESSAGE_SUBST+=  PREFIX=${PREFIX:Q}
+MESSAGE_SUBST+=  PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
+
+FILES_SUBST+=  PREFIX=${PREFIX:Q}
+FILES_SUBST+=  JABBER_USER=${JABBER_USER:Q}
 
 INSTALLATION_DIRS=     bin ${PKG_SYSCONFDIR} ${EGDIR}
 INSTALLATION_DIRS+=    share/${PKGNAME}/certificates
 INSTALLATION_DIRS+=    share/${PKGNAME}/locales
 INSTALLATION_DIRS+=    ${EGDIR}
 
+pre-install:
+       ${MKDIR} ${DESTDIR}${PKG_SYSCONFDIR}
 post-install:
        ${INSTALL_DATA} ${WRKSRC}/spectrum.cfg ${DESTDIR}${EGDIR}
        ${INSTALL_DATA} ${WRKSRC}/schemas/mysql_schema.sql \
index 8684fb3..b8c6423 100644 (file)
@@ -9,6 +9,6 @@ share/examples/spectrum/spectrum-mysql.sql
 share/examples/spectrum/spectrum-sqlite3.sql
 share/examples/spectrum/spectrum.cfg
 share/spectrum/locales/cs.po
-share/man/man8/spectrumctl.8
+man/man8/spectrumctl.8
 @pkgdir share/spectrum/locales
 @pkgdir share/spectrum/certificates
index c641c55..a2ad260 100644 (file)
@@ -1 +1,4 @@
 $NetBSD$
+SHA1 (patch-aa) = d312cf57bb3a9c6ec7e33e354b782c77a0c89707
+SHA1 (patch-ab) = a55a280ae85332af4befaf026877ce1efafa3283
+SHA1 (patch-ac) = 3c1b21c9332434c79dc242177a5a9032b20b57dd
index 6055716..ca71a78 100644 (file)
 
 name="spectrum"
 rcvar=$name
-command=@PREFIX@/bin/spectrum
-required_files="@PKG_SYSCONFDIR@/yahoo-transport.xml"
-yahoo_transport_user="@JABBER_USER@"
-pidfile="@JABBER_PIDDIR@/yahoo-transport.pid"
-logfile="@JABBER_LOGDIR@/yahoo-transport.log"
+command=@PREFIX@/bin/spectrumctl
+spectrum_user="@JABBER_USER@"
 command_args=""
-stop_postcmd="remove_pidfile"
-start_precmd="ensure_piddir"
-
-PID=${pidfile} 
-export PID
 
 ensure_piddir()
 {
diff --git a/wip/spectrum/patches/patch-aa b/wip/spectrum/patches/patch-aa
new file mode 100644 (file)
index 0000000..2d1c80b
--- /dev/null
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- CMakeLists.txt.orig        2010-03-10 04:09:18.000000000 +0000
++++ CMakeLists.txt
+@@ -351,12 +351,12 @@ INSTALL(TARGETS spectrum
+     )
+-if (NOT EXISTS /etc/spectrum)
++if (NOT EXISTS @ETC_SPECTRUM@)
+       INSTALL(FILES
+               ${CMAKE_CURRENT_SOURCE_DIR}/spectrum.cfg
+-              DESTINATION /etc/spectrum/
++              DESTINATION @ETC_SPECTRUM@/
+               )
+-endif (NOT EXISTS /etc/spectrum)
++endif (NOT EXISTS @ETC_SPECTRUM@)
+ INSTALL(FILES
+     ${CMAKE_CURRENT_SOURCE_DIR}/locales/cs.po
+@@ -379,7 +379,7 @@ INSTALL(FILES
+ INSTALL(FILES
+     ${CMAKE_CURRENT_SOURCE_DIR}/man/spectrumctl.8
+-      DESTINATION share/man/man8
++      DESTINATION man/man8
+     )
+ # install(FILES
diff --git a/wip/spectrum/patches/patch-ab b/wip/spectrum/patches/patch-ab
new file mode 100644 (file)
index 0000000..e734bbd
--- /dev/null
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- man/spectrumctl.8.orig     2010-03-10 04:09:18.000000000 +0000
++++ man/spectrumctl.8
+@@ -14,7 +14,7 @@ spectrumctl \- util to control spectrum 
+ .SH DESCRIPTION
+ spectrumctl is a small tool written in python which can be used to control instances of the spectrum XMPP transport.
+ spectrum only handles one legacy network per instance, so you need more than one spectrum instance if you want support for more than one legacy network.
+-By default, spectrumctl acts on all transports defined in \fI/etc/spectrum/\fR.
++By default, spectrumctl acts on all transports defined in \fI@ETC_SPECTRUM@/\fR.
+ .SH OPERATIONS
+ .PP
+ \fBstart\fR, \fBstop\fR, \fBrestart\fR
+@@ -49,7 +49,7 @@ Only act on transport configured in FILE
+ .RE
+ \fB\-d\fR \fIDIR\fR, \fB\-\-config\-dir\fR=\fIDIR\fR
+ .RS 4
+-Act on all transports configured in DIR (default: \fI/etc/spectrum\fR)
++Act on all transports configured in DIR (default: \fI@ETC_SPECTRUM@\fR)
+ .sp
+ .RE
+ \fB\-q\fR, \fB\-\-quiet\fR
+@@ -71,7 +71,7 @@ Options for action "\fBstart\fR":
+ .RS 4
+ \fB\-\-su\fR=\fISU\fR
+ .RS 4
+-Start spectrum as this user (default: \fIspectrum\fR)
++Start spectrum as this user (default: \fI@SPECTRUM@\fR)
+ .RE
+ .RE
+ .sp
diff --git a/wip/spectrum/patches/patch-ac b/wip/spectrum/patches/patch-ac
new file mode 100644 (file)
index 0000000..e908bff
--- /dev/null
@@ -0,0 +1,37 @@
+$NetBSD$
+
+--- spectrumctl/spectrumctl.py.orig    2010-03-10 04:09:18.000000000 +0000
++++ spectrumctl/spectrumctl.py
+@@ -3,7 +3,7 @@
+ #
+ # spectrumctl can be used to control your spectrum-instances. Valid actions are
+ # start, stop, restart and reload. By default, spectrumctl acts on all instances
+-# defined in /etc/spectrum/
++# defined in @ETC_SPECTRUM@/
+ #
+ # Copyright (C) 2009, 2010 Mathias Ertl
+ #
+@@ -27,12 +27,12 @@ from optparse import *
+ description='''spectrumctl can be used to control your spectrum-instances.
+ Valid actions are start, stop, restart, reload, list and stats. By default, spectrumctl 
+-acts on all transports defined in /etc/spectrum/'''
++acts on all transports defined in @ETC_SPECTRUM@/'''
+ parser = OptionParser( usage='Usage: %prog [options] action', version='0.1', description=description)
+ parser.add_option( '-c', '--config', metavar='FILE',
+       help = 'Only act on transport configured in FILE (ignored for list)' )
+-parser.add_option( '-d', '--config-dir', metavar='DIR', default='/etc/spectrum',
++parser.add_option( '-d', '--config-dir', metavar='DIR', default='@ETC_SPECTRUM@',
+       help = 'Act on all transports configured in DIR (default: %default)' )
+ parser.add_option( '-q', '--quiet', action='store_true', default=False,
+       help = 'Do not print any output (ignored for list)' )
+@@ -43,7 +43,7 @@ list_group.add_option( '--status', choic
+ parser.add_option_group( list_group )
+ start_group = OptionGroup( parser, 'Options for action "start"' )
+-start_group.add_option( '--su', default='spectrum',
++start_group.add_option( '--su', default='@SPECTRUM@',
+       help = 'Start spectrum as this user (default: %default)' )
+ parser.add_option_group( start_group )