From 9d37d76fbf7535393838e5962db421113eba7c9b Mon Sep 17 00:00:00 2001 From: Alexander Trufanov Date: Sat, 14 Nov 2020 23:07:48 +0300 Subject: [PATCH] Building deb packets with ubuntu-dev-tools We switched on building deb packets for Linux according to Ubuntu instructions. Deb packets are supposed to be published on launchpad: https://launchpad.net/~truf/+archive/ubuntu/scantailor-universal You can update your system with packages from this untrusted PPA by adding ppa:truf/scantailor-universal to your system's Software Sources: sudo add-apt-repository ppa:truf/scantailor-universal sudo apt-get update --- CMakeLists.txt | 5 ++ cmake/SetDefaultGccFlags.cmake | 19 +++--- debian/changelog | 14 ++++ debian/control | 22 ++++++ .../copyright | 68 ------------------- debian/rules | 9 +++ debian/scantailor-universal.desktop | 11 +++ .../scantailor-universal.svg | 0 debian/source/format | 1 + packaging/linux/README | 26 +++++++ packaging/linux/prepare_files.sh | 11 --- 11 files changed, 99 insertions(+), 87 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/control rename packaging/linux/scantailor-univ-amd64.dbp => debian/copyright (79%) create mode 100755 debian/rules create mode 100644 debian/scantailor-universal.desktop rename resources/appicon.svg => debian/scantailor-universal.svg (100%) create mode 100644 debian/source/format create mode 100644 packaging/linux/README delete mode 100755 packaging/linux/prepare_files.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 8536e0606..6e9a6ba95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -717,6 +717,11 @@ ADD_CUSTOM_TARGET(compile_translations ALL DEPENDS ${QM_FILES}) INSTALL(FILES ${QM_FILES} DESTINATION "${TRANSLATIONS_DIR_REL}/") +IF(NOT WIN32 AND NOT APPLE) + INSTALL(FILES debian/scantailor-universal.svg DESTINATION "/usr/share/pixmaps/") + INSTALL(FILES debian/scantailor-universal.desktop DESTINATION "/usr/share/applications/") +ENDIF(NOT WIN32 AND NOT APPLE) + # uninstall target configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" diff --git a/cmake/SetDefaultGccFlags.cmake b/cmake/SetDefaultGccFlags.cmake index 2c39d1838..b2f168d39 100644 --- a/cmake/SetDefaultGccFlags.cmake +++ b/cmake/SetDefaultGccFlags.cmake @@ -18,15 +18,18 @@ MACRO(ST_SET_DEFAULT_GCC_FLAGS) SET(gc_sections_ldflags_ "-Wl,--gc-sections") ENDIF(gc_sections_supported_) - CHECK_CXX_ACCEPTS_FLAG("-fno-keep-inline-dllexport" no_inline_dllexport_supported_) - IF(no_inline_dllexport_supported_) - SET(no_inline_dllexport_cflags_ "-fno-keep-inline-dllexport") - ENDIF() + IF(WIN32) # disable this chack on linux due this problem: + # https://askubuntu.com/questions/1288365/pbuilder-dist-fails-if-cmake-cant-find-non-mandatary-c-feature-support + CHECK_CXX_ACCEPTS_FLAG("-fno-keep-inline-dllexport" no_inline_dllexport_supported_) + IF(no_inline_dllexport_supported_) + SET(no_inline_dllexport_cflags_ "-fno-keep-inline-dllexport") + ENDIF() + ENDIF(WIN32) - CHECK_CXX_ACCEPTS_FLAG("-Werror=return-type" werror_return_type_supported_) - IF(werror_return_type_supported_) - SET(werror_return_type_cflags_ "-Werror=return-type") - ENDIF() + CHECK_CXX_ACCEPTS_FLAG("-Werror=return-type" werror_return_type_supported_) + IF(werror_return_type_supported_) + SET(werror_return_type_cflags_ "-Werror=return-type") + ENDIF() IF(MINGW) CHECK_CXX_ACCEPTS_FLAG("-shared-libgcc -static-libstdc++" supported_) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..66b962cfd --- /dev/null +++ b/debian/changelog @@ -0,0 +1,14 @@ +scantailor-universal (0.2.9-0ubuntu1) bionic; urgency=medium + + * Ellipse zones in Output processing stage + * Allow to optionally remove input files too in pages remove dialog + * Improve Zone dragging behaviour + * Bugfixes + + -- Alexander Trufanov Fri, 14 Nov 2020 22:50:00 +0300 + +scantailor-universal (0.2.8-0ubuntu1) bionic; urgency=medium + + * First release on launchpad + + -- Alexander Trufanov Fri, 13 Nov 2020 00:03:41 +0300 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..8eecece2f --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: scantailor-universal +Section: graphics +Priority: optional +Maintainer: Alexander Trufanov +Build-Depends: debhelper-compat (= 9), qtbase5-dev (>=5.4), libtiff5-dev (>=4.0.3), libjpeg8-dev (>=8c), libgcc1 (>=1.3.0), libc6 (>=2.14), libpng-dev (>=1.6.2), libstdc++6 (>=5.2), qttools5-dev (>=5.4), libboost-dev (>=1.35.0), libboost-test-dev (>=1.35.0), cmake (>=2.8.9) +Standards-Version: 4.5.0 +Homepage: https://github.com/trufanov-nok/scantailor-universal +#Vcs-Browser: https://salsa.debian.org/debian/scantailor-universal +#Vcs-Git: https://salsa.debian.org/debian/scantailor-universal.git +Rules-Requires-Root: no + +Package: scantailor-universal +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: qttranslations5-l10n (>=5.4) +Description: Alternative version of ScanTailor: iinteractive post-processing tool for scanned pages + Scan Tailor is an interactive post-processing tool for scanned pages. It + performs operations such as page splitting, deskewing, adding/removing + borders, and others. You give it raw scans, and you get pages ready to be + printed or assembled into a PDF or DJVU file. Scanning, optical character + recognition, and assembling multi-page documents are out of scope of this + project. diff --git a/packaging/linux/scantailor-univ-amd64.dbp b/debian/copyright similarity index 79% rename from packaging/linux/scantailor-univ-amd64.dbp rename to debian/copyright index 56ae6dbdf..e1d1c0e77 100644 --- a/packaging/linux/scantailor-univ-amd64.dbp +++ b/debian/copyright @@ -1,49 +1,3 @@ -[DEBREATE-0.7.13] -<> -Package: scantailor-universal -Version: 0.2.1 -Maintainer: Alexander Trufanov -Section: graphics -Homepage: https://github.com/trufanov-nok/scantailor-universal -Architecture: amd64 -Priority: optional -Depends: libqt5widgets5 (>=5.4), libqt5xml5 (>=5.4), libqt5gui5 (>=5.4), libqt5core5a (>=5.4), libtiff5 (>=4.0.3), libjpeg8 (>=8c), libgcc1 (>=1.3.0), libc6 (>=2.14), libpng16-16 (>=1.6.2-1), libstdc++6 (>=5.2) -Recommends: qttranslations5-l10n (>=5.4) -Description: Alternative version of ScanTailor: iinteractive post-processing tool for scanned pages - Scan Tailor is an interactive post-processing tool for scanned pages. It - performs operations such as page splitting, deskewing, adding/removing - borders, and others. You give it raw scans, and you get pages ready to be - printed or assembled into a PDF or DJVU file. Scanning, optical character - recognition, and assembling multi-page documents are out of scope of this - project. - -<> -<> -1 -/home/truf/dev/pl/scantailor/build/scantailor-universal.svg -> scantailor-universal.svg -> /usr/share/pixmaps -/home/truf/dev/pl/scantailor/build/scantailor-universal_ru.qm -> scantailor-universal_ru.qm -> /usr/share/scantailor-universal/translations -/home/truf/dev/pl/scantailor/build/scantailor-universal-cli* -> scantailor-universal-cli -> /usr/bin -/home/truf/dev/pl/scantailor/build/scantailor-universal* -> scantailor-universal -> /usr/bin -<> -<> -<> -0 -<> -<> -0 -<> -<> -0 -<> -<> -0 -<> -<> -<> -<>DEFAULT<> - -<> -<> Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: https://github.com/trufanov-nok/scantailor-universal @@ -219,25 +173,3 @@ License: GPL-2+ . On Debian systems the full text of the GNU General Public License can be found in the `/usr/share/common-licenses/GPL-2' file. - -<> -<> -1 -[FILENAME=scantailor-universal.desktop] -Name=Scan Tailor Universal -Version=1.0 -Exec=scantailor-universal %f -Comment=Interactive post-processing tool for scanned pages -Icon=scantailor-universal -Type=Application -Terminal=false -StartupNotify=true -Encoding=UTF-8 -Categories=2DGraphics;Graphics;RasterGraphics;Scanning;Qt; -<> -<> -1 -1 -1 -strip -<> diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..ad6c7476f --- /dev/null +++ b/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 + +%: + dh $@ + +# override dh_auto_test bcs of this bug: https://askubuntu.com/questions/1287947/making-deb-with-bzr-qapplication-dependency +override_dh_auto_test: diff --git a/debian/scantailor-universal.desktop b/debian/scantailor-universal.desktop new file mode 100644 index 000000000..76b313496 --- /dev/null +++ b/debian/scantailor-universal.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Scan Tailor Universal +Version=1.0 +Exec=scantailor-universal %f +Comment=Interactive post-processing tool for scanned pages +Icon=scantailor-universal +Type=Application +Terminal=false +StartupNotify=true +Encoding=UTF-8 +Categories=2DGraphics;Graphics;RasterGraphics;Scanning;Qt; \ No newline at end of file diff --git a/resources/appicon.svg b/debian/scantailor-universal.svg similarity index 100% rename from resources/appicon.svg rename to debian/scantailor-universal.svg diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/packaging/linux/README b/packaging/linux/README new file mode 100644 index 000000000..f0bfa902b --- /dev/null +++ b/packaging/linux/README @@ -0,0 +1,26 @@ +We switched on building deb packets for Linux according to Ubuntu instructions. +In particular: +https://packaging.ubuntu.com/html/getting-set-up.html +https://packaging.ubuntu.com/html/packaging-new-software.html + +Deb packets are supposed to be published on launchpad: https://launchpad.net/~truf/+archive/ubuntu/scantailor-universal + +You can update your system with packages from this untrusted PPA by adding ppa:truf/scantailor-universal to your system's Software Sources: + +sudo add-apt-repository ppa:truf/scantailor-universal +sudo apt-get update + +If you want to build deb packet by himself you may follow instructions. +I'm leaving some key steps here just as a reminder for myself: + +bzr dh-make scantailor-universal 0.2.9 scantailor-universal-0.2.9.tar.gz +cd scantailor-universal/debian/ +rm *.ex *.EX README.* *.docs +cd .. +bzr builddeb -- -us -uc +bzr builddeb -S +cd ../build-area/ +pbuilder-dist bionic build scantailor-universal_0.2.9-0ubuntu1.dsc +gpg --list-secret-keys +debsign -k 2B79FA6A519BF20289519BBCA2F3EBCE5C719A67 scantailor-universal_0.2.9-0ubuntu1_source.changes +dput ppa:truf/scantailor-universal scantailor-universal_0.2.9-0ubuntu1_source.changes diff --git a/packaging/linux/prepare_files.sh b/packaging/linux/prepare_files.sh deleted file mode 100755 index 05c1417d7..000000000 --- a/packaging/linux/prepare_files.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -cd ../../build -cp ../resources/appicon.svg scantailor-universal.svg -# cmake and make are called here just to make sure that correct -# path prefix will be used in config.h and therefore in binary -# this path is used to search translation files -cmake -DCMAKE_INSTALL_PREFIX=/usr .. -make -cp scantailor scantailor-universal -cp scantailor-cli scantailor-universal-cli