|
|
@ -79,9 +79,9 @@ alertIfPreviousVersionInstalled(){ |
|
|
|
if [ ! -e "$APT_CACHE" ]; then |
|
|
|
if [ ! -e "$APT_CACHE" ]; then |
|
|
|
notifyError "apt-cache command not found" |
|
|
|
notifyError "apt-cache command not found" |
|
|
|
else |
|
|
|
else |
|
|
|
SEARCH_RESULT=`$APT_CACHE search $APPLICATION_NAME` |
|
|
|
SEARCH_RESULT=`$APT_CACHE search ${APPLICATION_NAME}` |
|
|
|
if [ `echo $SEARCH_RESULT | grep -c $APPLICATION_NAME` -ge 1 ]; then |
|
|
|
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" |
|
|
|
notifyError "Found a previous version of ${APPLICATION_NAME}. Remove it to avoid to put it as dependency" |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
@ -161,23 +161,23 @@ rm -rf "build/linux/release" |
|
|
|
rm -rf install |
|
|
|
rm -rf install |
|
|
|
|
|
|
|
|
|
|
|
notifyProgress "QT" "Internalization" |
|
|
|
notifyProgress "QT" "Internalization" |
|
|
|
$LRELEASES $APPLICATION_NAME.pro |
|
|
|
$LRELEASES ${APPLICATION_NAME}.pro |
|
|
|
cd $GUI_TRANSLATIONS_DIRECTORY_PATH |
|
|
|
cd $GUI_TRANSLATIONS_DIRECTORY_PATH |
|
|
|
$LRELEASES translations.pro |
|
|
|
$LRELEASES translations.pro |
|
|
|
cd - |
|
|
|
cd - |
|
|
|
|
|
|
|
|
|
|
|
notifyProgress "$APPLICATION_NAME" "Building $APPLICATION_NAME" |
|
|
|
notifyProgress "${APPLICATION_NAME}" "Building ${APPLICATION_NAME}" |
|
|
|
|
|
|
|
|
|
|
|
if [ "$ARCHITECTURE" == "amd64" ]; then |
|
|
|
if [ "$ARCHITECTURE" == "amd64" ]; then |
|
|
|
$QMAKE_PATH $APPLICATION_NAME.pro -spec linux-g++-64 |
|
|
|
$QMAKE_PATH ${APPLICATION_NAME}.pro -spec linux-g++-64 |
|
|
|
else |
|
|
|
else |
|
|
|
$QMAKE_PATH $APPLICATION_NAME.pro -spec linux-g++ |
|
|
|
$QMAKE_PATH ${APPLICATION_NAME}.pro -spec linux-g++ |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
make -j 4 release-install |
|
|
|
make -j 4 release-install |
|
|
|
|
|
|
|
|
|
|
|
if [ ! -e "$PRODUCT_PATH/$APPLICATION_NAME" ]; then |
|
|
|
if [ ! -e "$PRODUCT_PATH/${APPLICATION_NAME}" ]; then |
|
|
|
notifyError "$APPLICATION_NAME build failed" |
|
|
|
notifyError "${APPLICATION_NAME} build failed" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
notifyProgress "Git Hub" "Make a tag of the delivered version" |
|
|
|
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 |
|
|
|
find . -name .svn -exec rm -rf {} \; 2> /dev/null |
|
|
|
cd - |
|
|
|
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" |
|
|
|
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/>. |
|
|
|
# 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 |
|
|
|
exit 0 |
|
|
|
#DEBHELPER# |
|
|
|
#DEBHELPER# |
|
|
|
EOF |
|
|
|
EOF |
|
|
@ -287,13 +287,13 @@ cat > "$BASE_WORKING_DIR/DEBIAN/postint" << EOF |
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
# 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 |
|
|
|
exit 0 |
|
|
|
#DEBHELPER# |
|
|
|
#DEBHELPER# |
|
|
|
EOF |
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
APPLICATION_DIRECTORY_NAME="$APPLICATION_NAME-$VERSION" |
|
|
|
APPLICATION_DIRECTORY_NAME="${APPLICATION_NAME}-$VERSION" |
|
|
|
PACKAGE_DIRECTORY="$BASE_WORKING_DIR/usr/local/$APPLICATION_DIRECTORY_NAME" |
|
|
|
PACKAGE_DIRECTORY="$BASE_WORKING_DIR/usr/local/$APPLICATION_DIRECTORY_NAME" |
|
|
|
#move build directory to packages directory |
|
|
|
#move build directory to packages directory |
|
|
|
cp -R $PRODUCT_PATH $PACKAGE_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/>. |
|
|
|
# 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 |
|
|
|
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" |
|
|
|
CONTROL_FILE="$BASE_WORKING_DIR/DEBIAN/control" |
|
|
|
CHANGE_LOG_TEXT="changelog.txt" |
|
|
|
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" |
|
|
|
echo >> "$CHANGE_LOG_FILE" |
|
|
|
cat $CHANGE_LOG_TEXT >> "$CHANGE_LOG_FILE" |
|
|
|
cat $CHANGE_LOG_TEXT >> "$CHANGE_LOG_FILE" |
|
|
|
echo >> "$CHANGE_LOG_FILE" |
|
|
|
echo >> "$CHANGE_LOG_FILE" |
|
|
|
echo "-- Claudio Valerio <claudio.valerio@oe-f.org> `date`" >> "$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 "Version: $VERSION" >> "$CONTROL_FILE" |
|
|
|
echo "Section: education" >> "$CONTROL_FILE" |
|
|
|
echo "Section: education" >> "$CONTROL_FILE" |
|
|
|
echo "Priority: optional" >> "$CONTROL_FILE" |
|
|
|
echo "Priority: optional" >> "$CONTROL_FILE" |
|
|
|
echo "Architecture: $ARCHITECTURE" >> "$CONTROL_FILE" |
|
|
|
echo "Architecture: $ARCHITECTURE" >> "$CONTROL_FILE" |
|
|
|
echo "Essential: no" >> "$CONTROL_FILE" |
|
|
|
echo "Essential: no" >> "$CONTROL_FILE" |
|
|
|
echo "Installed-Size: `du -s $PACKAGE_DIRECTORY | awk '{ print $1 }'`" >> "$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 "Homepage: http://oe-f.org" >> "$CONTROL_FILE" |
|
|
|
echo -n "Depends: " >> "$CONTROL_FILE" |
|
|
|
echo -n "Depends: " >> "$CONTROL_FILE" |
|
|
|
unset tab |
|
|
|
unset tab |
|
|
|
declare -a tab |
|
|
|
declare -a tab |
|
|
|
let count=0 |
|
|
|
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 |
|
|
|
for lib in `dpkg -S $l | awk -F":" '{ print $1 }'`; do |
|
|
|
#echo $lib |
|
|
|
#echo $lib |
|
|
|
presence=`echo ${tab[*]} | grep -c "$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" |
|
|
|
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 \; |
|
|
|
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 "[Desktop Entry]" > $APPLICATION_SHORTCUT |
|
|
|
echo "Version=$VERSION" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Version=$VERSION" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Encoding=UTF-8" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Encoding=UTF-8" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Name=$APPLICATION_NAME ($VERSION)" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Name=${APPLICATION_NAME} ($VERSION)" >> $APPLICATION_SHORTCUT |
|
|
|
echo "GenericName=$APPLICATION_NAME" >> $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 "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 "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 "StartupNotify=true" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Terminal=false" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Terminal=false" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Type=Application" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Type=Application" >> $APPLICATION_SHORTCUT |
|
|
|
echo "Categories=Education" >> $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" |
|
|
|
chmod 755 "$BASE_WORKING_DIR/DEBIAN/prerm" |
|
|
|
chmod 755 "$BASE_WORKING_DIR/DEBIAN/prerm" |
|
|
|
chmod 755 "$BASE_WORKING_DIR/DEBIAN/postint" |
|
|
|
chmod 755 "$BASE_WORKING_DIR/DEBIAN/postint" |
|
|
|
|
|
|
|
|
|
|
|
mkdir -p "install/linux" |
|
|
|
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 |
|
|
|
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" |
|
|
@ -391,16 +391,16 @@ dpkg -b "$BASE_WORKING_DIR" "install/linux/$DEBIAN_PACKAGE_NAME" |
|
|
|
#clean up mess |
|
|
|
#clean up mess |
|
|
|
rm -rf $BASE_WORKING_DIR |
|
|
|
rm -rf $BASE_WORKING_DIR |
|
|
|
|
|
|
|
|
|
|
|
notifyProgress "$APPLICATION_NAME" "Package built" |
|
|
|
notifyProgress "${APPLICATION_NAME}" "Package built" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ $CREATE_DIENA_DISTRIBUTION_ZIP == true ]; then |
|
|
|
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 |
|
|
|
cd install/linux |
|
|
|
$ZIP_PATH -1 --junk-paths ${ZIP_NAME} ${DEBIAN_PACKAGE_NAME} ../../ReleaseNotes.pdf ../../JournalDesModifications.pdf |
|
|
|
$ZIP_PATH -1 --junk-paths ${ZIP_NAME} ${DEBIAN_PACKAGE_NAME} ../../ReleaseNotes.pdf ../../JournalDesModifications.pdf |
|
|
|
cd - |
|
|
|
cd - |
|
|
|
notifyProgress "$APPLICATION_NAME" "Build Diena zip file for distribution" |
|
|
|
notifyProgress "${APPLICATION_NAME}" "Build Diena zip file for distribution" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
exit 0 |
|
|
|
exit 0 |
|
|
|