xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-sato/puzzles/puzzles_git.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Simon Tatham's Portable Puzzle Collection"
2*4882a593SmuzhiyunDESCRIPTION = "Collection of small computer programs which implement one-player puzzle games."
3*4882a593SmuzhiyunHOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
4*4882a593SmuzhiyunLICENSE = "MIT"
5*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENCE;md5=6e7d24cf1c949887ee9447a1e2a4a24c"
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun# gtk support includes a bunch of x11 headers
8*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "x11"
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main"
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunUPSTREAM_CHECK_COMMITS = "1"
13*4882a593SmuzhiyunSRCREV = "c43a34fbfe430d235bafc379595761880a19ed9f"
14*4882a593SmuzhiyunPE = "2"
15*4882a593SmuzhiyunPV = "0.0+git${SRCPV}"
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunS = "${WORKDIR}/git"
18*4882a593Smuzhiyun
19*4882a593Smuzhiyuninherit cmake features_check pkgconfig
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunDEPENDS += "gtk+3"
22*4882a593Smuzhiyun
23*4882a593Smuzhiyundo_install:append () {
24*4882a593Smuzhiyun    # net conflicts with Samba, so rename it
25*4882a593Smuzhiyun    mv ${D}${bindir}/net ${D}${bindir}/puzzles-net
26*4882a593Smuzhiyun    rm ${D}/${datadir}/applications/net.desktop
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun    # Create desktop shortcuts
29*4882a593Smuzhiyun    install -d ${D}/${datadir}/applications/
30*4882a593Smuzhiyun    cd ${D}/${prefix}/bin
31*4882a593Smuzhiyun    for prog in *; do
32*4882a593Smuzhiyun	if [ -x $prog ]; then
33*4882a593Smuzhiyun            # Convert prog to Title Case
34*4882a593Smuzhiyun            title=$(echo $prog | sed 's/puzzles-//' | sed 's/\(^\| \)./\U&/g')
35*4882a593Smuzhiyun	    echo "making ${D}/${datadir}/applications/$prog.desktop"
36*4882a593Smuzhiyun	    cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
37*4882a593Smuzhiyun[Desktop Entry]
38*4882a593SmuzhiyunName=$title
39*4882a593SmuzhiyunExec=${bindir}/$prog
40*4882a593SmuzhiyunIcon=applications-games
41*4882a593SmuzhiyunTerminal=false
42*4882a593SmuzhiyunType=Application
43*4882a593SmuzhiyunCategories=Game;
44*4882a593SmuzhiyunStartupNotify=true
45*4882a593SmuzhiyunSTOP
46*4882a593Smuzhiyun        fi
47*4882a593Smuzhiyun    done
48*4882a593Smuzhiyun}
49*4882a593Smuzhiyun
50