blob: 95826c1b60d0b79bf566476842b446ad728bd843 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Simon Tatham's Portable Puzzle Collection"
2HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
3
4DEPENDS = "gtk+ libxt"
5
6# The libxt requires x11 in DISTRO_FEATURES
7REQUIRED_DISTRO_FEATURES = "x11"
8
9LICENSE = "MIT"
10LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
11
12SRC_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"
16SRCREV = "c296301a06ce49b87c954c9d15452521dfeddf1a"
17PE = "1"
18PV = "0.0+git${SRCPV}"
19
20S = "${WORKDIR}/git"
21
22inherit autotools-brokensep distro_features_check
23
24do_configure_prepend () {
25 ./mkfiles.pl
26}
27
28FILES_${PN} = "${prefix}/bin/* ${datadir}/applications/*"
29FILES_${PN}-dbg += "${prefix}/bin/.debug"
30
31do_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]
50Name=$title
51Exec=${prefix}/bin/$prog
52Icon=applications-games
53Terminal=false
54Type=Application
55Categories=Game;
56StartupNotify=true
57X-MB-SingleInstance=true
58STOP
59 fi
60 done
61}