From 61b630a98cb1a21448f0db17dea3f02dcd669ad2 Mon Sep 17 00:00:00 2001 From: DRC Date: Wed, 9 Feb 2011 10:45:09 +0000 Subject: [PATCH] Add mechanism for creating binary tarballs git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4274 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- Makefile.am | 6 ++++++ configure.ac | 1 + release/BUILDING.txt | 8 ++++++++ release/maketarball.in | 44 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 release/maketarball.in diff --git a/Makefile.am b/Makefile.am index d8b1ff08..811f5a9c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,6 +18,12 @@ endif dmg: all sh makemacpkg +tarball: all + sh maketarball + +servertarball: all + sh maketarball server + EXTRA_DIST = CMakeLists.txt cmakescripts/getdate.bat LICENCE.TXT \ doc java media release config.h.cmake.in m4 diff --git a/configure.ac b/configure.ac index c1efa8f5..a05e2fd0 100644 --- a/configure.ac +++ b/configure.ac @@ -224,6 +224,7 @@ AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64"]) AC_SUBST(BUILD) AC_CONFIG_FILES([makemacpkg:release/makemacpkg.in]) +AC_CONFIG_FILES([maketarball:release/maketarball.in]) AC_OUTPUT([ Makefile diff --git a/release/BUILDING.txt b/release/BUILDING.txt index 3f580815..6b2f9db0 100644 --- a/release/BUILDING.txt +++ b/release/BUILDING.txt @@ -433,6 +433,14 @@ The following commands can be used to create various types of release packages: Unix ---- +make tarball + + Create a binary tarball containing the TigerVNC Viewer + +make servertarball + + Create a binary tarball containing both the TigerVNC Server and Viewer + make dmg Create Macintosh package/disk image. This requires the PackageMaker diff --git a/release/maketarball.in b/release/maketarball.in new file mode 100644 index 00000000..cc836f34 --- /dev/null +++ b/release/maketarball.in @@ -0,0 +1,44 @@ +#!/bin/sh + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +TMPDIR= + +onexit() +{ + if [ ! "$TMPDIR" = "" ]; then + rm -rf $TMPDIR + fi +} + +PACKAGE_NAME=@PACKAGE_NAME@ +VERSION=@VERSION@ +BUILD=@BUILD@ +SRCDIR=@srcdir@ +PACKAGE_FILE=$PACKAGE_NAME-`uname -s`-@host_cpu@.tar.gz +SERVER=0 + +if [ $# -gt 0 ]; then + if [ "$1" = "server" ]; then + SERVER=1 + fi +fi + +umask 022 +TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX` +rm -f $PACKAGE_FILE +if [ $SERVER = 1 ]; then + make xserver-install prefix=/opt/TigerVNC DESTDIR=$TMPDIR +else + make install prefix=/opt/TigerVNC DESTDIR=$TMPDIR +fi +pushd $TMPDIR +tar cfz $PACKAGE_FILE opt +popd +cp $TMPDIR/$PACKAGE_FILE . + +exit -- 2.39.5