diff options
Diffstat (limited to 'meta/recipes-sato/puzzles/puzzles_git.bb')
-rw-r--r-- | meta/recipes-sato/puzzles/puzzles_git.bb | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb new file mode 100644 index 0000000000..11e922511c --- /dev/null +++ b/meta/recipes-sato/puzzles/puzzles_git.bb | |||
@@ -0,0 +1,60 @@ | |||
1 | SUMMARY = "Simon Tatham's Portable Puzzle Collection" | ||
2 | HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/" | ||
3 | |||
4 | DEPENDS = "gtk+ libxt" | ||
5 | |||
6 | # The libxt requires x11 in DISTRO_FEATURES | ||
7 | REQUIRED_DISTRO_FEATURES = "x11" | ||
8 | |||
9 | LICENSE = "MIT" | ||
10 | LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc" | ||
11 | |||
12 | SRC_URI = "git://git.tartarus.org/simon/puzzles.git \ | ||
13 | file://fix-compiling-failure-with-option-g-O.patch \ | ||
14 | " | ||
15 | SRCREV = "c296301a06ce49b87c954c9d15452521dfeddf1a" | ||
16 | PE = "1" | ||
17 | PV = "0.0+git${SRCPV}" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | inherit autotools-brokensep distro_features_check | ||
22 | |||
23 | do_configure_prepend () { | ||
24 | ./mkfiles.pl | ||
25 | } | ||
26 | |||
27 | FILES_${PN} = "${prefix}/bin/* ${datadir}/applications/*" | ||
28 | FILES_${PN}-dbg += "${prefix}/bin/.debug" | ||
29 | |||
30 | do_install () { | ||
31 | rm -rf ${D}/* | ||
32 | export prefix=${D} | ||
33 | export DESTDIR=${D} | ||
34 | install -d ${D}/${prefix}/bin/ | ||
35 | oe_runmake install | ||
36 | |||
37 | |||
38 | install -d ${D}/${datadir}/applications/ | ||
39 | |||
40 | # Create desktop shortcuts | ||
41 | cd ${D}/${prefix}/bin | ||
42 | for prog in *; do | ||
43 | if [ -x $prog ]; then | ||
44 | # Convert prog to Title Case | ||
45 | title=$(echo $prog | sed 's/\(^\| \)./\U&/g') | ||
46 | echo "making ${D}/${datadir}/applications/$prog.desktop" | ||
47 | cat <<STOP > ${D}/${datadir}/applications/$prog.desktop | ||
48 | [Desktop Entry] | ||
49 | Name=$title | ||
50 | Exec=${prefix}/bin/$prog | ||
51 | Icon=applications-games | ||
52 | Terminal=false | ||
53 | Type=Application | ||
54 | Categories=Game; | ||
55 | StartupNotify=true | ||
56 | X-MB-SingleInstance=true | ||
57 | STOP | ||
58 | fi | ||
59 | done | ||
60 | } | ||