on xenial help sign in
recommends phone scopes for now generated from libunity-scopes-json-def-phone
commit7684ca73cdda67e84f23f32b9a0e99a8eaae7887 authorDidier Roche <didrocks@ubuntu.com> dateFri 28 Jun 2013, 16:47 (13 years ago) parent2253912
3 files changed+34−1
debian/control+3−1 debian/rules+4 debian/scopes-recommends-generator+27
debian/control+3−1
@@ -26,6 +26,7 @@ Build-Depends: cmake,
2626 qtdeclarative5-ubuntu-ui-toolkit-plugin,
2727 qtdeclarative5-xmllistmodel-plugin,
2828 ttf-ubuntu-font-family,
29+ libunity-scopes-json-def-phone,
2930Standards-Version: 3.9.4
3031Homepage: http://launchpad.net/unity
3132# If you aren't a member of ~unity-team but need to upload
@@ -46,7 +47,8 @@ Depends: ${misc:Depends},
4647 unity-notifications-impl-1,
4748 qtdeclarative5-xmllistmodel-plugin,
4849 unity8-fake-env | qtubuntu-shell,
49−Recommends: indicators-client-plugin-datetime (>= 0.6.1),
50+Recommends: ${unity-default-masterscopes},
51+ indicators-client-plugin-datetime (>= 0.6.1),
5052 indicators-client-plugin-messaging (>= 0.6.1),
5153 indicators-client-plugin-network (>= 0.6.1),
5254 indicators-client-plugin-power (>= 0.6.1),
debian/rules+4
@@ -6,6 +6,8 @@
66export DPKG_GENSYMBOLS_CHECK_LEVEL=4
77export NO_PNG_PKG_MANGLE=1
88
9+SCOPES_RECOMMENDS := $(shell perl debian/scopes-recommends-generator /usr/share/unity/client-scopes.json)
10+
911%:
1012 dh $@ --parallel --fail-missing --with python2
1113
@@ -26,3 +28,5 @@ override_dh_makeshlibs:
2628override_dh_shlibdeps:
2729 dh_shlibdeps -XlibMockLightDM-qml.so
2830
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;