aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/Makefile1
-rw-r--r--mail/gmail-notify/Makefile47
-rw-r--r--mail/gmail-notify/distinfo2
-rw-r--r--mail/gmail-notify/files/Makefile24
-rw-r--r--mail/gmail-notify/files/config.h6
-rw-r--r--mail/gmail-notify/files/gmail-notifier5
-rw-r--r--mail/gmail-notify/files/patch-GmailConfig.py157
-rw-r--r--mail/gmail-notify/files/patch-langs.xml21
-rw-r--r--mail/gmail-notify/files/patch-notifier.conf.sample13
-rw-r--r--mail/gmail-notify/files/patch-notifier.py46
-rw-r--r--mail/gmail-notify/pkg-descr8
-rw-r--r--mail/gmail-notify/pkg-plist23
12 files changed, 353 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 1cda2304ec44..c14650f42021 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -116,6 +116,7 @@
SUBDIR += glacier
SUBDIR += glbiff
SUBDIR += gld
+ SUBDIR += gmail-notify
SUBDIR += gmime
SUBDIR += gmime2
SUBDIR += gnarwl
diff --git a/mail/gmail-notify/Makefile b/mail/gmail-notify/Makefile
new file mode 100644
index 000000000000..8cb7df027cd1
--- /dev/null
+++ b/mail/gmail-notify/Makefile
@@ -0,0 +1,47 @@
+# New ports collection makefile for: gmail-notify
+# Date created: 07 June 2005
+# Whom: David
+#
+# $FreeBSD$
+#
+
+PORTNAME= gmail-notify
+PORTVERSION= 1.6
+CATEGORIES= mail python
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+
+MAINTAINER= djulien.bsd@gmail.com
+COMMENT= GMail Notifier
+
+BUILD_DEPENDS= ${NONEXISTENT}:${.CURDIR}/../../x11-toolkits/py-gnome-extras:extract
+
+USE_GNOME= pygtk2
+USE_PYTHON= yes
+USE_REINPLACE= yes
+USE_GMAKE= yes
+
+WRKSRC= ${WRKDIR}/${DISTNAME}
+
+EXTRAS_WRKSRC!= cd ${.CURDIR}/../../x11-toolkits/py-gnome-extras && ${MAKE} -V WRKSRC
+
+post-patch:
+ ${SED} -e 's|@DATADIR@|${DATADIR}|' ${FILESDIR}/gmail-notifier > ${WRKSRC}/gmail-notifier
+
+pre-configure:
+ ${CP} ${EXTRAS_WRKSRC}/egg/tray/eggtrayicon.[ch] ${EXTRAS_WRKSRC}/egg/tray/trayicon* ${WRKSRC}
+ ${CP} ${FILESDIR}/config.h ${FILESDIR}/Makefile ${WRKSRC}
+ ${RM} ${WRKSRC}/pytrayicon.so
+
+do-install:
+ ${MKDIR} ${DATADIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/gmail-notifier ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/*.py ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.pyc ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.png ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.jpg ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.so ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/langs.xml ${DATADIR}
+
+.include <bsd.port.mk>
diff --git a/mail/gmail-notify/distinfo b/mail/gmail-notify/distinfo
new file mode 100644
index 000000000000..27f99c82c5a9
--- /dev/null
+++ b/mail/gmail-notify/distinfo
@@ -0,0 +1,2 @@
+MD5 (gmail-notify-1.6.tar.gz) = 1d448d3c4423dd1b5d4cdad10279b974
+SIZE (gmail-notify-1.6.tar.gz) = 57214
diff --git a/mail/gmail-notify/files/Makefile b/mail/gmail-notify/files/Makefile
new file mode 100644
index 000000000000..3fb60a56736d
--- /dev/null
+++ b/mail/gmail-notify/files/Makefile
@@ -0,0 +1,24 @@
+# $FreeBSD$
+# Makefile to build trayicon.so
+
+CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -I${PREFIX}/include/python2.4/ -I. -Wall -I${PREFIX}/share/pygtk/2.0 -I${PREFIX}/libdata/pkgconfig -DEGG_COMPILATION
+LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0`
+
+DEFS_DIR= ${PREFIX}/share/pygtk/2.0/defs/
+
+CODEGEN = pygtk-codegen-2.0
+
+all: trayicon.so
+
+trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o
+ $(CC) $(LDFLAGS) -shared $^ -o $@
+
+trayicon.c: trayicon.defs eggtrayicon.h trayicon.override
+ $(CODEGEN) --prefix pytrayicon \
+ --register $(DEFS_DIR)/gdk-types.defs \
+ --register $(DEFS_DIR)/gtk-types.defs \
+ --override trayicon.override \
+ trayicon.defs > $@
+
+clean:
+ rm -f *.o *.so trayicon.c *~
diff --git a/mail/gmail-notify/files/config.h b/mail/gmail-notify/files/config.h
new file mode 100644
index 000000000000..284f0956e2bb
--- /dev/null
+++ b/mail/gmail-notify/files/config.h
@@ -0,0 +1,6 @@
+/*
+ * This file is empty. eggtrayicon.c includes a <config.h> even if it appears to
+ * be useless.
+ *
+ * David <djulien.bsd@gmail.com>
+ */
diff --git a/mail/gmail-notify/files/gmail-notifier b/mail/gmail-notify/files/gmail-notifier
new file mode 100644
index 000000000000..002c6eb2056d
--- /dev/null
+++ b/mail/gmail-notify/files/gmail-notifier
@@ -0,0 +1,5 @@
+#! /bin/sh
+# Launch notifier
+#
+# David <djulien.bsd@gmail.com>
+cd @DATADIR@ ; python notifier.py
diff --git a/mail/gmail-notify/files/patch-GmailConfig.py b/mail/gmail-notify/files/patch-GmailConfig.py
new file mode 100644
index 000000000000..201ea638fb71
--- /dev/null
+++ b/mail/gmail-notify/files/patch-GmailConfig.py
@@ -0,0 +1,157 @@
+*** GmailConfig.py.orig Tue May 3 10:02:32 2005
+--- GmailConfig.py Tue Jun 7 15:27:30 2005
+***************
+*** 18,24 ****
+ configElements = None
+
+ # Declare global variables for configuration as dictionary
+! options = { "gmailusername":None, "gmailpassword":None, "browserpath":"firefox", "lang":"English",
+ "voffset":0, "hoffset":0, "checkinterval":20000,
+ "animationdelay":15, "popuptimespan":5000}
+
+--- 18,24 ----
+ configElements = None
+
+ # Declare global variables for configuration as dictionary
+! options = { "gmailusername":None, "gmailpassword":None, "browserpath":"firefox", "lang":"English", "actionpath":"play",
+ "voffset":0, "hoffset":0, "checkinterval":20000,
+ "animationdelay":15, "popuptimespan":5000}
+
+***************
+*** 36,43 ****
+ self.window.set_title( self.lang.get_string(1) )
+ self.window.set_border_width( 5 )
+ self.window.set_position( gtk.WIN_POS_CENTER )
+! self.window.set_modal( gtk.TRUE )
+! self.window.set_resizable(gtk.FALSE)
+ icon = gtk.gdk.pixbuf_new_from_file(ICON_PATH)
+ gtk.window_set_default_icon_list( (icon) )
+
+--- 36,43 ----
+ self.window.set_title( self.lang.get_string(1) )
+ self.window.set_border_width( 5 )
+ self.window.set_position( gtk.WIN_POS_CENTER )
+! self.window.set_modal( True )
+! self.window.set_resizable(False)
+ icon = gtk.gdk.pixbuf_new_from_file(ICON_PATH)
+ gtk.window_set_default_icon_list( (icon) )
+
+***************
+*** 49,54 ****
+--- 49,55 ----
+ ["gmailusername",2,None,None],
+ ["gmailpassword",22,None,None],
+ ["browserpath",3,None,None],
++ ["actionpath",99,None,None],
+ ["voffset",28,None,None],
+ ["hoffset",27,None,None],
+ ["checkinterval",31,None,None],
+***************
+*** 57,63 ****
+ ]
+
+ # Create table and attach to window
+! table = gtk.Table( rows=11, columns=2, homogeneous=gtk.FALSE )
+
+ self.window.add(table)
+
+--- 58,64 ----
+ ]
+
+ # Create table and attach to window
+! table = gtk.Table( rows=12, columns=2, homogeneous=False )
+
+ self.window.add(table)
+
+***************
+*** 74,80 ****
+ textbox.set_text( str( self.options[curVar] ) )
+
+ if ( curVar == "gmailpassword" ):
+! textbox.set_visibility( gtk.FALSE )
+ textbox.set_invisible_char( '*' )
+
+ # Store widget in element array
+--- 75,81 ----
+ textbox.set_text( str( self.options[curVar] ) )
+
+ if ( curVar == "gmailpassword" ):
+! textbox.set_visibility( False )
+ textbox.set_invisible_char( '*' )
+
+ # Store widget in element array
+***************
+*** 109,120 ****
+
+
+ if ( self.readLoginFromFile ):
+! self.savePassword.set_active( gtk.TRUE )
+ else:
+! self.savePassword.set_active( gtk.FALSE )
+
+ self.savePassword.show()
+! table.attach( alignment, 0, 2, 9, 10 )
+ alignment.show()
+
+ # Add combobox to select language
+--- 110,121 ----
+
+
+ if ( self.readLoginFromFile ):
+! self.savePassword.set_active( True )
+ else:
+! self.savePassword.set_active( False )
+
+ self.savePassword.show()
+! table.attach( alignment, 0, 2, 10, 11 )
+ alignment.show()
+
+ # Add combobox to select language
+***************
+*** 129,142 ****
+ self.cbo_langs.append_text( one_lang.get_name())
+ self.cbo_langs.set_active(0)
+ # Attach combobox and label
+! table.attach( self.lbl_langs, 0, 1, 8, 9 )
+ self.lbl_langs.show()
+! table.attach( self.cbo_langs, 1, 2, 8, 9, ypadding=5 )
+ self.cbo_langs.show()
+
+ # Add 'Close' button
+ button = gtk.Button( stock=gtk.STOCK_OK )
+! table.attach( button, 0, 2, 10, 11, ypadding=2 )
+ button.connect( "clicked", self.onOkay )
+ button.show()
+
+--- 130,143 ----
+ self.cbo_langs.append_text( one_lang.get_name())
+ self.cbo_langs.set_active(0)
+ # Attach combobox and label
+! table.attach( self.lbl_langs, 0, 1, 9, 10 )
+ self.lbl_langs.show()
+! table.attach( self.cbo_langs, 1, 2, 9, 10, xpadding=0, ypadding=5 )
+ self.cbo_langs.show()
+
+ # Add 'Close' button
+ button = gtk.Button( stock=gtk.STOCK_OK )
+! table.attach( button, 0, 2, 11, 12, xpadding=0, ypadding=2 )
+ button.connect( "clicked", self.onOkay )
+ button.show()
+
+***************
+*** 206,212 ****
+ def onDelete( self, widget, data=None ):
+ gtk.main_quit()
+ self.hide()
+! return gtk.TRUE
+
+ def onOkay( self, widget, callback_data=None ):
+ errorString = ""
+--- 207,213 ----
+ def onDelete( self, widget, data=None ):
+ gtk.main_quit()
+ self.hide()
+! return True
+
+ def onOkay( self, widget, callback_data=None ):
+ errorString = ""
diff --git a/mail/gmail-notify/files/patch-langs.xml b/mail/gmail-notify/files/patch-langs.xml
new file mode 100644
index 000000000000..95129ccde0d2
--- /dev/null
+++ b/mail/gmail-notify/files/patch-langs.xml
@@ -0,0 +1,21 @@
+*** langs.xml.orig Tue May 3 10:02:33 2005
+--- langs.xml Tue Jun 7 15:28:53 2005
+***************
+*** 33,38 ****
+--- 33,39 ----
+ <string id="32">Conns time span</string>
+ <string id="33">Some value is missing</string>
+ <string id="34">Save username and password</string>
++ <string id="99" >Action path:</string>
+ </lang>
+ <lang name="Español">
+ <string id="1" >Configuración de Gmail Notifier</string>
+***************
+*** 67,71 ****
+--- 68,73 ----
+ <string id="32">Intervalo e/conexiones</string>
+ <string id="33">Falta completar algún valor</string>
+ <string id="34">Guardar nombre de usuario y contraseña</string>
++ <string id="99" >Acción</string>
+ </lang>
+ </langs>
diff --git a/mail/gmail-notify/files/patch-notifier.conf.sample b/mail/gmail-notify/files/patch-notifier.conf.sample
new file mode 100644
index 000000000000..92b499278e34
--- /dev/null
+++ b/mail/gmail-notify/files/patch-notifier.conf.sample
@@ -0,0 +1,13 @@
+*** notifier.conf.sample.ori Tue Jun 7 13:29:16 2005
+--- notifier.conf.sample Tue Jun 7 13:35:44 2005
+***************
+*** 7,12 ****
+--- 7,14 ----
+
+ browserpath="your_browser_path"
+
++ actionpath="action_to_do_when_new_mails"
++
+ voffset=48
+ hoffset=128
+
diff --git a/mail/gmail-notify/files/patch-notifier.py b/mail/gmail-notify/files/patch-notifier.py
new file mode 100644
index 000000000000..e275f4d37cb7
--- /dev/null
+++ b/mail/gmail-notify/files/patch-notifier.py
@@ -0,0 +1,46 @@
+*** notifier.py.orig Tue May 3 10:02:33 2005
+--- notifier.py Thu Jun 23 23:30:03 2005
+***************
+*** 7,13 ****
+ import time
+ import libgmail
+ import os
+! import pytrayicon
+ import sys
+ import warnings
+ import ConfigParser
+--- 7,13 ----
+ import time
+ import libgmail
+ import os
+! import trayicon
+ import sys
+ import warnings
+ import ConfigParser
+***************
+*** 82,88 ****
+ self.popuptimer=0
+ self.waittimer=0
+ # Create the tray icon object
+! self.tray = pytrayicon.TrayIcon(self.lang.get_string(21));
+ self.eventbox = gtk.EventBox()
+ self.tray.add(self.eventbox)
+ self.eventbox.connect("button_press_event", self.tray_icon_clicked)
+--- 82,88 ----
+ self.popuptimer=0
+ self.waittimer=0
+ # Create the tray icon object
+! self.tray = trayicon.TrayIcon(self.lang.get_string(21));
+ self.eventbox = gtk.EventBox()
+ self.tray.add(self.eventbox)
+ self.eventbox.connect("button_press_event", self.tray_icon_clicked)
+***************
+*** 205,210 ****
+--- 205,211 ----
+ self.imageicon = gtk.Image()
+
+ if attrs[1]>0:
++ os.system(self.options['actionpath']+" &")
+ print str(attrs[1])+" new messages"
+ sender = attrs[2]
+ subject= attrs[3]
diff --git a/mail/gmail-notify/pkg-descr b/mail/gmail-notify/pkg-descr
new file mode 100644
index 000000000000..b8a4aee507d1
--- /dev/null
+++ b/mail/gmail-notify/pkg-descr
@@ -0,0 +1,8 @@
+Gmail Notifier is a Linux/Windows alternative for the notifier program released
+by Google. It is written in Python and provides an attractive and simple way to
+check for new mail messages.
+
+WWW: http://sourceforge.net/projects/gmail-notify
+
+- David
+ <djulien.bsd@gmail.com>
diff --git a/mail/gmail-notify/pkg-plist b/mail/gmail-notify/pkg-plist
new file mode 100644
index 000000000000..fd8254fd947a
--- /dev/null
+++ b/mail/gmail-notify/pkg-plist
@@ -0,0 +1,23 @@
+bin/gmail-notifier
+%%DATADIR%%/GmailConfig.py
+%%DATADIR%%/GmailConfig.pyc
+%%DATADIR%%/GmailPopupMenu.py
+%%DATADIR%%/GmailPopupMenu.pyc
+%%DATADIR%%/README
+%%DATADIR%%/constants.py
+%%DATADIR%%/constants.pyc
+%%DATADIR%%/gmail-notify-icon.png
+%%DATADIR%%/background.jpg
+%%DATADIR%%/icon.jpg
+%%DATADIR%%/icon.png
+%%DATADIR%%/icon2.jpg
+%%DATADIR%%/icon2.png
+%%DATADIR%%/langs.xml
+%%DATADIR%%/libgmail.py
+%%DATADIR%%/libgmail.pyc
+%%DATADIR%%/mkconstants.py
+%%DATADIR%%/notifier.py
+%%DATADIR%%/trayicon.so
+%%DATADIR%%/xmllangs.py
+%%DATADIR%%/xmllangs.pyc
+@dirrm %%DATADIR%%