forked from neymanna/fusionforge
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy delivery packaging tools/tab2po dirs from Novaforge Branch
git-svn-id: svn+ssh://scm.fusionforge.org/srv/svn/fusionforge/trunk@7033 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6
- Loading branch information
cbayle
committed
Feb 22, 2009
1 parent
6a8a544
commit 0530700
Showing
32 changed files
with
9,622 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Version of packaging scripts | ||
# | ||
VERSION="1.1" | ||
|
||
# Target OS | ||
# Values: values returned by getdist | ||
# Default: built for every OS | ||
TARGET_OS="rhel5" | ||
|
||
# Components to build in development mode | ||
DEV_COMPONENTS="trunk:getdist:none trunk:gforge:none trunk:gforge-plugin-apibull:none trunk:gforge-plugin-novadoc:none trunk:gforge-plugin-novafrs:none trunk:gforge-plugin-novapub:none trunk:gforge-plugin-mantis:none trunk:gforge-plugin-svn2mantis:none trunk:gforge-roles-bull:none trunk:gforge-trove-bull:none trunk:gforge-welcome-bull:none trunk:libnss-pgsql:none trunk:mod_auth_gforge:none trunk:mantis:none trunk:mod_umask:none trunk:perl-IPC-Run:none trunk:pwgen:none" | ||
|
||
# Components to build in release mode | ||
REL_COMPONENTS="tags:getdist:1.3-1 tags:gforge:4.7.1-1 tags:gforge-commonproject:1.1-1 tags:gforge-novaforge:1.0-5 tags:gforge-plugin-apibull:1.11-1 tags:gforge-plugin-mantis:2.9-1 tags:gforge-plugin-novadoc:1.13-1 tags:gforge-plugin-novafrs:1.11-1 tags:gforge-plugin-novapub:1.1-1 tags:gforge-plugin-svn2mantis:1.0-1 tags:gforge-roles-bull:1.2-3 tags:gforge-theme-nova2007:1.7-1 tags:gforge-theme-novablue:1.4-1 tags:gforge-trove-bull:1.1-1 tags:gforge-welcome-bull:1.1-1 tags:libnss-pgsql:1.3.1.4-3 tags:mantis:1.1.4.1-1 tags:mod_auth_gforge:0.5.9.3.5-2 tags:mod_umask:0.1.0.4-2 tags:novaforge-publisher:1.2-1 tags:perl-IPC-Run:0.80.2-2 tags:pwgen:2.05.5-2 tags:spip:1.9.2d.2-1 tags:subversion:1.3.2.5-3" | ||
|
||
# Files to delete after build | ||
FILES_TO_DELETE="*.svnlog *.rpmlog *.src.rpm gforge-auth-unix-*.rpm gforge-trove-standard-*.rpm gforge-welcome-standard-*.rpm subversion-devel-*.rpm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Version of packaging scripts | ||
# | ||
VERSION="1.1" | ||
|
||
# Target OS | ||
# Values: values returned by getdist | ||
# Default: built for every OS | ||
TARGET_OS="" | ||
|
||
# Components to build in development mode | ||
DEV_COMPONENTS="trunk:gforge:none trunk:gforge-commonproject:none trunk:gforge-plugin-apibull:none trunk:gforge-plugin-mantis:none trunk:gforge-plugin-novadoc:none trunk:gforge-plugin-novafrs:none trunk:gforge-plugin-novapub:none trunk:gforge-plugin-svn2mantis:none trunk:gforge-roles-bull:none trunk:gforge-theme-nova2007:none trunk:gforge-theme-novablue:none trunk:gforge-trove-bull:none trunk:gforge-welcome-bull:none trunk:mantis:none trunk:novaforge-publisher:none trunk:spip:none" | ||
|
||
# Components to build in release mode | ||
REL_COMPONENTS="tags:gforge:4.5.11.31-1 tags:gforge-commonproject:1.1-1 tags:gforge-plugin-apibull:1.11-1 tags:gforge-plugin-mantis:2.8-1 tags:gforge-plugin-novadoc:1.13-1 tags:gforge-plugin-novafrs:1.11-1 tags:gforge-plugin-novapub:1.1-1 tags:gforge-plugin-svn2mantis:1.0-1 tags:gforge-roles-bull:1.1-3 tags:gforge-theme-nova2007:1.7-1 tags:gforge-theme-novablue:1.4-1 tags:gforge-trove-bull:1.1-1 tags:gforge-welcome-bull:1.1-1 tags:mantis:1.1.1.2-1 tags:novaforge-publisher:1.2-1 tags:spip:1.9.2d.2-1" | ||
|
||
# Files to delete after build | ||
FILES_TO_DELETE="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Version of packaging scripts | ||
# | ||
VERSION="1.1" | ||
|
||
# Target OS | ||
# Values: values returned by getdist | ||
# Default: built for every OS | ||
TARGET_OS="rhel5" | ||
|
||
# Components to build in development mode | ||
DEV_COMPONENTS="trunk:getdist:none trunk:gforge:none trunk:gforge-commonproject:none trunk:gforge-novaforge:none trunk:gforge-plugin-apibull:none trunk:gforge-plugin-novadoc:none trunk:gforge-plugin-novafrs:none trunk:gforge-plugin-novapub:none trunk:gforge-plugin-svn2mantis:none trunk:gforge-roles-bull:none trunk:gforge-theme-nova2007:none trunk:gforge-theme-novablue:none trunk:gforge-trove-bull:none trunk:gforge-welcome-bull:none trunk:libnss-pgsql:none trunk:mod_auth_gforge:none tags:mantis:none trunk:mod_umask:none trunk:novaforge-publisher:none trunk:perl-IPC-Run:none trunk:pwgen:none trunk:spip:none trunk:subversion:none" | ||
|
||
# Components to build in release mode | ||
REL_COMPONENTS="tags:getdist:1.3-1 tags:gforge:4.7.1-1 tags:gforge-commonproject:1.1-1 tags:gforge-novaforge:1.0-5 tags:gforge-plugin-apibull:1.11-1 tags:gforge-plugin-mantis:2.9-1 tags:gforge-plugin-novadoc:1.13-1 tags:gforge-plugin-novafrs:1.11-1 tags:gforge-plugin-novapub:1.1-1 tags:gforge-plugin-svn2mantis:1.0-1 tags:gforge-roles-bull:1.2-3 tags:gforge-theme-nova2007:1.7-1 tags:gforge-theme-novablue:1.4-1 tags:gforge-trove-bull:1.1-1 tags:gforge-welcome-bull:1.1-1 tags:libnss-pgsql:1.3.1.4-3 tags:mantis:1.1.4.1-1 tags:mod_auth_gforge:0.5.9.3.5-2 tags:mod_umask:0.1.0.4-2 tags:novaforge-publisher:1.2-1 tags:perl-IPC-Run:0.80.2-2 tags:pwgen:2.05.5-2 tags:spip:1.9.2d.2-1 tags:subversion:1.3.2.5-3" | ||
|
||
# Files to delete after build | ||
FILES_TO_DELETE="*.svnlog *.rpmlog *.src.rpm gforge-auth-unix-*.rpm gforge-trove-standard-*.rpm gforge-welcome-standard-*.rpm subversion-devel-*.rpm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# This script builds a component | ||
# | ||
# Parameters: | ||
# $1: target distribution | ||
# $2: target directory | ||
# $3: SVN location (trunk, tags, branches) | ||
# $4: component name | ||
# $5: source version | ||
# $6: package release | ||
# $7: branch identifier | ||
|
||
# | ||
# Environment variable that MUST be defined | ||
# by the calling script | ||
# | ||
# SVN_URL SVN_USER SVN_PASS | ||
|
||
# | ||
# Source functions | ||
# | ||
. `dirname $0`/functions | ||
|
||
# | ||
# Binaries | ||
# | ||
BIN_BASENAME="" | ||
BIN_CHMOD="/bin/chmod" | ||
BIN_ECHO="/bin/echo" | ||
BIN_MKDIR="/bin/mkdir" | ||
BIN_RM="/bin/rm" | ||
BIN_SVN="/usr/bin/svn" | ||
BIN_BUILD="" | ||
|
||
# | ||
# Parameters | ||
# | ||
TARGET_DIR="" | ||
SVN_LOCATION="" | ||
SVN_COMPONENT="" | ||
SVN_VERSION="" | ||
SVN_RELEASE="" | ||
SVN_BRANCH="" | ||
TARGET_DIST="" | ||
|
||
# | ||
# Internal variables | ||
# | ||
EXIT=0 | ||
TMP_DIR="" | ||
SVN_PATH_PACKAGE="" | ||
VERSION="" | ||
|
||
# | ||
# Main script | ||
# | ||
$BIN_ECHO "Preparing to build component '$4'" | ||
if [ $EXIT -eq 0 ] ; then | ||
check_svn_parameters | ||
case "$1" in | ||
rpm) | ||
BIN_BASENAME="/bin/basename" | ||
BIN_BUILD="build" | ||
;; | ||
deb) | ||
BIN_BASENAME="/usr/bin/basename" | ||
BIN_BUILD="build_deb" | ||
;; | ||
*) | ||
$BIN_ECHO "-> target distribution '$1' is not supported (rpm or deb are supported)" | ||
EXIT=1 | ||
esac | ||
if [ ! -x $BIN_BASENAME ] ; then | ||
$BIN_ECHO "-> Binary '$BIN_BASENAME' is missing" | ||
EXIT=1 | ||
fi | ||
if [ -z "$2" ] ; then | ||
$BIN_ECHO "-> Target directory parameter is missing" | ||
EXIT=1 | ||
else | ||
if [ -d $2 ] ; then | ||
TARGET_DIR=$2 | ||
else | ||
$BIN_ECHO "-> Target directory '$2' does not exist" | ||
EXIT=1 | ||
fi | ||
fi | ||
if [ -z "$3" ] ; then | ||
$BIN_ECHO "-> SVN location parameter is missing (trunk, tags or branches)" | ||
EXIT=1 | ||
else | ||
if [ "$3" != "trunk" -a "$3" != "tags" -a "$3" != "branches" ] ; then | ||
$BIN_ECHO "-> SVN location '$3' is not supported (trunk, tags or branches)" | ||
EXIT=1 | ||
else | ||
SVN_LOCATION=$3 | ||
fi | ||
fi | ||
if [ -z "$4" ] ; then | ||
$BIN_ECHO "-> SVN component parameter is missing" | ||
EXIT=1 | ||
else | ||
SVN_COMPONENT=$4 | ||
fi | ||
if [ -z "$5" ] ; then | ||
if [ "$SVN_LOCATION" = "tags" -o "$SVN_LOCATION" = "branches" ] ; then | ||
$BIN_ECHO "-> SVN version parameter is missing" | ||
EXIT=1 | ||
fi | ||
else | ||
SVN_VERSION=$5 | ||
fi | ||
if [ -z "$6" ] ; then | ||
if [ "$SVN_LOCATION" = "tags" -o "$SVN_LOCATION" = "branches" ] ; then | ||
$BIN_ECHO "-> SVN release parameter is missing" | ||
EXIT=1 | ||
fi | ||
else | ||
SVN_RELEASE=$6 | ||
fi | ||
if [ -z "$7" ] ; then | ||
if [ "$SVN_LOCATION" = "branches" ] ; then | ||
$BIN_ECHO "-> SVN branch parameter is missing" | ||
EXIT=1 | ||
fi | ||
else | ||
SVN_BRANCH=$7 | ||
fi | ||
if [ ! -x $BIN_SVN ] ; then | ||
$BIN_ECHO "-> Binary '$BIN_SVN' is missing" | ||
EXIT=1 | ||
fi | ||
fi | ||
if [ $EXIT -eq 0 ] ; then | ||
case "$SVN_LOCATION" in | ||
trunk) | ||
SVN_PATH_PACKAGE="trunk/component/$SVN_COMPONENT/package" | ||
;; | ||
tags) | ||
SVN_PATH_PACKAGE="tags/component/$SVN_COMPONENT/package/$SVN_VERSION-$SVN_RELEASE" | ||
;; | ||
branches) | ||
SVN_PATH_PACKAGE="branches/component/$SVN_COMPONENT/package/$SVN_VERSION-$SVN_RELEASE-$SVN_BRANCH" | ||
;; | ||
*) | ||
$BIN_ECHO "-> SVN location '$SVN_LOCATION' is not supported" | ||
EXIT=1 | ||
esac | ||
fi | ||
if [ $EXIT -eq 0 ] ; then | ||
TMP_DIR="$TARGET_DIR/`$BIN_BASENAME $0`" | ||
if [ -d $TMP_DIR ] ; then | ||
$BIN_ECHO "-> Directory '$TMP_DIR' already exists" | ||
EXIT=1 | ||
else | ||
$BIN_MKDIR -p $TMP_DIR/package | ||
if [ ! -d $TMP_DIR/package ] ; then | ||
$BIN_ECHO "-> Error while creating directory '$TMP_DIR/package'" | ||
EXIT=1 | ||
fi | ||
fi | ||
fi | ||
if [ $EXIT -eq 0 ] ; then | ||
pushd $TMP_DIR/package >> /dev/null 2>&1 | ||
$BIN_SVN checkout --username $SVN_USER --password $SVN_PASS $SVN_URL/$SVN_PATH_PACKAGE . >> /dev/null 2>&1 | ||
if [ $? -ne 0 ] ; then | ||
$BIN_ECHO "-> Error while checkouting URL '$SVN_URL/$SVN_PATH_PACKAGE'" | ||
EXIT=1 | ||
fi | ||
popd >> /dev/null 2>&1 | ||
fi | ||
if [ $EXIT -eq 0 ] ; then | ||
if [ ! -e $TMP_DIR/package/config ] ; then | ||
$BIN_ECHO "-> The package configuration file '$TMP_DIR/package/config' is missing" | ||
EXIT=1 | ||
fi | ||
fi | ||
if [ $EXIT -eq 0 ] ; then | ||
. $TMP_DIR/package/config | ||
if [ -z "$VERSION" ] ; then | ||
VERSION="1.0" | ||
fi | ||
fi | ||
if [ $EXIT -eq 0 ] ; then | ||
$BIN_MKDIR -p $TMP_DIR/packaging | ||
if [ ! -d $TMP_DIR/packaging ] ; then | ||
$BIN_ECHO "-> Error while creating directory '$TMP_DIR/packaging'" | ||
EXIT=1 | ||
fi | ||
fi | ||
if [ $EXIT -eq 0 ] ; then | ||
pushd $TMP_DIR/packaging >> /dev/null 2>&1 | ||
#$BIN_SVN checkout --username $SVN_USER --password $SVN_PASS $SVN_URL/tags/packaging/$VERSION/component . >> /dev/null 2>&1 | ||
$BIN_SVN checkout --username $SVN_USER --password $SVN_PASS $SVN_URL/trunk/packaging/component . >> /dev/null 2>&1 | ||
if [ $? -ne 0 ] ; then | ||
#$BIN_ECHO "-> Error while checkouting URL '$SVN_URL/tags/packaging/$VERSION/component'" | ||
$BIN_ECHO "-> Error while checkouting URL '$SVN_URL/trunk/packaging/component'" | ||
EXIT=1 | ||
fi | ||
popd >> /dev/null 2>&1 | ||
fi | ||
if [ $EXIT -eq 0 ] ; then | ||
if [ ! -e $TMP_DIR/packaging/$BIN_BUILD ] ; then | ||
$BIN_ECHO "-> File '$TMP_DIR/packaging/build' is missing" | ||
EXIT=1 | ||
fi | ||
fi | ||
if [ $EXIT -eq 0 ] ; then | ||
$BIN_ECHO "-> OK" | ||
$BIN_CHMOD 755 $TMP_DIR/packaging/$BIN_BUILD | ||
$TMP_DIR/packaging/$BIN_BUILD "$TARGET_DIR" "$SVN_LOCATION" "$SVN_COMPONENT" "$SVN_VERSION" "$SVN_RELEASE" "$SVN_BRANCH" | ||
if [ $? -ne 0 ] ; then | ||
EXIT=1 | ||
fi | ||
fi | ||
if [ -n "$TMP_DIR" -a "$TMP_DIR" != "/" ] ; then | ||
$BIN_RM -rf $TMP_DIR | ||
fi | ||
exit $EXIT |
Oops, something went wrong.