From 3293734ffc8a8419d9a2415aa951acce2a567866 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Fri, 25 Aug 2006 12:50:02 +0000 Subject: Add VERSIONS file to define OPENSLX_VERSION_*. Use OPENSLX_VERSION_STING in the Makefile. Ignore openslx-*.tar.bz2 file from svn. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@331 95ad53e4-c205-0410-b2fa-d234c58c8868 --- Makefile | 28 ++++++++++++++++++++++++---- VERSIONS | 4 ++++ 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 VERSIONS diff --git a/Makefile b/Makefile index cfa2522e..5938bb9f 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,30 @@ # (c) 2006 - OpenSLX.com tarball: - @echo "Creating tar ball " - @tar cfhj openslx.tar.bz2 \ - --exclude-from=tools/tar_exclude_from \ - . + @. VERSIONS; \ + echo "Creating OpenSLX $${OPENSLX_VERSION_STRING} tar ball "; \ + if test -e "../openslx-$${OPENSLX_VERSION_STRING}" -a \ + ! -L "../openslx-$${OPENSLX_VERSION_STRING}"; then \ + echo "Error: ../openslx-$${OPENSLX_VERSION_STRING} exists and is not a sym link! "; \ + exit 1; \ + fi; \ + svn_repo_name=$$( pwd); \ + svn_repo_name="$${svn_repo_name##*/}"; \ + if ! test -L "../openslx-$${OPENSLX_VERSION_STRING}"; then \ + pushd .. >/dev/null; \ + ln -s "$${svn_repo_name}" "openslx-$${OPENSLX_VERSION_STRING}"; \ + popd >/dev/null; \ + OPENSLX_SOURCEDIR_SYMLINK_CREATED="yes"; \ + fi; \ + pushd .. >/dev/null; \ + tar cfhj \ + "$${svn_repo_name}/openslx-$${OPENSLX_VERSION_STRING}.tar.bz2" \ + --exclude-from="$${svn_repo_name}/tools/tar_exclude_from" \ + "openslx-$${OPENSLX_VERSION_STRING}/"; \ + test "$${OPENSLX_SOURCEDIR_SYMLINK_CREATED}" = "yes" && \ + rm -f "openslx-$${OPENSLX_VERSION_STRING}"; \ + popd >/dev/null + install: @echo "Installing openslx.org project files" @mkdir -p /var/lib/openslx/config/default/initramfs \ diff --git a/VERSIONS b/VERSIONS new file mode 100644 index 00000000..7f7636ad --- /dev/null +++ b/VERSIONS @@ -0,0 +1,4 @@ +OPENSLX_VERSION_MAJOR="4" +OPENSLX_VERSION_MINOR="0" +OPENSLX_VERSION_RELEASE="0" +OPENSLX_VERSION_STRING="${OPENSLX_VERSION_MAJOR}.${OPENSLX_VERSION_MINOR}.${OPENSLX_VERSION_RELEASE}" -- cgit v1.2.3-55-g7522