on xenial help sign in
recommends phone scopes for now generated from libunity-scopes-json-def-phone
7684ca7Didier Roche
debian/control+3−1
@@ -26,6 +26,7 @@ Build-Depends: cmake,
26 qtdeclarative5-ubuntu-ui-toolkit-plugin,
26 qtdeclarative5-ubuntu-ui-toolkit-plugin,
27 qtdeclarative5-xmllistmodel-plugin,
27 qtdeclarative5-xmllistmodel-plugin,
28 ttf-ubuntu-font-family,
28 ttf-ubuntu-font-family,
29+ libunity-scopes-json-def-phone,
29Standards-Version: 3.9.4
30Standards-Version: 3.9.4
30Homepage: http://launchpad.net/unity
31Homepage: http://launchpad.net/unity
31# If you aren't a member of ~unity-team but need to upload
32# If you aren't a member of ~unity-team but need to upload
@@ -46,7 +47,8 @@ Depends: ${misc:Depends},
46 unity-notifications-impl-1,
47 unity-notifications-impl-1,
47 qtdeclarative5-xmllistmodel-plugin,
48 qtdeclarative5-xmllistmodel-plugin,
48 unity8-fake-env | qtubuntu-shell,
49 unity8-fake-env | qtubuntu-shell,
50+Recommends: ${unity-default-masterscopes},
49−Recommends: indicators-client-plugin-datetime (>= 0.6.1),
51+ indicators-client-plugin-datetime (>= 0.6.1),
50 indicators-client-plugin-messaging (>= 0.6.1),
52 indicators-client-plugin-messaging (>= 0.6.1),
51 indicators-client-plugin-network (>= 0.6.1),
53 indicators-client-plugin-network (>= 0.6.1),
52 indicators-client-plugin-power (>= 0.6.1),
54 indicators-client-plugin-power (>= 0.6.1),
debian/rules+4
@@ -6,6 +6,8 @@
6export DPKG_GENSYMBOLS_CHECK_LEVEL=4
6export DPKG_GENSYMBOLS_CHECK_LEVEL=4
7export NO_PNG_PKG_MANGLE=1
7export NO_PNG_PKG_MANGLE=1
8
8
9+SCOPES_RECOMMENDS := $(shell perl debian/scopes-recommends-generator /usr/share/unity/client-scopes.json)
10+
9%:
11%:
10 dh $@ --parallel --fail-missing --with python2
12 dh $@ --parallel --fail-missing --with python2
11
13
@@ -26,3 +28,5 @@ override_dh_makeshlibs:
26override_dh_shlibdeps:
28override_dh_shlibdeps:
27 dh_shlibdeps -XlibMockLightDM-qml.so
29 dh_shlibdeps -XlibMockLightDM-qml.so
28
30
31+override_dh_gencontrol:
32+ dh_gencontrol -- -Vunity-default-masterscopes="$(SCOPES_RECOMMENDS)"
debian/scopes-recommends-generatornew file+27
@@ -0,0 +1,27 @@
1+#!/usr/bin/perl -w
2+
3+use strict;
4+binmode STDOUT, ":utf8";
5+use utf8;
6+
7+use JSON;
8+
9+my $json;
10+{
11+ local $/; #Enable 'slurp' mode
12+ open my $fh, "<", $ARGV[0];
13+ $json = <$fh>;
14+ close $fh;
15+}
16+# get it to a scalar
17+my $j = "[" . $json . "]";
18+
19+my $decoded_json = decode_json( $j );
20+
21+my $recommends_list = "";
22+for my $record ( @$decoded_json ) {
23+ foreach my $key ( keys(%$record) ) {
24+ $recommends_list = $recommends_list . $key . ", ";
25+ }
26+}
27+print $recommends_list;