Merge ~a-volkov/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging into ~kubuntu-packagers/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging

Proposed by Alexander Volkov
Status: Needs review
Proposed branch: ~a-volkov/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging
Merge into: ~kubuntu-packagers/kubuntu-packaging/+git/powerdevil:kubuntu_hirsute_staging
Diff against target: 57 lines (+25/-0)
3 files modified
debian/control (+1/-0)
debian/powerdevil.postinst.in (+18/-0)
debian/rules (+6/-0)
Reviewer Review Type Date Requested Status
Kubuntu Packagers Pending
Review via email: mp+394460@code.launchpad.net
To post a comment you must log in.

Unmerged commits

445f0ea... by Alexander Volkov

Set CAP_WAKE_ALARM capability for powerdevil in postinst

powerdevil needs this since version 5.20 to wake system up by schedule,
which can be used for example by an alarm application or a push notification
helper.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/control b/debian/control
2index c80181a..bedd53b 100644
3--- a/debian/control
4+++ b/debian/control
5@@ -70,6 +70,7 @@ Description: Global power saver settings ui library.
6 Package: powerdevil
7 Architecture: any
8 Depends: powerdevil-data (= ${source:Version}),
9+ libcap2-bin [linux-any],
10 ${misc:Depends},
11 ${shlibs:Depends},
12 Breaks: kde-workspace-data (<< 4:4.98.0)
13diff --git a/debian/powerdevil.postinst.in b/debian/powerdevil.postinst.in
14new file mode 100644
15index 0000000..7ede553
16--- /dev/null
17+++ b/debian/powerdevil.postinst.in
18@@ -0,0 +1,18 @@
19+#!/bin/sh
20+
21+set -e
22+
23+if [ "$1" = configure ]; then
24+ # Set the capabilities
25+ if command -v setcap > /dev/null && \
26+ setcap "CAP_WAKE_ALARM=+ep" \
27+ "/usr/lib/#DEB_HOST_MULTIARCH#/libexec/org_kde_powerdevil"; then
28+ echo "Sucessfully set capabilities for powerdevil"
29+ else
30+ echo "Failed to set capabilities for powerdevil" >&2
31+ fi
32+fi
33+
34+#DEBHELPER#
35+
36+exit 0
37diff --git a/debian/rules b/debian/rules
38index 22521c5..1c85eb4 100755
39--- a/debian/rules
40+++ b/debian/rules
41@@ -1,6 +1,7 @@
42 #!/usr/bin/make -f
43
44 export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
45+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
46
47 l10npkgs_firstversion_ok := 4:4.14.0-2
48 include /usr/share/pkg-kde-tools/qt-kde-team/2/l10n-packages.mk
49@@ -13,3 +14,8 @@ override_dh_strip:
50
51 override_dh_gencontrol: l10npkgs_firstversion_ok
52 dh_gencontrol
53+
54+override_dh_installdeb:
55+ sed 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/' \
56+ debian/powerdevil.postinst.in > debian/powerdevil.postinst
57+ dh_installdeb

Subscribers

People subscribed via source and target branches