Skip to content

Commit

Permalink
Building deb packets with ubuntu-dev-tools
Browse files Browse the repository at this point in the history
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
  • Loading branch information
trufanov-nok committed Nov 14, 2020
1 parent 13e2d41 commit 9d37d76
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 87 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
19 changes: 11 additions & 8 deletions cmake/SetDefaultGccFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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_)
Expand Down
14 changes: 14 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> Fri, 14 Nov 2020 22:50:00 +0300

scantailor-universal (0.2.8-0ubuntu1) bionic; urgency=medium

* First release on launchpad

-- Alexander Trufanov <[email protected]> Fri, 13 Nov 2020 00:03:41 +0300
22 changes: 22 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Source: scantailor-universal
Section: graphics
Priority: optional
Maintainer: Alexander Trufanov <[email protected]>
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.
68 changes: 0 additions & 68 deletions packaging/linux/scantailor-univ-amd64.dbp → debian/copyright
Original file line number Diff line number Diff line change
@@ -1,49 +1,3 @@
[DEBREATE-0.7.13]
<<CTRL>>
Package: scantailor-universal
Version: 0.2.1
Maintainer: Alexander Trufanov <[email protected]>
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.

<</CTRL>>
<<FILES>>
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
<</FILES>>
<<SCRIPTS>>
<<PREINST>>
0
<</PREINST>>
<<POSTINST>>
0
<</POSTINST>>
<<PRERM>>
0
<</PRERM>>
<<POSTRM>>
0
<</POSTRM>>
<</SCRIPTS>>
<<CHANGELOG>>
<<DEST>>DEFAULT<</DEST>>

<</CHANGELOG>>
<<COPYRIGHT>>
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/trufanov-nok/scantailor-universal

Expand Down Expand Up @@ -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.

<</COPYRIGHT>>
<<MENU>>
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;
<</MENU>>
<<BUILD>>
1
1
1
strip
<</BUILD>>
9 changes: 9 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -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:
11 changes: 11 additions & 0 deletions debian/scantailor-universal.desktop
Original file line number Diff line number Diff line change
@@ -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;
File renamed without changes
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
26 changes: 26 additions & 0 deletions packaging/linux/README
Original file line number Diff line number Diff line change
@@ -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
11 changes: 0 additions & 11 deletions packaging/linux/prepare_files.sh

This file was deleted.

0 comments on commit 9d37d76

Please sign in to comment.