diff --git a/gitso/trunk/arch/linux/build_rpm.sh b/gitso/trunk/arch/linux/build_rpm.sh new file mode 100755 index 0000000..3f3d9a0 --- /dev/null +++ b/gitso/trunk/arch/linux/build_rpm.sh @@ -0,0 +1,38 @@ +#! /bin/bash +echo -e "Setting up RPM build-root!" + +if test "$1" = ""; then + echo -e "************************\nError: No arguments were given to build_rpm.sh\n************************\n" +fi + +BUILD_ROOT="$1/rpm/tmp/gitso-root" + +mkdir -p $BUILD_ROOT/usr/bin/ +mkdir -p $BUILD_ROOT/usr/share/gitso/ +mkdir -p $BUILD_ROOT/usr/share/applications/ +mkdir -p $BUILD_ROOT/usr/share/doc/gitso/ +mkdir -p $BUILD_ROOT/usr/share/man/man1 + +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 arch/linux/README.txt $BUILD_ROOT/usr/share/doc/gitso/README +gzip -cf arch/linux/changelog > $BUILD_ROOT/usr/share/doc/gitso/changelog.gz + +cp Gitso.py $BUILD_ROOT/usr/share/gitso/ +cp ConnectionWindow.py $BUILD_ROOT/usr/share/gitso/ +cp AboutWindow.py $BUILD_ROOT/usr/share/gitso/ +cp GitsoThread.py $BUILD_ROOT/usr/share/gitso/ +cp Processes.py $BUILD_ROOT/usr/share/gitso/ +cp ArgsParser.py $BUILD_ROOT/usr/share/gitso/ +cp __init__.py $BUILD_ROOT/usr/share/gitso/ +cp hosts.txt $BUILD_ROOT/usr/share/gitso/ +cp icon.ico $BUILD_ROOT/usr/share/gitso/ +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.desktop b/gitso/trunk/arch/linux/gitso.desktop index 4cace67..d5028e9 100644 --- a/gitso/trunk/arch/linux/gitso.desktop +++ b/gitso/trunk/arch/linux/gitso.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Version=0.5 +Version=0.6 Encoding=UTF-8 Name=Gitso Name[en_GB]=Gitso diff --git a/gitso/trunk/arch/linux/gitso_rpm.spec b/gitso/trunk/arch/linux/gitso_rpm.spec new file mode 100644 index 0000000..33a7a53 --- /dev/null +++ b/gitso/trunk/arch/linux/gitso_rpm.spec @@ -0,0 +1,63 @@ + +%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 + + +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/ + +Requires: python, x11vnc, tightvnc, wxGTK, python-wxGTK +Buildroot: %{_tmppath}/gitso-root +Packager: Aaron Gerber + + + +%description +Gitso is a frontend to reverse VNC connections. It is meant to be a +simple two-step process that connects one person to another's screen. + +%prep +%setup + +%build + +%install +./arch/linux/build_rpm.sh %(echo $HOME) + +%clean + +%files +/usr/bin/gitso + +%{_prefix}/applications/gitso.desktop + +%{_prefix}/doc/gitso/copyright +%{_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/ConnectionWindow.py +%{_prefix}/gitso/GitsoThread.py +%{_prefix}/gitso/Gitso.py +%{_prefix}/gitso/Processes.py +%{_prefix}/gitso/icon.ico + +%{_mandir}/man1/gitso.1.gz + +%changelog +* Sun Oct 26 2008 Aaron Gerber +- Created RPM diff --git a/gitso/trunk/makegitso.sh b/gitso/trunk/makegitso.sh index e36e54a..43ee78d 100755 --- a/gitso/trunk/makegitso.sh +++ b/gitso/trunk/makegitso.sh @@ -1,5 +1,22 @@ #! /bin/bash +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" + +function mksrc { + P=`pwd` + TMP_PKG="../pkg" + rm -rf $TMP_PKG + 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 + mv $TMP_PKG/trunk $TMP_PKG/gitso-0.6 + tar -cj -C $TMP_PKG/ gitso-0.6 > $P/$SRC + rm -rf $TMP_PKG +} + if [ "$1" = "" ]; then CLEAN="yes" elif test "$1" = "--no-clean"; then @@ -54,8 +71,7 @@ if test `uname -a | grep Darwin`; then fi elif test "`uname -a 2>&1 | grep Linux | grep -v which`"; then - DEB="gitso_0.6_all.deb" - TARGZ="gitso_0.6_all.tar.gz" + if test "`which dpkg 2>&1 | grep -v which`"; then BUILDPATH="gitso" TARGZPATH="Gitso" echo -n "Creating $DEB" @@ -115,10 +131,41 @@ elif test "`uname -a 2>&1 | grep Linux | grep -v which`"; then 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 + elif test "`which rpmbuild 2>&1 | grep -v which`"; then + # 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 + mksrc + + cp $SRC $BUILD_DIR/rpm/SOURCES/$SRC + + cp arch/linux/gitso_rpm.spec $TMP + perl -e 's/%\(echo \$HOME\)/$ENV{'BUILD_DIR'}/g;' -pi $TMP/gitso_rpm.spec + + rpmbuild -ba $TMP/gitso_rpm.spec + cp $BUILD_DIR/rpm/RPMS/i586/$RPM . + echo -e " [done]\n" + if [ "$CLEAN" = "yes" ]; then + rm -rf $BUILD_DIR + find . -name "*.pyc" -exec rm {} ';' + fi + + fi fi