blob: 9876fe0fd19c4cc6ad1c25b84fde3faa616a0776 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Portable Puzzle Collection"
2HOMEPAGE = "http://o-hand.com/"
3BUGTRACKER = "http://bugzilla.yoctoproject.org/"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://LICENCE;md5=f56ec6772dd1c7c367067bbea8ea1675 \
7 file://src/tree234.h;endline=28;md5=a188e6d250430ca094a54a82f48472a7 \
8 file://src/tree234.c;endline=28;md5=b4feb1976feebf8f1379093ed52f2945"
9
10SECTION = "x11"
Patrick Williamsf1e5d692016-03-30 15:21:19 -050011DEPENDS = "gtk+ gconf intltool-native librsvg gettext-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
13# libowl requires x11 in DISTRO_FEATURES
14DEPENDS_append_poky = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libowl', '', d)}"
15
16# Requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES
17REQUIRED_DISTRO_FEATURES = "x11"
18
19SRCREV = "92f1a20e4b72eed7a35b00984d9793b51dc2fb3b"
20PV = "0.2+git${SRCPV}"
21PR = "r10"
22
23SRC_URI = "git://git.yoctoproject.org/${BPN}"
24SRC_URI_append_poky = " file://oh-puzzles-owl-menu.patch;striplevel=0 "
25
26S = "${WORKDIR}/git"
27
28inherit autotools pkgconfig distro_features_check
29
30bindir = "/usr/games"
31
32EXTRA_OEMAKE += "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1"
33
34do_install_append () {
35 install -d ${D}/${datadir}/applications/
36
37 cd ${D}/${prefix}/games
38 for prog in *; do
39 if [ -x $prog ]; then
40 # Convert prog to Title Case
41 title=$(echo $prog | sed 's/\(^\| \)./\U&/g')
42 echo "making ${D}/${datadir}/applications/$prog.desktop"
43 cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
44[Desktop Entry]
45Name=$title
46Exec=${prefix}/games/$prog
47Icon=applications-games
48Terminal=false
49Type=Application
50Categories=Game;
51StartupNotify=true
52X-MB-SingleInstance=true
53Comment=Play $title.
54STOP
55 fi
56 done
57}
58
59PACKAGES += "${PN}-extra"
60RDEPENDS_${PN}-extra += "oh-puzzles"
61
62FILES_${PN} = "/usr/share/pixmaps /usr/share/oh-puzzles/"
63FILES_${PN}-dbg += "/usr/games/.debug/*"
64FILES_${PN}-extra = "/usr/games/ /usr/share/applications /etc/gconf/schemas"
65
66python __anonymous () {
67 var = bb.data.expand("FILES_${PN}", d, 1)
68 data = d.getVar(var, True)
69 for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"):
70 data = data + " /usr/games/%s" % name
71 data = data + " /usr/share/applications/%s.desktop" % name
72 data = data + " /etc/gconf/schemas/%s.schemas" % name
73 d.setVar(var, data)
74}