diff options
author | Ross Burton <ross.burton@intel.com> | 2016-06-21 19:59:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-23 14:26:17 +0100 |
commit | 6ae96f7129b547d9df799be61217ea55e3790a98 (patch) | |
tree | a929449bf27f084ac054f52deb04f7c99b2f10a3 | |
parent | 837525271286cdfb33e8573c81726af768b58ca3 (diff) | |
download | poky-6ae96f7129b547d9df799be61217ea55e3790a98.tar.gz |
puzzles: fix Samba conflict, clean up recipe
The impetus for this was that puzzles-extra contains /usr/bin/net which
conflicts with Samba. Hopefully it's not controversial to say that Samba has
priority here, so rename the binary in this recipe to puzzles-net.
Also fix the out-of-tree build problems (just run mkfiles in ${S}) so
autotools-brokensep doesn't need to be used.
Modernise the anonymous Python block.
Use ${bindir} instead of ${prefix}/bin.
Use autotools do_install and append instead of brokenly replicating the install
logic.
(From OE-Core rev: afb40bf179a58b7f3a8e365d87510ba2c54437d0)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-sato/puzzles/puzzles_git.bb | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb index a9daacdaf2..2c755d8df8 100644 --- a/meta/recipes-sato/puzzles/puzzles_git.bb +++ b/meta/recipes-sato/puzzles/puzzles_git.bb | |||
@@ -21,7 +21,7 @@ PV = "0.0+git${SRCPV}" | |||
21 | 21 | ||
22 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
23 | 23 | ||
24 | inherit autotools-brokensep distro_features_check pkgconfig | 24 | inherit autotools distro_features_check pkgconfig |
25 | 25 | ||
26 | PACKAGECONFIG ??= "gtk3" | 26 | PACKAGECONFIG ??= "gtk3" |
27 | PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+," | 27 | PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+," |
@@ -32,46 +32,41 @@ FILES_${PN} = "" | |||
32 | FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications" | 32 | FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications" |
33 | 33 | ||
34 | python __anonymous () { | 34 | python __anonymous () { |
35 | var = bb.data.expand("FILES_${PN}", d, 1) | 35 | var = d.expand("FILES_${PN}") |
36 | data = d.getVar(var, True) | 36 | data = d.getVar(var, False) |
37 | for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"): | 37 | for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"): |
38 | data = data + " ${prefix}/bin/%s" % name | 38 | data = data + " ${bindir}/%s" % name |
39 | data = data + " ${datadir}/applications/%s.desktop" % name | 39 | data = data + " ${datadir}/applications/%s.desktop" % name |
40 | d.setVar(var, data) | 40 | d.setVar(var, data) |
41 | } | 41 | } |
42 | 42 | ||
43 | |||
44 | do_configure_prepend () { | 43 | do_configure_prepend () { |
44 | cd ${S} | ||
45 | ./mkfiles.pl | 45 | ./mkfiles.pl |
46 | cd ${B} | ||
46 | } | 47 | } |
47 | 48 | ||
48 | do_install () { | 49 | do_install_append () { |
49 | rm -rf ${D}/* | 50 | # net conflicts with Samba, so rename it |
50 | export prefix=${D} | 51 | mv ${D}${bindir}/net ${D}${bindir}/puzzles-net |
51 | export DESTDIR=${D} | ||
52 | install -d ${D}/${prefix}/bin/ | ||
53 | oe_runmake install | ||
54 | |||
55 | |||
56 | install -d ${D}/${datadir}/applications/ | ||
57 | 52 | ||
58 | # Create desktop shortcuts | 53 | # Create desktop shortcuts |
54 | install -d ${D}/${datadir}/applications/ | ||
59 | cd ${D}/${prefix}/bin | 55 | cd ${D}/${prefix}/bin |
60 | for prog in *; do | 56 | for prog in *; do |
61 | if [ -x $prog ]; then | 57 | if [ -x $prog ]; then |
62 | # Convert prog to Title Case | 58 | # Convert prog to Title Case |
63 | title=$(echo $prog | sed 's/\(^\| \)./\U&/g') | 59 | title=$(echo $prog | sed 's/puzzles-//' | sed 's/\(^\| \)./\U&/g') |
64 | echo "making ${D}/${datadir}/applications/$prog.desktop" | 60 | echo "making ${D}/${datadir}/applications/$prog.desktop" |
65 | cat <<STOP > ${D}/${datadir}/applications/$prog.desktop | 61 | cat <<STOP > ${D}/${datadir}/applications/$prog.desktop |
66 | [Desktop Entry] | 62 | [Desktop Entry] |
67 | Name=$title | 63 | Name=$title |
68 | Exec=${prefix}/bin/$prog | 64 | Exec=${bindir}/$prog |
69 | Icon=applications-games | 65 | Icon=applications-games |
70 | Terminal=false | 66 | Terminal=false |
71 | Type=Application | 67 | Type=Application |
72 | Categories=Game; | 68 | Categories=Game; |
73 | StartupNotify=true | 69 | StartupNotify=true |
74 | X-MB-SingleInstance=true | ||
75 | STOP | 70 | STOP |
76 | fi | 71 | fi |
77 | done | 72 | done |