blob: 4b045886826c9eae1c43072ae5a930de6c52d256 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Simon Tatham's Portable Puzzle Collection"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "Collection of small computer programs which implement one-player puzzle games."
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08004LICENSE = "MIT"
Patrick Williams864cc432023-02-09 14:54:44 -06005LIC_FILES_CHKSUM = "file://LICENCE;md5=92d2b7a2fc96b5f7f17101df7db1fefa"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007# gtk support includes a bunch of x11 headers
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008REQUIRED_DISTRO_FEATURES = "x11"
9
Andrew Geissler028142b2023-05-05 11:29:21 -050010SRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main;protocol=https"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011
Brad Bishop316dfdd2018-06-25 12:45:53 -040012UPSTREAM_CHECK_COMMITS = "1"
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050013SRCREV = "5a491c5ad333ef34c1e7713f920f51cbb205af60"
Brad Bishop316dfdd2018-06-25 12:45:53 -040014PE = "2"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015PV = "0.0+git${SRCPV}"
16
17S = "${WORKDIR}/git"
18
William A. Kennington IIIac69b482021-06-02 12:28:27 -070019inherit cmake features_check pkgconfig
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050020
William A. Kennington IIIac69b482021-06-02 12:28:27 -070021DEPENDS += "gtk+3"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022
Patrick Williams213cb262021-08-07 19:21:33 -050023do_install:append () {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060024 # net conflicts with Samba, so rename it
25 mv ${D}${bindir}/net ${D}${bindir}/puzzles-net
Patrick Williams03907ee2022-05-01 06:28:52 -050026 rm ${D}/${datadir}/applications/net.desktop
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027
28 # Create desktop shortcuts
Patrick Williamsc0f7c042017-02-23 20:41:17 -060029 install -d ${D}/${datadir}/applications/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030 cd ${D}/${prefix}/bin
31 for prog in *; do
32 if [ -x $prog ]; then
33 # Convert prog to Title Case
Patrick Williamsc0f7c042017-02-23 20:41:17 -060034 title=$(echo $prog | sed 's/puzzles-//' | sed 's/\(^\| \)./\U&/g')
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035 echo "making ${D}/${datadir}/applications/$prog.desktop"
36 cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
37[Desktop Entry]
38Name=$title
Patrick Williamsc0f7c042017-02-23 20:41:17 -060039Exec=${bindir}/$prog
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040Icon=applications-games
41Terminal=false
42Type=Application
43Categories=Game;
44StartupNotify=true
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045STOP
46 fi
47 done
48}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080049