#!/bin/sh usage() { echo Usage: $0 PluginName } echo "Theme template creator" if [ "$#" != "1" ] then usage else fullname=$1 minus=`echo $1 | tr '[A-Z]' '[a-z]'` themedir=gforge-theme-$minus echo "Creating $1 theme" echo "Creating directory $themedir" if [ ! -d $themedir ] then mkdir $themedir mkdir $themedir/debian mkdir $themedir/www mkdir $themedir/www/themes mkdir $themedir/www/themes/$minus echo Creating $themedir/debian/dirs cat > $themedir/debian/dirs < $themedir/debian/README.Debian < $themedir/debian/changelog < Tue, 13 May 2003 23:31:59 +0200 FIN echo Creating $themedir/debian/control cat > $themedir/debian/control < Build-Depends-Indep: debhelper (>= 4.0), sharutils, docbook-to-man Standards-Version: 3.5.8 Package: $themedir Architecture: all Depends: debconf (>= 0.5.00), gforge-common, gforge-web-apache | gforge-web, gforge-db-postgresql | gforge-db Description: Collaborative development tool - theme package GForge provides many tools to help collaboration in a development project, such as bug-tracking, task management, mailing-lists, CVS repository, forums, support request helper, web page / FTP hosting, release management, etc. All these services are integrated into one web site and managed via a nice web interface. . This meta-package installs a gforge theme FIN echo Creating $themedir/debian/copyright cat > $themedir/debian/copyright <. Work has been constant since then, and the package evolved a great deal. It began to work, for a start. Copyright info for the GForge software: +---- | The original sources were downloaded from http://www.sourceforge.net/ | | Authors: The Sourceforge crew at VA Linux. They are many, they | change as time goes by, and they are listed on the Sourceforge | website. Let them be thanked for their work. | | Copyright: | | This software is copyright (c) 1999-2000 by VA Linux. | | You are free to distribute this software under the terms of the GNU | General Public License. +---- The packaging and installing scripts (in the debian/ and deb-specific/ directories amongst others) are copyright (c) 2000-2002 by Christian Bayle and Roland Mas . You are free to use and redistribute them under the terms of the GNU General Public License. The themes are copyright (c) 1999-2000 by VA Linux. The Savannah themes are modified versions, and are copyright (c) 2000-2001 by the Free Software Foundation. They all are free software, and you can redistribute them and/or modify them under the terms of the GNU General Public License. On Debian systems, the complete text of the GNU General Public License can be found in the /usr/share/common-licenses directory. FIN echo Creating $themedir/debian/postinst cat > $themedir/debian/postinst < 'configure' # * 'abort-upgrade' # * 'abort-remove' 'in-favour' # # * 'abort-deconfigure' 'in-favour' # 'removing' # # for details, see /usr/share/doc/packaging-manual/ # # quoting from the policy: # Any necessary prompting should almost always be confined to the # post-installation script, and should be protected with a conditional # so that unnecessary prompting doesn't happen if a package's # installation fails and the 'postinst' is called with 'abort-upgrade', # 'abort-remove' or 'abort-deconfigure'. . /usr/share/debconf/confmodule case "\$1" in configure) # Add the theme /usr/share/gforge/bin/register-theme "$minus" "$fullname" ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \'\$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 FIN echo Creating $themedir/debian/rules cat > $themedir/debian/rules < $themedir/debian/prerm < 'remove' # * 'upgrade' # * 'failed-upgrade' # * 'remove' 'in-favour' # * 'deconfigure' 'in-favour' # 'removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "\$1" in remove|deconfigure) /usr/share/gforge/bin/unregister-theme $minus ;; upgrade|failed-upgrade) ;; *) echo "prerm called with unknown argument \'\$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 FIN echo Creating $themedir/www/themes/$minus/Theme.class cat > $themedir/www/themes/$minus/Theme.class <Layout(); // The root location for images \$this->imgroot = '/themes/gforge/images/'; // The content background color // sky blue \$this->COLOR_CONTENT_BACK= '#BBDDFF'; // The background color \$this->COLOR_BACK= '#FFFFFF'; // The primary light background color // Alternate list \$this->COLOR_LTBACK1= '#C79FA9'; // The secondary light background color \$this->COLOR_LTBACK2= '#E0E0E0'; // The HTML box title color \$this->COLOR_HTMLBOX_TITLE = '#C70036'; // The HTML box background color \$this->COLOR_HTMLBOX_BACK = '#C79FA9'; // Font Face Constants // The content font \$this->FONT_CONTENT = 'Helvetica'; // The HTML box title font \$this->FONT_HTMLBOX_TITLE = 'Helvetica'; // The HTML box title font color \$this->FONTCOLOR_HTMLBOX_TITLE = '#C6BCBF'; // The content font color \$this->FONTCOLOR_CONTENT = '#000000'; //The smaller font size \$this->FONTSIZE_SMALLER='x-small'; //The smallest font size \$this->FONTSIZE_SMALLEST='xx-small'; //The HTML box title font size \$this->FONTSIZE_HTMLBOX_TITLE = 'small'; } /** * header() - "steel theme" top of page * * @param array Header parameters array */ function header(\$params) { if (!\$params['title']) { \$params['title'] = "GForge"; } else { \$params['title'] = "GForge: " . \$params['title']; } ?> <?php echo \$params['title']; ?> getFont(); ?>
'0')); ?> searchBox(); ?> Logout
My Account Login
New Account
  
  outerTabs(\$params); ?>  
  projectTabs(\$params['toptab'],\$params['group']); ?>  
COLOR_HTMLBOX_TITLE.'">
'.\$title.'
'; } /** * boxMiddle() - Middle HTML box * * @param string Box title * @param string The box background color */ function boxMiddle(\$title) { return '
'.\$title.'
'; } /** * boxGetAltRowStyle() - Get an alternating row style for tables * * @param int Row number */ function boxGetAltRowStyle(\$i) { if (\$i % 2 == 0) { return 'BGCOLOR="#FFFFFF"'; } else { return 'BGCOLOR="' . \$this->COLOR_LTBACK1 . '"'; } } /** * boxBottom() - Bottom HTML box * * @param bool Whether to echo or return the results */ function boxBottom() { return '

'; } } // Local Variables: // mode: php // c-file-style: "bsd" // End: ?> FIN fi fi