diff --git a/gitso/trunk/AboutWindow.py b/gitso/trunk/AboutWindow.py index 3fe99fd..b35c42a 100644 --- a/gitso/trunk/AboutWindow.py +++ b/gitso/trunk/AboutWindow.py @@ -9,7 +9,7 @@ Gitso is a utility to facilitate the connection of VNC @author: Aaron Gerber ('gerberad') @author: Derek Buranen ('burner') -@copyright: 2008, 2009 +@copyright: 2008 - 2010 Gitso is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,7 +31,7 @@ class InfoPage(wx.Panel): infostring = "Authors:" + "\n\tAaron Gerber\n\tDerek Buranen" infostring = infostring + "\n\nContributors:" + "\n\tNick Verbeck" + "\n\tTroy Frew" - infostring = infostring + "\n\nCopyright (C) 2007 - 2009 by Aaron Gerber and Derek Buranen" + infostring = infostring + "\n\nCopyright (C) 2007 - 2010 by Aaron Gerber and Derek Buranen" if sys.platform == "darwin": infostring = infostring + "\n\n+++++++++++++++++++++++" infostring = infostring + "\nChicken Of The VNC:" diff --git a/gitso/trunk/ArgsParser.py b/gitso/trunk/ArgsParser.py index de57dbe..b56047a 100644 --- a/gitso/trunk/ArgsParser.py +++ b/gitso/trunk/ArgsParser.py @@ -7,7 +7,7 @@ Gitso is a utility to facilitate the connection of VNC @author: Aaron Gerber ('gerberad') @author: Derek Buranen ('burner') -@copyright: 2008, 2009 +@copyright: 2008 - 2010 Gitso is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -59,7 +59,7 @@ class ArgsParser: if sys.argv[i] == '--help': # --help self.HelpMenu() elif sys.argv[i] == '--version': # --version - print "Gitso 0.6 -- Copyright 2007 - 2009 Aaron Gerber and Derek Buranen." + print "Gitso 0.6 -- Copyright 2007 - 2010 Aaron Gerber and Derek Buranen." exit(0) elif sys.argv[i] == '--dev': # --dev print "Running in 'Development Mode'" diff --git a/gitso/trunk/COPYING b/gitso/trunk/COPYING index 7ffa8ea..20a3642 100644 --- a/gitso/trunk/COPYING +++ b/gitso/trunk/COPYING @@ -1,6 +1,6 @@ Gisto - Gitso is to support others -Copyright 2008, 2009: Aaron Gerber, Derek Buranen +Copyright 2008 - 2010: Aaron Gerber, Derek Buranen Gitso is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gitso/trunk/ConnectionWindow.py b/gitso/trunk/ConnectionWindow.py index cbd4ad8..9b9349f 100644 --- a/gitso/trunk/ConnectionWindow.py +++ b/gitso/trunk/ConnectionWindow.py @@ -7,7 +7,7 @@ Gitso is a utility to facilitate the connection of VNC @author: Aaron Gerber ('gerberad') @author: Derek Buranen ('burner') -@copyright: 2008, 2009 +@copyright: 2008 - 2010 Gitso is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gitso/trunk/Gitso.py b/gitso/trunk/Gitso.py index 265ffff..755d34a 100644 --- a/gitso/trunk/Gitso.py +++ b/gitso/trunk/Gitso.py @@ -7,7 +7,7 @@ Gitso is a utility to facilitate the connection of VNC @author: Aaron Gerber ('gerberad') @author: Derek Buranen ('burner') -@copyright: 2008, 2009 +@copyright: 2008 - 2010 Gitso is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gitso/trunk/GitsoThread.py b/gitso/trunk/GitsoThread.py index 364bf2e..f4e1443 100755 --- a/gitso/trunk/GitsoThread.py +++ b/gitso/trunk/GitsoThread.py @@ -7,7 +7,7 @@ Gitso is a utility to facilitate the connection of VNC @author: Aaron Gerber ('gerberad') @author: Derek Buranen ('burner') -@copyright: 2008, 2009 +@copyright: 2008 - 2010 Gitso is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gitso/trunk/Processes.py b/gitso/trunk/Processes.py index 7385ed7..7eba480 100644 --- a/gitso/trunk/Processes.py +++ b/gitso/trunk/Processes.py @@ -7,7 +7,7 @@ Gitso is a utility to facilitate the connection of VNC @author: Aaron Gerber ('gerberad') @author: Derek Buranen ('burner') -@copyright: 2008, 2009 +@copyright: 2008 - 2010 Gitso is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gitso/trunk/arch/linux/build_rpm.sh b/gitso/trunk/arch/linux/build_rpm.sh index 3f3d9a0..6a74193 100755 --- a/gitso/trunk/arch/linux/build_rpm.sh +++ b/gitso/trunk/arch/linux/build_rpm.sh @@ -1,11 +1,15 @@ #! /bin/bash -echo -e "Setting up RPM build-root!" +# Check parameters if test "$1" = ""; then echo -e "************************\nError: No arguments were given to build_rpm.sh\n************************\n" + exit 1 fi -BUILD_ROOT="$1/rpm/tmp/gitso-root" +echo -e "Setting up RPM build-root!\n\t" +echo -e "'$1'\n" + +BUILD_ROOT="$HOME/rpmbuild/BUILDROOT/gitso-0.6-1.i386" mkdir -p $BUILD_ROOT/usr/bin/ mkdir -p $BUILD_ROOT/usr/share/gitso/ @@ -18,7 +22,7 @@ cp arch/linux/gitso $BUILD_ROOT/usr/bin/ chmod 755 $BUILD_ROOT/usr/bin/gitso cp arch/linux/gitso.desktop $BUILD_ROOT/usr/share/applications/ -cp copyright $BUILD_ROOT/usr/share/doc/gitso/ +cp COPYING $BUILD_ROOT/usr/share/doc/gitso/ cp arch/linux/README.txt $BUILD_ROOT/usr/share/doc/gitso/README gzip -cf arch/linux/changelog > $BUILD_ROOT/usr/share/doc/gitso/changelog.gz @@ -35,4 +39,3 @@ cp icon.png $BUILD_ROOT/usr/share/gitso/ gzip -cf arch/linux/gitso.1 > $BUILD_ROOT/usr/share/man/man1/gitso.1.gz - diff --git a/gitso/trunk/arch/linux/gitso_rpm_fedora.spec b/gitso/trunk/arch/linux/gitso_rpm_fedora.spec index 3c8754a..0439175 100644 --- a/gitso/trunk/arch/linux/gitso_rpm_fedora.spec +++ b/gitso/trunk/arch/linux/gitso_rpm_fedora.spec @@ -1,24 +1,23 @@ - -%define _topdir %(echo $HOME)/rpm +%define _topdir %(echo $HOME)/rpm %define _tmppath %{_topdir}/tmp %define _prefix /usr/share %define _defaultdocdir %{_prefix}/doc %define _mandir %{_prefix}/man -%define buildroot %{_tmppath}/gitso-root +%define buildroot %{_tmppath}/gitso-root -Name: gitso +Name: gitso Summary: Gitso - Is to Support Others Version: 0.6 Release: 1 License: GPL 3 Group: Internet Source: http://gitso.googlecode.com/files/gitso_0.6_src.tar.bz2 -URL: http://code.google.com/p/gitso/ +URL: http://code.google.com/p/gitso/ -Requires: python, vnc, vnc-server, wxGTK, wxPython -Buildroot: %{_tmppath}/gitso-root -Packager: Aaron Gerber +Requires: python, vnc, x11vnc, vnc-server, wxGTK, wxPython +Buildroot: %{_tmppath}/gitso-root +Packager: Aaron Gerber @@ -41,20 +40,20 @@ simple two-step process that connects one person to another's screen. %{_prefix}/applications/gitso.desktop -%{_prefix}/doc/gitso/copyright +%{_prefix}/doc/gitso/COPYING %{_prefix}/doc/gitso/README %{_prefix}/doc/gitso/changelog.gz -%{_prefix}/gitso/icon.png -%{_prefix}/gitso/ArgsParser.py -%{_prefix}/gitso/__init__.py -%{_prefix}/gitso/hosts.txt -%{_prefix}/gitso/AboutWindow.py +%{_prefix}/gitso/Gitso.py %{_prefix}/gitso/ConnectionWindow.py +%{_prefix}/gitso/AboutWindow.py %{_prefix}/gitso/GitsoThread.py -%{_prefix}/gitso/Gitso.py %{_prefix}/gitso/Processes.py +%{_prefix}/gitso/ArgsParser.py +%{_prefix}/gitso/__init__.py +%{_prefix}/gitso/hosts.txt %{_prefix}/gitso/icon.ico +%{_prefix}/gitso/icon.png %{_mandir}/man1/gitso.1.gz diff --git a/gitso/trunk/gitso.svg b/gitso/trunk/gitso.svg deleted file mode 100644 index d0df231..0000000 --- a/gitso/trunk/gitso.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/gitso/trunk/makegitso.nsi b/gitso/trunk/makegitso.nsi index 99645ac..4b5716a 100644 --- a/gitso/trunk/makegitso.nsi +++ b/gitso/trunk/makegitso.nsi @@ -2,7 +2,7 @@ ; ---------------- ; Package Gitso for Windows using NSIS ; -; Copyright 2008, 2009: Aaron Gerber and Derek Buranen +; Copyright 2008 - 2010: Aaron Gerber and Derek Buranen ; ; Gitso is free software: you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by diff --git a/gitso/trunk/makegitso.sh b/gitso/trunk/makegitso.sh index 6b26475..eb6cb5f 100755 --- a/gitso/trunk/makegitso.sh +++ b/gitso/trunk/makegitso.sh @@ -3,7 +3,7 @@ ########## # Gisto - Gitso is to support others # -# Copyright 2008, 2009: Aaron Gerber, Derek Buranen +# Copyright 2008 - 2010: Aaron Gerber, Derek Buranen # # Gitso is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,18 +20,33 @@ ########## -DMG_OSX_106="Gitso_0.6_SnowLeopard.dmg" -DMG_OSX_105="Gitso_0.6_Leopard.dmg" -DEB="gitso_0.6_all.deb" -TARGZ="gitso_0.6_all.tar.gz" -SRC="gitso_0.6_src.tar.bz2" -RPM="gitso-0.6-1.i586.rpm" -RPMOUT="gitso_0.6-1_opensuse.i586.rpm" +## +# Helper methods +############################ + +# +# Creates the source package, works on all UNIX/LINUX based platforms +# function mksrc { P=`pwd` TMP_PKG="../pkg" + + # Clean up first. + find . -name "*~" -exec rm {} ';' + rm -rf $OSX_BUILD_DIR + rm -rf $RPM_BUILD_DIR + rm -rf $DEB_BUILD_DIR + rm -rf $DEB_TARGZ_PATH + rm -rf $P/*.bz2 + rm -rf $P/*.tar + rm -rf $P/*.gz + rm -rf $P/*.app + rm -rf $P/*.dmg + rm -rf $P/*.exe rm -rf $TMP_PKG + + # Create the SRC file mkdir -p $TMP_PKG/trunk/ cp -r ./ $TMP_PKG/trunk/ find $TMP_PKG/trunk -name ".svn" -exec rm -rf {} 2>&1 > /dev/null ';' 2>&1 > /dev/null @@ -40,10 +55,15 @@ function mksrc { rm -rf $TMP_PKG } + +# +# Create the .app folder for snow leopard, it uses a different version of pythong +# And because py2app needs to know there, we just use different config files. +# function snowLeopardDMG { echo -e "Creating Gitso.app " rm -f setup.py - rm -rf dist + rm -rf $OSX_BUILD_DIR #echo -e ".." #py2applet --make-setup Gitso.py @@ -57,145 +77,182 @@ function snowLeopardDMG { #rm setup.py echo -e ".." - cp arch/osx/Info_OSX-10.6.plist dist/Gitso.app/Contents/ + cp arch/osx/Info_OSX-10.6.plist $OSX_BUILD_DIR/Gitso.app/Contents/ - cp COPYING dist/Gitso.app/Contents/Resources/ - cp PythonApplet.icns dist/Gitso.app/Contents/Resources/ + cp COPYING $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp PythonApplet.icns $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ tar xvfz arch/osx/OSXvnc.tar.gz - mv OSXvnc dist/Gitso.app/Contents/Resources/ + mv OSXvnc $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ tar xvfz arch/osx/cotvnc.app.tar.gz - mv cotvnc.app dist/Gitso.app/Contents/Resources/ - - cp icon.ico dist/Gitso.app/Contents/Resources/ - cp icon.png dist/Gitso.app/Contents/Resources/ - cp __init__.py dist/Gitso.app/Contents/Resources/ - cp ArgsParser.py dist/Gitso.app/Contents/Resources/ - cp Processes.py dist/Gitso.app/Contents/Resources/ - cp ConnectionWindow.py dist/Gitso.app/Contents/Resources/ - cp AboutWindow.py dist/Gitso.app/Contents/Resources/ - cp GitsoThread.py dist/Gitso.app/Contents/Resources/ - - cp arch/osx/libjpeg-copyright.txt dist/Gitso.app/Contents/Frameworks/ - cp arch/osx/osxnvc_echoware-copyright.txt dist/Gitso.app/Contents/Resources/OSXvnc/ - cp arch/osx/cotvnc-copyright.txt dist/Gitso.app/Contents/Resources/cotvnc.app/contents/Resources - cp arch/osx/osxvnc-copyright.txt dist/Gitso.app/Contents/Resources/OSXvnc/ + mv cotvnc.app $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + + cp icon.ico $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp icon.png $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp __init__.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp ArgsParser.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp Processes.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp ConnectionWindow.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp AboutWindow.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp GitsoThread.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + + cp arch/osx/libjpeg-copyright.txt $OSX_BUILD_DIR/Gitso.app/Contents/Frameworks/ + cp arch/osx/osxnvc_echoware-copyright.txt $OSX_BUILD_DIR/Gitso.app/Contents/Resources/OSXvnc/ + cp arch/osx/cotvnc-copyright.txt $OSX_BUILD_DIR/Gitso.app/Contents/Resources/cotvnc.app/contents/Resources + cp arch/osx/osxvnc-copyright.txt $OSX_BUILD_DIR/Gitso.app/Contents/Resources/OSXvnc/ echo -e " [done]\n" echo -e "Creating $DMG_OSX_106" rm -f $DMG_OSX_106 - mkdir dist/Gitso - cp arch/osx/dmg_DS_Store dist/Gitso/.DS_Store - ln -s /Applications/ dist/Gitso/Applications + mkdir $OSX_BUILD_DIR/Gitso + cp arch/osx/dmg_DS_Store $OSX_BUILD_DIR/Gitso/.DS_Store + ln -s /Applications/ $OSX_BUILD_DIR/Gitso/Applications - mv "dist/Gitso.app" "dist/Gitso/" - cp -r arch/osx/Readme.rtfd dist/Gitso/Readme.rtfd + mv "$OSX_BUILD_DIR/Gitso.app" "$OSX_BUILD_DIR/Gitso/" + cp -r arch/osx/Readme.rtfd $OSX_BUILD_DIR/Gitso/Readme.rtfd echo -e "..." - hdiutil create -srcfolder dist/Gitso/ $DMG_OSX_106 + hdiutil create -srcfolder $OSX_BUILD_DIR/Gitso/ $DMG_OSX_106 echo -e "... [done]\n" } + +# +# Create the .app folder for Leopard, it uses a different version of pythong +# And because py2app needs to know there, we just use different config files. +# function LeopardDMG { echo -e "Creating Gitso.app " rm -f setup.py - rm -rf dist + rm -rf $OSX_BUILD_DIR echo -e ".." python arch/osx/setup.py py2app echo -e ".." - cp arch/osx/Info_OSX-10.5.plist dist/Gitso.app/Contents/ + cp arch/osx/Info_OSX-10.5.plist $OSX_BUILD_DIR/Gitso.app/Contents/ - cp COPYING dist/Gitso.app/Contents/Resources/ - cp PythonApplet.icns dist/Gitso.app/Contents/Resources/ + cp COPYING $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp PythonApplet.icns $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ tar xvfz arch/osx/OSXvnc.tar.gz - mv OSXvnc dist/Gitso.app/Contents/Resources/ + mv OSXvnc $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ tar xvfz arch/osx/cotvnc.app.tar.gz - mv cotvnc.app dist/Gitso.app/Contents/Resources/ - - cp icon.ico dist/Gitso.app/Contents/Resources/ - cp icon.png dist/Gitso.app/Contents/Resources/ - cp __init__.py dist/Gitso.app/Contents/Resources/ - cp ArgsParser.py dist/Gitso.app/Contents/Resources/ - cp Processes.py dist/Gitso.app/Contents/Resources/ - cp ConnectionWindow.py dist/Gitso.app/Contents/Resources/ - cp AboutWindow.py dist/Gitso.app/Contents/Resources/ - cp GitsoThread.py dist/Gitso.app/Contents/Resources/ - - cp arch/osx/libjpeg-copyright.txt dist/Gitso.app/Contents/Frameworks/ - cp arch/osx/osxnvc_echoware-copyright.txt dist/Gitso.app/Contents/Resources/OSXvnc/ - cp arch/osx/cotvnc-copyright.txt dist/Gitso.app/Contents/Resources/cotvnc.app/contents/Resources - cp arch/osx/osxvnc-copyright.txt dist/Gitso.app/Contents/Resources/OSXvnc/ + mv cotvnc.app $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + + cp icon.ico $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp icon.png $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp __init__.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp ArgsParser.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp Processes.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp ConnectionWindow.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp AboutWindow.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + cp GitsoThread.py $OSX_BUILD_DIR/Gitso.app/Contents/Resources/ + + cp arch/osx/libjpeg-copyright.txt $OSX_BUILD_DIR/Gitso.app/Contents/Frameworks/ + cp arch/osx/osxnvc_echoware-copyright.txt $OSX_BUILD_DIR/Gitso.app/Contents/Resources/OSXvnc/ + cp arch/osx/cotvnc-copyright.txt $OSX_BUILD_DIR/Gitso.app/Contents/Resources/cotvnc.app/contents/Resources + cp arch/osx/osxvnc-copyright.txt $OSX_BUILD_DIR/Gitso.app/Contents/Resources/OSXvnc/ echo -e " [done]\n" echo -e "Creating $DMG_OSX_105" rm -f $DMG_OSX_105 - mkdir dist/Gitso - cp arch/osx/dmg_DS_Store dist/Gitso/.DS_Store - ln -s /Applications/ dist/Gitso/Applications + mkdir $OSX_BUILD_DIR/Gitso + cp arch/osx/dmg_DS_Store $OSX_BUILD_DIR/Gitso/.DS_Store + ln -s /Applications/ $OSX_BUILD_DIR/Gitso/Applications - mv "dist/Gitso.app" "dist/Gitso/" - cp -r arch/osx/Readme.rtfd dist/Gitso/Readme.rtfd + mv "$OSX_BUILD_DIR/Gitso.app" "$OSX_BUILD_DIR/Gitso/" + cp -r arch/osx/Readme.rtfd $OSX_BUILD_DIR/Gitso/Readme.rtfd echo -e "..." - hdiutil create -srcfolder dist/Gitso/ $DMG_OSX_105 + hdiutil create -srcfolder $OSX_BUILD_DIR/Gitso/ $DMG_OSX_105 echo -e "... [done]\n" } -CLEAN="yes" -RPMNAME="opensuse" -echo -n "Starting makegitso:" - -if [ "$1" = "" ]; then - echo -n ".." -elif test "$1" = "--no-clean"; then - CLEAN="no" -elif test "$1" = "--fedora"; then - RPMNAME="fedora" - RPMOUT="gitso_0.6-1_fedora.i386.rpm" -elif test "$1" = "--opensuse"; then - RPMNAME="opensuse" -else - echo -e "Usage makegitso.sh: [ --no-clean | --fedora | --opensuse | --help ]" - echo -e "\tOptions:" +# +# Displays the help menu +# +function helpMenu { + echo -e "Usage makegitso.sh: [ BUILD OPTIONS ] [ OPTIONS ]" + echo -e "\tBUILD OPTIONS" + echo -e "\t--fedora\tMake package for Fedora. (only avaible on Fedora)" + echo -e "\t--opensuse\tMake package for OpenSUSE. (only avaible on OpenSUSE)" + echo -e "\t--source\tMake the source package. (All UNIX/Linux systems)\n" + echo -e "\tOPTIONS:" echo -e "\t--no-clean\tDo not remove the build directory." - echo -e "\t--fedora\tMake Build for Fedora." - echo -e "\t--opensuse\tMake Build for OpenSUSE." echo -e "\t--help \tThese options." exit 0 -fi -if [ "$2" = "" ]; then - echo ".." -elif test "$2" = "--no-clean"; then - CLEAN="no" - echo ".." -elif test "$2" = "--fedora"; then - RPMNAME="fedora" - RPMOUT="gitso_0.6-1_fedora.i386.rpm" - echo ".." -elif test "$2" = "--opensuse"; then - RPMNAME="opensuse" - echo ".." -else - echo -e "Usage makegitso.sh: [ --no-clean | --fedora | --opensuse | --help ]" - echo -e "\tOptions:" - echo -e "\t--no-clean\tDo not remove the build directory." - echo -e "\t--help \tThese options." - exit 0 +} + + +## +# Initialize values +############################ +DMG_OSX_106="Gitso_0.6_SnowLeopard.dmg" +DMG_OSX_105="Gitso_0.6_Leopard.dmg" +DEB="gitso_0.6_all.deb" +TARGZ="gitso_0.6_all.tar.gz" +SRC="gitso_0.6_src.tar.bz2" +RPM="gitso-0.6-1.i586.rpm" +RPMOUT="gitso_0.6-1_opensuse.i586.rpm" + +OSX_BUILD_DIR=`pwd`"/dist" +RPM_BUILD_DIR=`pwd`"/build" +DEB_BUILD_DIR="gitso" +DEB_TARGZ_PATH="Gitso" + +CLEAN="yes" +RPMNAME="opensuse" +USESRC="no" + + +## +# Get Comman line arguments +############################ +if test "$1" = ""; then + helpMenu fi -if [ "`uname -a | grep Darwin`" != "" ]; then +for param in "$@" +do +if test "${param}" = "--no-clean"; then + CLEAN="no" + elif test "${param}" = "--fedora"; then + RPMNAME="fedora" + RPMOUT="gitso_0.6-1_fedora.i386.rpm" + elif test "${param}" = "--opensuse"; then + RPMNAME="opensuse" + elif test "${param}" = "--opensuse"; then + RPMNAME="opensuse" + elif test "${param}" = "--source"; then + USESRC="yes" + else + helpMenu + fi +done + + +## +# Create packages! +######################## +if [ "$USESRC" = "yes" ]; then + # Creating the source + echo -n "Creating gitso $SRC...." + mksrc + echo -e " [done]\n" + +elif [ "`uname -a | grep Darwin`" != "" ]; then + #We're on OS X + if test `which py2applet`; then # To Make cotvnc # cvs -z3 -d:pserver:anonymous@cotvnc.cvs.sourceforge.net:/cvsroot/cotvnc co -P cotvnc @@ -218,77 +275,68 @@ if [ "`uname -a | grep Darwin`" != "" ]; then fi elif test "`uname -a 2>&1 | grep Linux | grep -v which`"; then - if test "`which dpkg 2>&1 | grep -v which`"; then - BUILDPATH="gitso" - TARGZPATH="Gitso" - echo -n "Creating $DEB" - rm -rf $BUILDPATH - - # Deb version of Gitso. - mkdir -p $BUILDPATH/DEBIAN - mkdir -p $BUILDPATH/usr/bin - mkdir -p $BUILDPATH/usr/share/applications - mkdir -p $BUILDPATH/usr/share/doc/$BUILDPATH - mkdir -p $BUILDPATH/usr/share/$BUILDPATH - mkdir -p $BUILDPATH/usr/share/man/man1 - - echo -n ".." - cp arch/linux/control $BUILDPATH/DEBIAN - cp arch/linux/gitso $BUILDPATH/usr/bin/ - chmod 755 $BUILDPATH/usr/bin/gitso - cp Gitso.py $BUILDPATH/usr/share/$BUILDPATH/ - cp ConnectionWindow.py $BUILDPATH/usr/share/$BUILDPATH/ - cp AboutWindow.py $BUILDPATH/usr/share/$BUILDPATH/ - cp GitsoThread.py $BUILDPATH/usr/share/$BUILDPATH/ - cp Processes.py $BUILDPATH/usr/share/$BUILDPATH/ - cp ArgsParser.py $BUILDPATH/usr/share/$BUILDPATH/ - cp __init__.py $BUILDPATH/usr/share/$BUILDPATH/ - cp hosts.txt $BUILDPATH/usr/share/$BUILDPATH/ - cp icon.ico $BUILDPATH/usr/share/$BUILDPATH/ - cp icon.png $BUILDPATH/usr/share/$BUILDPATH/ - - echo -n ".." - cp arch/linux/gitso.desktop $BUILDPATH/usr/share/applications/ - cp arch/linux/README.txt $BUILDPATH/usr/share/doc/$BUILDPATH/README - cp COPYING $BUILDPATH/usr/share/doc/$BUILDPATH/ - gzip -cf arch/linux/changelog > $BUILDPATH/usr/share/doc/$BUILDPATH/changelog.gz - gzip -cf arch/linux/gitso.1 > $BUILDPATH/usr/share/man/man1/gitso.1.gz - - echo -n ".." - dpkg -b $BUILDPATH/ $DEB 2>&1 > /dev/null - - echo -e " [done]" - - # Standalone version of Gitso. - echo -n "Creating $TARGZ" - rm -rf $TARGZPATH - - cp -r $BUILDPATH $TARGZPATH - rm -rf $TARGZPATH/DEBIAN - - echo -n ".." - cp arch/linux/README-stand-alone.txt $TARGZPATH/README - cp arch/linux/run-gitso.sh $TARGZPATH/ - mv $TARGZPATH/usr/bin $TARGZPATH/bin - mv $TARGZPATH/usr/share $TARGZPATH/share - rm -rf $TARGZPATH/usr/ - - echo -n "." - tar -cvzf $TARGZ $TARGZPATH 2>&1 > /dev/null + #We're on Linux - echo -e " [done]\n" - - echo -n "Creating gitso $SRC...." - mksrc - echo -e " [done]\n" - - - if [ "$CLEAN" = "yes" ]; then - rm -rf $BUILDPATH - rm -rf $TARGZPATH - find . -name "*.pyc" -exec rm {} ';' - fi + if test "`which dpkg 2>&1 | grep -v which`"; then + # Deb version of Gitso. + echo -n "Creating $DEB" + rm -rf $DEB_BUILD_DIR + + mkdir -p $DEB_BUILD_DIR/DEBIAN + mkdir -p $DEB_BUILD_DIR/usr/bin + mkdir -p $DEB_BUILD_DIR/usr/share/applications + mkdir -p $DEB_BUILD_DIR/usr/share/doc/$DEB_BUILD_DIR + mkdir -p $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR + mkdir -p $DEB_BUILD_DIR/usr/share/man/man1 + + echo -n ".." + cp arch/linux/control $DEB_BUILD_DIR/DEBIAN + cp arch/linux/gitso $DEB_BUILD_DIR/usr/bin/ + chmod 755 $DEB_BUILD_DIR/usr/bin/gitso + cp Gitso.py $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + cp ConnectionWindow.py $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + cp AboutWindow.py $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + cp GitsoThread.py $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + cp Processes.py $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + cp ArgsParser.py $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + cp __init__.py $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + cp hosts.txt $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + cp icon.ico $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + cp icon.png $DEB_BUILD_DIR/usr/share/$DEB_BUILD_DIR/ + + echo -n ".." + cp arch/linux/gitso.desktop $DEB_BUILD_DIR/usr/share/applications/ + cp arch/linux/README.txt $DEB_BUILD_DIR/usr/share/doc/$DEB_BUILD_DIR/README + cp COPYING $DEB_BUILD_DIR/usr/share/doc/$DEB_BUILD_DIR/ + gzip -cf arch/linux/changelog > $DEB_BUILD_DIR/usr/share/doc/$DEB_BUILD_DIR/changelog.gz + gzip -cf arch/linux/gitso.1 > $DEB_BUILD_DIR/usr/share/man/man1/gitso.1.gz + + echo -n ".." + dpkg -b $DEB_BUILD_DIR/ $DEB 2>&1 > /dev/null + + echo -e " [done]" + + # Standalone version of Gitso. + echo -n "Creating $TARGZ" + rm -rf $DEB_TARGZ_PATH + + cp -r $DEB_BUILD_DIR $DEB_TARGZ_PATH + rm -rf $DEB_TARGZ_PATH/DEBIAN + + echo -n ".." + cp arch/linux/README-stand-alone.txt $DEB_TARGZ_PATH/README + cp arch/linux/run-gitso.sh $DEB_TARGZ_PATH/ + mv $DEB_TARGZ_PATH/usr/bin $DEB_TARGZ_PATH/bin + mv $DEB_TARGZ_PATH/usr/share $DEB_TARGZ_PATH/share + rm -rf $DEB_TARGZ_PATH/usr/ + + echo -n "." + tar -cvzf $TARGZ $DEB_TARGZ_PATH 2>&1 > /dev/null + + echo -e " [done]\n" + elif test "`which rpm 2>&1 | grep -v which`"; then + # RPM version of Gitso if [ "$RPMNAME" = "fedora" ]; then SPEC="gitso_rpm_fedora.spec" # Before installing the .rpm @@ -297,31 +345,40 @@ elif test "`uname -a 2>&1 | grep Linux | grep -v which`"; then else SPEC="gitso_rpm.spec" fi - # RPM version of Gitso - echo "Creating $RPM" - BUILD_DIR=`pwd` - export BUILD_DIR="$BUILD_DIR/build" - TMP="$BUILD_DIR/rpm/tmp" - BUILD_ROOT="$BUILD_DIR/rpm/tmp/gitso-root" - mkdir -p $BUILD_DIR/rpm/{BUILD,RPMS/$ARCH,RPMS/noarch,SOURCES,SRPMS,SPECS,tmp} - mkdir -p $BUILD_ROOT + echo "Creating $RPM" + export RPM_BUILD_DIR=$RPM_BUILD_DIR + TMP="$RPM_BUILD_DIR/rpm/tmp" + BUILD_ROOT="$RPM_BUILD_DIR/rpm/tmp/gitso-root" + # We need this because the rpmbuild below needs to the source ball. + # Also realize that mksrc is going to clean-up, so if you creat dist files before this line + # They will be deleted. mksrc + + mkdir -p $RPM_BUILD_DIR/rpm/{BUILD,RPMS/$ARCH,RPMS/noarch,SOURCES,SRPMS,SPECS,tmp} + mkdir -p $BUILD_ROOT - cp $SRC $BUILD_DIR/rpm/SOURCES/$SRC + cp $SRC $RPM_BUILD_DIR/rpm/SOURCES/$SRC cp arch/linux/$SPEC $TMP - perl -e 's/%\(echo \$HOME\)/$ENV{'BUILD_DIR'}/g;' -pi $TMP/$SPEC + perl -e 's/%\(echo \$HOME\)/$ENV{'RPM_BUILD_DIR'}/g;' -pi $TMP/$SPEC rpmbuild -ba $TMP/$SPEC - find $BUILD_DIR/rpm/RPMS -name "*.rpm" -exec cp {} $RPMOUT ';' + find $RPM_BUILD_DIR/rpm/RPMS -name "*.rpm" -exec cp {} $RPMOUT ';' echo -e " [done]\n" - if [ "$CLEAN" = "yes" ]; then - rm -rf $BUILD_DIR - find . -name "*.pyc" -exec rm {} ';' - fi - fi + fi + +# Clean up +if [ "$CLEAN" = "yes" ]; then + echo -e "Cleaning up...." + rm -rf $RPM_BUILD_DIR + rm -rf $DEB_BUILD_DIR + rm -rf $DEB_TARGZ_PATH + find . -name "*.pyc" -exec rm {} ';' + echo -e " [done]\n" +fi +