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>
This commit is contained in:
parent
8375252712
commit
6ae96f7129
|
@ -21,7 +21,7 @@ PV = "0.0+git${SRCPV}"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
inherit autotools-brokensep distro_features_check pkgconfig
|
inherit autotools distro_features_check pkgconfig
|
||||||
|
|
||||||
PACKAGECONFIG ??= "gtk3"
|
PACKAGECONFIG ??= "gtk3"
|
||||||
PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+,"
|
PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+,"
|
||||||
|
@ -32,46 +32,41 @@ FILES_${PN} = ""
|
||||||
FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications"
|
FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications"
|
||||||
|
|
||||||
python __anonymous () {
|
python __anonymous () {
|
||||||
var = bb.data.expand("FILES_${PN}", d, 1)
|
var = d.expand("FILES_${PN}")
|
||||||
data = d.getVar(var, True)
|
data = d.getVar(var, False)
|
||||||
for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"):
|
for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"):
|
||||||
data = data + " ${prefix}/bin/%s" % name
|
data = data + " ${bindir}/%s" % name
|
||||||
data = data + " ${datadir}/applications/%s.desktop" % name
|
data = data + " ${datadir}/applications/%s.desktop" % name
|
||||||
d.setVar(var, data)
|
d.setVar(var, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
do_configure_prepend () {
|
do_configure_prepend () {
|
||||||
|
cd ${S}
|
||||||
./mkfiles.pl
|
./mkfiles.pl
|
||||||
|
cd ${B}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install () {
|
do_install_append () {
|
||||||
rm -rf ${D}/*
|
# net conflicts with Samba, so rename it
|
||||||
export prefix=${D}
|
mv ${D}${bindir}/net ${D}${bindir}/puzzles-net
|
||||||
export DESTDIR=${D}
|
|
||||||
install -d ${D}/${prefix}/bin/
|
|
||||||
oe_runmake install
|
|
||||||
|
|
||||||
|
|
||||||
install -d ${D}/${datadir}/applications/
|
|
||||||
|
|
||||||
# Create desktop shortcuts
|
# Create desktop shortcuts
|
||||||
|
install -d ${D}/${datadir}/applications/
|
||||||
cd ${D}/${prefix}/bin
|
cd ${D}/${prefix}/bin
|
||||||
for prog in *; do
|
for prog in *; do
|
||||||
if [ -x $prog ]; then
|
if [ -x $prog ]; then
|
||||||
# Convert prog to Title Case
|
# Convert prog to Title Case
|
||||||
title=$(echo $prog | sed 's/\(^\| \)./\U&/g')
|
title=$(echo $prog | sed 's/puzzles-//' | sed 's/\(^\| \)./\U&/g')
|
||||||
echo "making ${D}/${datadir}/applications/$prog.desktop"
|
echo "making ${D}/${datadir}/applications/$prog.desktop"
|
||||||
cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
|
cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=$title
|
Name=$title
|
||||||
Exec=${prefix}/bin/$prog
|
Exec=${bindir}/$prog
|
||||||
Icon=applications-games
|
Icon=applications-games
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Game;
|
Categories=Game;
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
X-MB-SingleInstance=true
|
|
||||||
STOP
|
STOP
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue