Bug 361742 - debian/rules uses deprecated /usr/share/pkg-kde-tools/qt-kde-team/3/debian-qt-kde.mk
Summary: debian/rules uses deprecated /usr/share/pkg-kde-tools/qt-kde-team/3/debian-qt...
Status: RESOLVED FIXED
Alias: None
Product: wacomtablet
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Debian unstable Linux
: NOR grave
Target Milestone: ---
Assignee: Jörg Ehrichs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 00:20 UTC by onitake
Modified: 2018-03-16 19:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description onitake 2016-04-14 00:20:17 UTC
When trying to build wacomtablet on current Debian stretch/sid, it will fail with the message:
### debian_qt_kde.mk can only be used with packages (originally) maintained by
### Debian Qt/KDE Maintainers, please read /usr/share/pkg-kde-tools/qt-kde-team/README
### for more details. Please read /usr/share/doc/pkg-kde-tools/README.Debian for more
### information on how to use pkg-kde-tools with other KDE packages.

Furthermore, the previously suggested replacement (/usr/share/pkg-kde-tools/makefiles/1/debhelper/kde.mk) was dropped in pkg-kde-tools 0.7.0.

The current best practice seems to either use CDBS or simply not depend on pkg-kde-tools at all.

Either solution works quite well, except that the Qt5/KF5 plugin directory is not /usr/lib/<arch triplet>/plugins but /usr/lib/<arch triplet>/qt5/plugins, which causes files to be installed in the wrong place and not being found at runtime.

Another package, kcm-fcitx had a similar problem, which was fixed by hardcoding the path: http://anonscm.debian.org/cgit/pkg-ime/kcm-fcitx.git/commit/?id=167141842f65d408bc3df2140dc01d217429aac7

I applied a similar fix to debian/rules, resulting in a working built package. However, this "fix" doesn't seem very clean to me. Perhaps there is a better way to make the cmake scripts use the correct plugin path?

Reproducible: Always

Steps to Reproduce:
Build wacomtablet on Debian stretch/sid with:
dpkg-buildpackage -b -us -uc

Actual Results:  
The build fails with:
### debian_qt_kde.mk can only be used with packages (originally) maintained by
### Debian Qt/KDE Maintainers, please read /usr/share/pkg-kde-tools/qt-kde-team/README
### for more details. Please read /usr/share/doc/pkg-kde-tools/README.Debian for more
### information on how to use pkg-kde-tools with other KDE packages.

Removing the line
include /usr/share/pkg-kde-tools/qt-kde-team/3/debian-qt-kde.mk
makes the package build, but plugins are installed into the wrong locations.

Expected Results:  
kde-config-tablet_<version>_amd64.deb is produced, and all files are installed in the correct locations.

My "fixed" version of debian/rules is as follows:

#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)

%:
	dh $@ --with kde

override_dh_shlibdeps:
	dh_shlibdeps -Xplasma_engine_wacomtablet.so -- -dRecommends debian/kde-config-tablet/usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/dataengine/plasma_engine_wacomtablet.so -dDepends

override_dh_auto_configure:
	dh_auto_configure -- \
	    -DCMAKE_BUILD_TYPE=Release \
	    -DLIB_INSTALL_DIR=$(LIB_INSTALL_DIR) \
	    -DCMAKE_INSTALL_PLUGINDIR=$(LIB_INSTALL_DIR)/qt5/plugins
Comment 1 Valerii Malov 2018-03-16 19:40:10 UTC
Closing this because Debian control files and rpm spec files have been removed from the repository (to avoid clashing with distribution specific build stuff and confusing maintainers)