fixed name issue on linux package

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent c42faa7ec0
commit 0d4cdb79ed
  1. 56
      buildDebianPackage.sh

@ -79,9 +79,9 @@ alertIfPreviousVersionInstalled(){
if [ ! -e "$APT_CACHE" ]; then
notifyError "apt-cache command not found"
else
SEARCH_RESULT=`$APT_CACHE search $APPLICATION_NAME`
if [ `echo $SEARCH_RESULT | grep -c $APPLICATION_NAME` -ge 1 ]; then
notifyError "Found a previous version of $APPLICATION_NAME. Remove it to avoid to put it as dependency"
SEARCH_RESULT=`$APT_CACHE search ${APPLICATION_NAME}`
if [ `echo $SEARCH_RESULT | grep -c ${APPLICATION_NAME}` -ge 1 ]; then
notifyError "Found a previous version of ${APPLICATION_NAME}. Remove it to avoid to put it as dependency"
fi
fi
}
@ -161,23 +161,23 @@ rm -rf "build/linux/release"
rm -rf install
notifyProgress "QT" "Internalization"
$LRELEASES $APPLICATION_NAME.pro
$LRELEASES ${APPLICATION_NAME}.pro
cd $GUI_TRANSLATIONS_DIRECTORY_PATH
$LRELEASES translations.pro
cd -
notifyProgress "$APPLICATION_NAME" "Building $APPLICATION_NAME"
notifyProgress "${APPLICATION_NAME}" "Building ${APPLICATION_NAME}"
if [ "$ARCHITECTURE" == "amd64" ]; then
$QMAKE_PATH $APPLICATION_NAME.pro -spec linux-g++-64
$QMAKE_PATH ${APPLICATION_NAME}.pro -spec linux-g++-64
else
$QMAKE_PATH $APPLICATION_NAME.pro -spec linux-g++
$QMAKE_PATH ${APPLICATION_NAME}.pro -spec linux-g++
fi
make -j 4 release-install
if [ ! -e "$PRODUCT_PATH/$APPLICATION_NAME" ]; then
notifyError "$APPLICATION_NAME build failed"
if [ ! -e "$PRODUCT_PATH/${APPLICATION_NAME}" ]; then
notifyError "${APPLICATION_NAME} build failed"
fi
notifyProgress "Git Hub" "Make a tag of the delivered version"
@ -237,7 +237,7 @@ cd $PRODUCT_PATH
find . -name .svn -exec rm -rf {} \; 2> /dev/null
cd -
notifyProgress "Building $APPLICATION_NAME" "Finished to build $APPLICATION_NAME building the package"
notifyProgress "Building ${APPLICATION_NAME}" "Finished to build ${APPLICATION_NAME} building the package"
BASE_WORKING_DIR="packageBuildDir"
@ -265,7 +265,7 @@ cat > "$BASE_WORKING_DIR/DEBIAN/prerm" << EOF
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
xdg-desktop-menu uninstall /usr/share/applications/$APPLICATION_NAME.desktop
xdg-desktop-menu uninstall /usr/share/applications/${APPLICATION_NAME}.desktop
exit 0
#DEBHELPER#
EOF
@ -287,13 +287,13 @@ cat > "$BASE_WORKING_DIR/DEBIAN/postint" << EOF
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
xdg-desktop-menu install --novendor /usr/share/applications/$APPLICATION_NAME.desktop
xdg-desktop-menu install --novendor /usr/share/applications/${APPLICATION_NAME}.desktop
exit 0
#DEBHELPER#
EOF
APPLICATION_DIRECTORY_NAME="$APPLICATION_NAME-$VERSION"
APPLICATION_DIRECTORY_NAME="${APPLICATION_NAME}-$VERSION"
PACKAGE_DIRECTORY="$BASE_WORKING_DIR/usr/local/$APPLICATION_DIRECTORY_NAME"
#move build directory to packages directory
cp -R $PRODUCT_PATH $PACKAGE_DIRECTORY
@ -316,34 +316,34 @@ cat > $BASE_WORKING_DIR/usr/local/$APPLICATION_DIRECTORY_NAME/run.sh << EOF
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
env LD_LIBRARY_PATH=/usr/local/$APPLICATION_DIRECTORY_NAME/qtlib:$LD_LIBRARY_PATH /usr/local/$APPLICATION_DIRECTORY_NAME/$APPLICATION_NAME
env LD_LIBRARY_PATH=/usr/local/$APPLICATION_DIRECTORY_NAME/qtlib:$LD_LIBRARY_PATH /usr/local/$APPLICATION_DIRECTORY_NAME/${APPLICATION_NAME}
EOF
CHANGE_LOG_FILE="$BASE_WORKING_DIR/DEBIAN/changelog-$APPLICATION_NAME-$VERSION.txt"
CHANGE_LOG_FILE="$BASE_WORKING_DIR/DEBIAN/changelog-${APPLICATION_NAME}-$VERSION.txt"
CONTROL_FILE="$BASE_WORKING_DIR/DEBIAN/control"
CHANGE_LOG_TEXT="changelog.txt"
echo "$APPLICATION_NAME ($VERSION) $ARCHITECTURE; urgency=low" > "$CHANGE_LOG_FILE"
echo "${APPLICATION_NAME} ($VERSION) $ARCHITECTURE; urgency=low" > "$CHANGE_LOG_FILE"
echo >> "$CHANGE_LOG_FILE"
cat $CHANGE_LOG_TEXT >> "$CHANGE_LOG_FILE"
echo >> "$CHANGE_LOG_FILE"
echo "-- Claudio Valerio <claudio.valerio@oe-f.org> `date`" >> "$CHANGE_LOG_FILE"
echo "Package: $APPLICATION_NAME" > "$CONTROL_FILE"
echo "Package: ${APPLICATION_NAME}" > "$CONTROL_FILE"
echo "Version: $VERSION" >> "$CONTROL_FILE"
echo "Section: education" >> "$CONTROL_FILE"
echo "Priority: optional" >> "$CONTROL_FILE"
echo "Architecture: $ARCHITECTURE" >> "$CONTROL_FILE"
echo "Essential: no" >> "$CONTROL_FILE"
echo "Installed-Size: `du -s $PACKAGE_DIRECTORY | awk '{ print $1 }'`" >> "$CONTROL_FILE"
echo "Maintainer: $APPLICATION_NAME Developers team <dev@oe-f.org>" >> "$CONTROL_FILE"
echo "Maintainer: ${APPLICATION_NAME} Developers team <dev@oe-f.org>" >> "$CONTROL_FILE"
echo "Homepage: http://oe-f.org" >> "$CONTROL_FILE"
echo -n "Depends: " >> "$CONTROL_FILE"
unset tab
declare -a tab
let count=0
for l in `objdump -p $PACKAGE_DIRECTORY/$APPLICATION_NAME | grep NEEDED | awk '{ print $2 }'`; do
for l in `objdump -p $PACKAGE_DIRECTORY/${APPLICATION_NAME} | grep NEEDED | awk '{ print $2 }'`; do
for lib in `dpkg -S $l | awk -F":" '{ print $1 }'`; do
#echo $lib
presence=`echo ${tab[*]} | grep -c "$lib"`;
@ -364,26 +364,26 @@ echo "" >> "$CONTROL_FILE"
echo "Description: This a interactive white board that uses a free standard format." >> "$CONTROL_FILE"
find $BASE_WORKING_DIR/usr/ -exec md5sum {} > $BASE_WORKING_DIR/DEBIAN/md5sums 2>/dev/null \;
APPLICATION_SHORTCUT="$BASE_WORKING_DIR/usr/share/applications/$APPLICATION_NAME.desktop"
APPLICATION_SHORTCUT="$BASE_WORKING_DIR/usr/share/applications/${APPLICATION_NAME}.desktop"
echo "[Desktop Entry]" > $APPLICATION_SHORTCUT
echo "Version=$VERSION" >> $APPLICATION_SHORTCUT
echo "Encoding=UTF-8" >> $APPLICATION_SHORTCUT
echo "Name=$APPLICATION_NAME ($VERSION)" >> $APPLICATION_SHORTCUT
echo "GenericName=$APPLICATION_NAME" >> $APPLICATION_SHORTCUT
echo "Name=${APPLICATION_NAME} ($VERSION)" >> $APPLICATION_SHORTCUT
echo "GenericName=${APPLICATION_NAME}" >> $APPLICATION_SHORTCUT
echo "Comment=Logiciel de création de présentations pour tableau numérique interactif (TNI)" >> $APPLICATION_SHORTCUT
echo "Exec=/usr/local/$APPLICATION_DIRECTORY_NAME/run.sh" >> $APPLICATION_SHORTCUT
echo "Icon=/usr/local/$APPLICATION_DIRECTORY_NAME/$APPLICATION_NAME.png" >> $APPLICATION_SHORTCUT
echo "Icon=/usr/local/$APPLICATION_DIRECTORY_NAME/${APPLICATION_NAME}.png" >> $APPLICATION_SHORTCUT
echo "StartupNotify=true" >> $APPLICATION_SHORTCUT
echo "Terminal=false" >> $APPLICATION_SHORTCUT
echo "Type=Application" >> $APPLICATION_SHORTCUT
echo "Categories=Education" >> $APPLICATION_SHORTCUT
cp "resources/images/OpenBoard.png" "$PACKAGE_DIRECTORY/$APPLICATION_NAME.png"
cp "resources/images/${APPLICATION_NAME}.png" "$PACKAGE_DIRECTORY/${APPLICATION_NAME}.png"
chmod 755 "$BASE_WORKING_DIR/DEBIAN"
chmod 755 "$BASE_WORKING_DIR/DEBIAN/prerm"
chmod 755 "$BASE_WORKING_DIR/DEBIAN/postint"
mkdir -p "install/linux"
DEBIAN_PACKAGE_NAME="$APPLICATION_NAME_${VERSION}_$ARCHITECTURE.deb"
DEBIAN_PACKAGE_NAME="${APPLICATION_NAME}_${VERSION}_$ARCHITECTURE.deb"
chown -R root:root $BASE_WORKING_DIR
dpkg -b "$BASE_WORKING_DIR" "install/linux/$DEBIAN_PACKAGE_NAME"
@ -391,16 +391,16 @@ dpkg -b "$BASE_WORKING_DIR" "install/linux/$DEBIAN_PACKAGE_NAME"
#clean up mess
rm -rf $BASE_WORKING_DIR
notifyProgress "$APPLICATION_NAME" "Package built"
notifyProgress "${APPLICATION_NAME}" "Package built"
if [ $CREATE_DIENA_DISTRIBUTION_ZIP == true ]; then
ZIP_NAME="$APPLICATION_NAME_`lsb_release -is`_`lsb_release -rs`_${VERSION}_${ARCHITECTURE}.zip"
ZIP_NAME="${APPLICATION_NAME}_`lsb_release -is`_`lsb_release -rs`_${VERSION}_${ARCHITECTURE}.zip"
cd install/linux
$ZIP_PATH -1 --junk-paths ${ZIP_NAME} ${DEBIAN_PACKAGE_NAME} ../../ReleaseNotes.pdf ../../JournalDesModifications.pdf
cd -
notifyProgress "$APPLICATION_NAME" "Build Diena zip file for distribution"
notifyProgress "${APPLICATION_NAME}" "Build Diena zip file for distribution"
fi
exit 0

Loading…
Cancel
Save