summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-06-21 19:59:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-23 14:26:17 +0100
commit6ae96f7129b547d9df799be61217ea55e3790a98 (patch)
treea929449bf27f084ac054f52deb04f7c99b2f10a3
parent837525271286cdfb33e8573c81726af768b58ca3 (diff)
downloadpoky-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.bb29
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
22S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"
23 23
24inherit autotools-brokensep distro_features_check pkgconfig 24inherit autotools distro_features_check pkgconfig
25 25
26PACKAGECONFIG ??= "gtk3" 26PACKAGECONFIG ??= "gtk3"
27PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+," 27PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+,"
@@ -32,46 +32,41 @@ FILES_${PN} = ""
32FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications" 32FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications"
33 33
34python __anonymous () { 34python __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
44do_configure_prepend () { 43do_configure_prepend () {
44 cd ${S}
45 ./mkfiles.pl 45 ./mkfiles.pl
46 cd ${B}
46} 47}
47 48
48do_install () { 49do_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]
67Name=$title 63Name=$title
68Exec=${prefix}/bin/$prog 64Exec=${bindir}/$prog
69Icon=applications-games 65Icon=applications-games
70Terminal=false 66Terminal=false
71Type=Application 67Type=Application
72Categories=Game; 68Categories=Game;
73StartupNotify=true 69StartupNotify=true
74X-MB-SingleInstance=true
75STOP 70STOP
76 fi 71 fi
77 done 72 done