Permalink
Browse files

Fixed: making a deb package using make_deb.sh

  • Loading branch information...
1 parent 4bc0b2c commit 7a8c759b911e077b12430ef7e2988baff9ff78bd mezomish committed Jun 27, 2009
Showing with 25 additions and 7 deletions.
  1. +1 −0 CMakeLists.txt
  2. +1 −0 cmake/version.cmake
  3. +23 −7 make_deb.sh
View
@@ -195,6 +195,7 @@ INCLUDE (${QT_USE_FILE})
#Configure AppInfo.h
configure_file ("${CMAKE_SOURCE_DIR}/src/AppInfo.nix.h.cmake" "${CMAKE_BINARY_DIR}/AppInfo.nix.h" @ONLY)
+configure_file ("${CMAKE_SOURCE_DIR}/cmake/version.cmake" "${CMAKE_BINARY_DIR}/version.real" @ONLY)
# qt4 actions
QT4_WRAP_UI ( juffed_UIS_H ${juffed_UIS} )
View
@@ -0,0 +1 @@
+@VERSION@
View
@@ -1,20 +1,23 @@
#!/bin/sh
+BUILD_DIR=build
VERSION=`cat version`
RELEASE="1"
TEMP_DIR="temp_fake_root_dir"
ARCH="i386"
+DISTR=""
print_usage() {
echo ""
- echo " Usage: make_deb.sh [options]"
+ echo "Usage: make_deb.sh [options]"
echo ""
- echo " Valid options:"
- echo " --release=<release> : Package release (default: 1)"
- echo " --distr=<distr> : Distribution suffix"
- echo " --arch=<arch> : Processor architecture (default: i386)"
- echo " --do-not-clean : Do not remove temporary directory"
- echo " --help : Print this help"
+ echo "Valid options:"
+ echo " --distr=<distr> : Distribution suffix"
+ echo " --arch=<arch> : Processor architecture (default: i386)"
+ echo " --build-dir=<dir> : Build directory (default: 'build')"
+ echo " --release=<release> : Package release (default: 1)"
+ echo " --do-not-clean : Do not remove temporary directory"
+ echo " --help : Print this help"
echo ""
}
@@ -36,6 +39,10 @@ for arg in ${@}; do
DISTR=`echo ${arg} | cut -c 9-`
;;
+ --build-dir=*)
+ BUILD_DIR=`echo ${arg} | cut -c 13-`
+ ;;
+
--release=*)
RELEASE=`echo ${arg} | cut -c 11-`
;;
@@ -57,6 +64,15 @@ for arg in ${@}; do
esac
done
+if [ -z "$DISTR" ]; then
+ echo ""
+ echo "Error: Distribution is not set";
+ print_usage
+ exit 1
+fi
+
+VERSION=`cat ${BUILD_DIR}/version.real`
+
rm -rf ${TEMP_DIR}
mkdir -p ${TEMP_DIR}/usr

0 comments on commit 7a8c759

Please sign in to comment.