Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | file://0001-Use-labs-instead-of-abs.patch \ |
| 15 | " |
| 16 | SRCREV = "c296301a06ce49b87c954c9d15452521dfeddf1a" |
| 17 | PE = "1" |
| 18 | PV = "0.0+git${SRCPV}" |
| 19 | |
| 20 | S = "${WORKDIR}/git" |
| 21 | |
| 22 | inherit autotools-brokensep distro_features_check |
| 23 | |
| 24 | do_configure_prepend () { |
| 25 | ./mkfiles.pl |
| 26 | } |
| 27 | |
| 28 | FILES_${PN} = "${prefix}/bin/* ${datadir}/applications/*" |
| 29 | FILES_${PN}-dbg += "${prefix}/bin/.debug" |
| 30 | |
| 31 | do_install () { |
| 32 | rm -rf ${D}/* |
| 33 | export prefix=${D} |
| 34 | export DESTDIR=${D} |
| 35 | install -d ${D}/${prefix}/bin/ |
| 36 | oe_runmake install |
| 37 | |
| 38 | |
| 39 | install -d ${D}/${datadir}/applications/ |
| 40 | |
| 41 | # Create desktop shortcuts |
| 42 | cd ${D}/${prefix}/bin |
| 43 | for prog in *; do |
| 44 | if [ -x $prog ]; then |
| 45 | # Convert prog to Title Case |
| 46 | title=$(echo $prog | sed 's/\(^\| \)./\U&/g') |
| 47 | echo "making ${D}/${datadir}/applications/$prog.desktop" |
| 48 | cat <<STOP > ${D}/${datadir}/applications/$prog.desktop |
| 49 | [Desktop Entry] |
| 50 | Name=$title |
| 51 | Exec=${prefix}/bin/$prog |
| 52 | Icon=applications-games |
| 53 | Terminal=false |
| 54 | Type=Application |
| 55 | Categories=Game; |
| 56 | StartupNotify=true |
| 57 | X-MB-SingleInstance=true |
| 58 | STOP |
| 59 | fi |
| 60 | done |
| 61 | } |