From 762f8412bcfc6acf911c91058eec4703bb5386f4 Mon Sep 17 00:00:00 2001 From: Tony George Date: Sun, 15 Nov 2020 13:48:47 +0530 Subject: [PATCH] Update build scripts --- BUILD_CONFIG | 14 ++++++++++ build-deb.sh | 66 --------------------------------------------- build-installers.sh | 60 ----------------------------------------- build-source.sh | 50 ---------------------------------- makefile | 6 +++++ timeshift.pot | 10 +++---- 6 files changed, 25 insertions(+), 181 deletions(-) delete mode 100755 build-deb.sh delete mode 100755 build-installers.sh delete mode 100755 build-source.sh diff --git a/BUILD_CONFIG b/BUILD_CONFIG index c0cb435..4b9fc2f 100644 --- a/BUILD_CONFIG +++ b/BUILD_CONFIG @@ -2,5 +2,19 @@ app_fullname="Timeshift" app_name="timeshift" pkg_name="timeshift" + pkg_version=$(dpkg-parsechangelog --show-field Version) + +build_deb=1 +build_rpm=0 +build_arch=0 + +deb_arch="amd64" # amd64 i386 arm64 armhf +rpm_arch="" # x86_64 i686 +arch_arch="" # x86_64 i686 + +pkg_version=$(dpkg-parsechangelog --show-field Version) + git_origin="git@github.com:teejee2008/timeshift.git" + + diff --git a/build-deb.sh b/build-deb.sh deleted file mode 100755 index 04a9af7..0000000 --- a/build-deb.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -for prog in pbuilder-dist make dpkg-source ; do - if sh -c "which $prog 2> /dev/null"; then true ; else echo "You don\'t have $prog, install it" ; exit ; fi -done - -backup=`pwd` -DIR="$( cd "$( dirname "$0" )" && pwd )" -cd $DIR - -. ./BUILD_CONFIG - -sh build-source.sh - -rm -fv release/${pkg_name}-*.deb - -build_deb_for_dist() { - -dist=$1 -arch=$2 - -echo "" -echo "==========================================================================" -echo " build-deb.sh : $dist-$arch" -echo "==========================================================================" -echo "" - -rm -rfv release/${arch} -mkdir -pv release/${arch} - -echo "-------------------------------------------------------------------------" - -pbuilder-dist $dist $arch build release/source/${pkg_name}*.dsc --buildresult release/$arch - -if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi - -echo "--------------------------------------------------------------------------" - -cp -pv --no-preserve=ownership release/${arch}/${pkg_name}*.deb release/${pkg_name}-v${pkg_version}-${arch}.deb - -if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi - -echo "--------------------------------------------------------------------------" - -} - -arches="" -if [ -z $1 ]; then - arches="i386 amd64" -else - arches="$1" -fi - -for arch in $arches -do - -build_deb_for_dist xenial $arch - -done - -#build_deb_for_dist xenial i386 -#build_deb_for_dist xenial amd64 -#build_deb_for_dist stretch armel -#build_deb_for_dist stretch armhf - -cd "$backup" diff --git a/build-installers.sh b/build-installers.sh deleted file mode 100755 index 2ebd439..0000000 --- a/build-installers.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -for prog in pbuilder-dist make dpkg-source ; do - if sh -c "which $prog 2> /dev/null" ; then true ; else echo "You don\'t have $prog, install it" ; exit ; fi -done - -backup=`pwd` -DIR="$( cd "$( dirname "$0" )" && pwd )" -cd $DIR - -. ./BUILD_CONFIG - -rm -vf release/*.run -rm -vf release/*.deb - -arches="" -if [ -z $1 ]; then - arches="i386 amd64" - # build deb - sh build-deb.sh -else - arches="$1" - # build deb - sh build-deb.sh "$1" -fi - -for arch in $arches -do - -rm -rfv release/${arch}/files -mkdir -pv release/${arch}/files - -echo "" -echo "==========================================================================" -echo " build-installers.sh : $arch" -echo "==========================================================================" -echo "" - -dpkg-deb -x release/${pkg_name}-v${pkg_version}-${arch}.deb release/${arch}/files - -if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1;fi - -echo "--------------------------------------------------------------------------" - -rm -rfv release/${arch}/${pkg_name}*.* # remove source files created by pbuilder -cp -pv --no-preserve=ownership release/sanity.config release/${arch}/sanity.config -sanity --generate --base-path release/${arch} --out-path release --arch ${arch} --xz - -if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi - -mv -v release/*${arch}.run release/${pkg_name}-v${pkg_version}-${arch}.run - -echo "--------------------------------------------------------------------------" - -done - -cp -vf release/*.run ../PACKAGES/ -cp -vf release/*.deb ../PACKAGES/ - -cd "$backup" diff --git a/build-source.sh b/build-source.sh deleted file mode 100755 index e2e3641..0000000 --- a/build-source.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -for prog in pbuilder-dist make dpkg-source ; do - if sh -c "which $prog 2> /dev/null"; then true ; else echo "You don\'t have $prog, install it" ; exit ; fi -done - -backup=`pwd` -DIR="$( cd "$( dirname "$0" )" && pwd )" -cd "$DIR" - -. ./BUILD_CONFIG - -echo "" -echo "==========================================================================" -echo " build-source.sh" -echo "==========================================================================" -echo "" - -echo "app_name: $app_name" -echo "pkg_name: $pkg_name" -echo "--------------------------------------------------------------------------" - -# clean build dir - -rm -rfv /tmp/builds -mkdir -pv /tmp/builds - -make clean - -rm -rfv release/source -mkdir -pv release/source - -echo "--------------------------------------------------------------------------" - -# build source package -dpkg-source --build ./ - -mv -vf ../$pkg_name*.dsc release/source/ -mv -vf ../$pkg_name*.tar.xz release/source/ - -if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi - -echo "--------------------------------------------------------------------------" - -# list files -ls -l release/source - -echo "-------------------------------------------------------------------------" - -cd "$backup" diff --git a/makefile b/makefile index 94a8161..1bf17fd 100644 --- a/makefile +++ b/makefile @@ -13,6 +13,12 @@ pot: manpage: cd src; make manpage +dist-release: + build + +dist-deb: + build-deb amd64 + clean: cd src; make clean diff --git a/timeshift.pot b/timeshift.pot index 82c8ce3..ba25d32 100644 --- a/timeshift.pot +++ b/timeshift.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: timeshift 18.2\n" "Report-Msgid-Bugs-To: teejeetech@gmail.com\n" -"POT-Creation-Date: 2020-11-15 13:22+0530\n" +"POT-Creation-Date: 2020-11-15 13:47+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -299,7 +299,7 @@ msgstr "" msgid "Building file list..." msgstr "" -#: Utility/GtkHelper.vala:122 Utility/Gtk/CustomMessageDialog.vala:172 +#: Utility/GtkHelper.vala:120 Utility/Gtk/CustomMessageDialog.vala:172 #: Gtk/RestoreWindow.vala:209 Gtk/RestoreWindow.vala:218 #: Gtk/SetupWizardWindow.vala:220 Gtk/BackupWindow.vala:181 #: Gtk/DeleteWindow.vala:190 @@ -752,7 +752,7 @@ msgstr "" msgid "Enter passphrase to unlock '%s'" msgstr "" -#: Utility/GtkHelper.vala:805 +#: Utility/GtkHelper.vala:623 msgid "Enter path or browse for directory" msgstr "" @@ -1463,7 +1463,7 @@ msgid "" "Older snapshots will be removed once this limit is exceeded." msgstr "" -#: Utility/GtkHelper.vala:121 Utility/Gtk/CustomMessageDialog.vala:167 +#: Utility/GtkHelper.vala:119 Utility/Gtk/CustomMessageDialog.vala:167 #: Utility/Gtk/CustomMessageDialog.vala:171 Gtk/SettingsWindow.vala:123 #: Gtk/ExcludeListSummaryWindow.vala:84 Core/SnapshotRepo.vala:615 msgid "OK" @@ -1853,7 +1853,7 @@ msgstr "" msgid "Select GRUB device" msgstr "" -#: Utility/GtkHelper.vala:815 +#: Utility/GtkHelper.vala:633 msgid "Select Path" msgstr ""