kubuntu-council team mailing list archive
-
kubuntu-council team
-
Mailing list archive
-
Message #00701
[Merge] ~a-volkov/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging into ~kubuntu-packagers/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging
Alexander Volkov has proposed merging ~a-volkov/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging into ~kubuntu-packagers/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging.
Requested reviews:
Kubuntu Packagers (kubuntu-packagers)
For more details, see:
https://code.launchpad.net/~a-volkov/kubuntu-packaging/+git/powerdevil/+merge/394460
--
Your team Kubuntu Packagers is requested to review the proposed merge of ~a-volkov/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging into ~kubuntu-packagers/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging.
diff --git a/debian/control b/debian/control
index c80181a..bedd53b 100644
--- a/debian/control
+++ b/debian/control
@@ -70,6 +70,7 @@ Description: Global power saver settings ui library.
Package: powerdevil
Architecture: any
Depends: powerdevil-data (= ${source:Version}),
+ libcap2-bin [linux-any],
${misc:Depends},
${shlibs:Depends},
Breaks: kde-workspace-data (<< 4:4.98.0)
diff --git a/debian/powerdevil.postinst.in b/debian/powerdevil.postinst.in
new file mode 100644
index 0000000..7ede553
--- /dev/null
+++ b/debian/powerdevil.postinst.in
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = configure ]; then
+ # Set the capabilities
+ if command -v setcap > /dev/null && \
+ setcap "CAP_WAKE_ALARM=+ep" \
+ "/usr/lib/#DEB_HOST_MULTIARCH#/libexec/org_kde_powerdevil"; then
+ echo "Sucessfully set capabilities for powerdevil"
+ else
+ echo "Failed to set capabilities for powerdevil" >&2
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
index 22521c5..1c85eb4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,7 @@
#!/usr/bin/make -f
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
l10npkgs_firstversion_ok := 4:4.14.0-2
include /usr/share/pkg-kde-tools/qt-kde-team/2/l10n-packages.mk
@@ -13,3 +14,8 @@ override_dh_strip:
override_dh_gencontrol: l10npkgs_firstversion_ok
dh_gencontrol
+
+override_dh_installdeb:
+ sed 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/' \
+ debian/powerdevil.postinst.in > debian/powerdevil.postinst
+ dh_installdeb