some other cosmetics

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent a2654f8a8f
commit 4027a6e7b5
  1. 1
      Sankore_3.1.pro
  2. 44
      buildDebianPackage

@ -348,7 +348,6 @@ macx {
} }
linux-g++* { linux-g++* {
message(LINUX)
CONFIG += link_prl CONFIG += link_prl
LIBS += -lcrypto LIBS += -lcrypto
LIBS += -lX11 LIBS += -lX11

@ -29,11 +29,25 @@ do
done done
NOTIFY_CMD=`which notify-send`
notifyError(){ notifyError(){
notify-send -t 0 "Error occoured" "An error occours during the sankore build:\n\t$1" -i /usr/share/icons/oxygen/64x64/status/dialog-error.png if [ -e "$NOTIFY_CMD" ]; then
$NOTIFY_CMD -t 0 -i "/usr/share/icons/oxygen/64x64/status/dialog-error.png" "$1"
else
printf "\033[31merror:\033[0m $1\n"
fi
exit 1 exit 1
} }
notifyProgress(){
if [ -e "$NOTIFY_CMD" ]; then
$NOTIFY_CMD "$1" "$2"
else
printf "\033[32m--> Achieved task:\033[0m $1:\n\t$2\n"
fi
}
alertIfPreviousVersionInstalled(){ alertIfPreviousVersionInstalled(){
APT_CACHE=`which apt-cache` APT_CACHE=`which apt-cache`
if [ ! -e "$APT_CACHE" ]; then if [ ! -e "$APT_CACHE" ]; then
@ -67,7 +81,7 @@ if [ ! -e "$PLUGINS_PATH" ]; then
notifyError "plugins path not found at $PLUGINS_PATH" notifyError "plugins path not found at $PLUGINS_PATH"
fi fi
notify-send "Open-Sankore" "Building Open-Sankore ..." notifyProgress "Open-Sankore" "Building Open-Sankore ..."
if [ "$ARCHITECTURE" == "x86_64" ]; then if [ "$ARCHITECTURE" == "x86_64" ]; then
$QMAKE_PATH Sankore_3.1.pro -spec linux-g++-64 $QMAKE_PATH Sankore_3.1.pro -spec linux-g++-64
@ -77,14 +91,20 @@ fi
make -j 4 release-install make -j 4 release-install
notify-send "Git Hub" "Make a tag of the delivered version" if [ ! -e "build/linux/release/product/Open-Sankore" ]; then
notifyError "Open-Sankore build failed"
fi
notifyProgress "Git Hub" "Make a tag of the delivered version"
VERSION=`cat build/linux/release/version` VERSION=`cat build/linux/release/version`
if [ ! -f build/linux/release/version ]; then if [ ! -f build/linux/release/version ]; then
notifyError "version not found" notifyError "version not found"
else else
LAST_COMMITED_VERSION="`git describe $(git rev-list --tags --max-count=1)`" LAST_COMMITED_VERSION="`git describe $(git rev-list --tags --max-count=1)`"
if [ "v$VERSION" != "$LAST_COMMITED_VERSION" ]; then if [ "v$VERSION" != "$LAST_COMMITED_VERSION" ]; then
echo creating a tag with the version $VERSION notifyProgress creating a tag with the version $VERSION
if [ $MAKE_TAG == true ]; then if [ $MAKE_TAG == true ]; then
git tag -a "v$VERSION" -m "Generating setup for v$VERSION" git tag -a "v$VERSION" -m "Generating setup for v$VERSION"
git push origin --tags git push origin --tags
@ -97,7 +117,7 @@ chmod +x build/linux/release/product/run.sh
cp -R resources/linux/qtlinux/* build/linux/release/product/ cp -R resources/linux/qtlinux/* build/linux/release/product/
notify-send "QT" "Coping plugins and library ..." notifyProgress "QT" "Coping plugins and library ..."
cp -R $PLUGINS_PATH build/linux/release/product/ cp -R $PLUGINS_PATH build/linux/release/product/
#copying custom qt library #copying custom qt library
@ -136,7 +156,7 @@ else
cp "$QT_LIBRARY_SOURCE_PATH/libQtWebKit.so.4.9.0" "$QT_LIBRARY_DEST_PATH/" cp "$QT_LIBRARY_SOURCE_PATH/libQtWebKit.so.4.9.0" "$QT_LIBRARY_DEST_PATH/"
fi fi
notify-send "QT" "Internalization ..." notifyProgress "QT" "Internalization ..."
if [ ! -e $GUI_TRANSLATIONS_DIRECTORY_PATH ]; then if [ ! -e $GUI_TRANSLATIONS_DIRECTORY_PATH ]; then
notifyError "gui translations pro file not found at: $GUI_TRANSLATIONS_DIRECTORY_PATH" notifyError "gui translations pro file not found at: $GUI_TRANSLATIONS_DIRECTORY_PATH"
else else
@ -162,7 +182,7 @@ cd build/linux/release/product
find . -name .svn -exec rm -rf {} \; 2> /dev/null find . -name .svn -exec rm -rf {} \; 2> /dev/null
cd - cd -
notify-send "Building Sankore" "Finished to build Sankore building the package" notifyProgress "Building Sankore" "Finished to build Sankore building the package"
BASE_WORKING_DIR="packageBuildDir" BASE_WORKING_DIR="packageBuildDir"
@ -288,12 +308,6 @@ for l in `objdump -p $SANKORE_PACKAGE_DIRECTORY/Open-Sankore | grep NEEDED | awk
done; done;
done; done;
#additional dependencies
#tab[$count]="gtk2-engines-pixbuf"
#((count++))
#tab[$count]="ttf-mscorefonts-installer"
#((count++))
for ((i=0;i<${#tab[@]};i++)); do for ((i=0;i<${#tab[@]};i++)); do
if [ $i -ne "0" ]; then if [ $i -ne "0" ]; then
echo -n ", " >> "$CONTROL_FILE" echo -n ", " >> "$CONTROL_FILE"
@ -328,7 +342,7 @@ DEBIAN_PACKAGE_NAME="Open-Sankore_${VERSION}_$ARCHITECTURE.deb"
fakeroot chown -R root:root $BASE_WORKING_DIR fakeroot chown -R root:root $BASE_WORKING_DIR
dpkg -b "$BASE_WORKING_DIR" "install/linux/$DEBIAN_PACKAGE_NAME" dpkg -b "$BASE_WORKING_DIR" "install/linux/$DEBIAN_PACKAGE_NAME"
notify-send "Open-Sankore" "Package built" notifyProgress "Open-Sankore" "Package built"
#clean up mess #clean up mess
fakeroot rm -rf $BASE_WORKING_DIR fakeroot rm -rf $BASE_WORKING_DIR
@ -341,6 +355,6 @@ if [ $CREATE_DIENA_DISTRIBUTION_ZIP == true ]; then
`which zip` -1 --junk-paths ${ZIP_NAME} ${DEBIAN_PACKAGE_NAME} ../../ReleaseNotes.pdf ../../JournalDesModifications.pdf `which zip` -1 --junk-paths ${ZIP_NAME} ${DEBIAN_PACKAGE_NAME} ../../ReleaseNotes.pdf ../../JournalDesModifications.pdf
cd - cd -
notify-send "Open-Sankore" "Build Diena zip file for distribution" notifyProgress "Open-Sankore" "Build Diena zip file for distribution"
fi fi

Loading…
Cancel
Save