summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 440b86f14cc852103becdc4e5be1236996155004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: taotieren <admin@taotieren.com>

pkgname=xboot-git
pkgver=v2.0.1.r1919.ge4f340b96
pkgrel=1
pkgdesc="The extensible bootloader for embedded system with application engine, write once, run everywhere. (Linux Sandbox for x86_64)"
arch=('x86_64')
url="https://github.com/xboot/xboot"
license=('MIT')
provides=(${pkgname})
conflicts=(${pkgname} ${pkgname%-git})
#replaces=(${pkgname})
depends=('sdl2')
makedepends=('git')
backup=()
options=('!strip')
#install=${pkgname}.install
source=("${pkgname%-git}::git+${url}.git")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgname%-git}"
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${srcdir}/${pkgname%-git}"
    make CROSS_COMPILE="" PLATFORM=x64-sandbox
}

package() {
    install -Dm0755 "${srcdir}/${pkgname%-git}/output/${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}"
    install -Dm0644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
    install -Dm0644 "${srcdir}/${pkgname%-git}/developments/logo/xboot-logo.svg" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.svg"
    install -Dm0644 "${srcdir}/${pkgname%-git}/developments/logo/xboot-logo.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/mimetypes/application-x-${pkgname%-git}.svg"

    install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname%-git}.desktop" << EOF
[Desktop Entry]
Name=${pkgname%-git}
Name[zh_CN]=${pkgname%-git}
Comment=The runtime environment
MimeType=application/x-${pkgname%-git};
Exec=${pkgname%-git} %f
Type=Application
Categories=Development;Game;
Terminal=false
Icon=${pkgname%-git}
Version=${pkgver}
EOF

    install -Dm0644 /dev/stdin "${pkgdir}/usr/share/mime/packages/${pkgname%-git}.xml" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
	<mime-type type="application/x-xboot">
		<comment>xboot</comment>
	<glob pattern="*.x"/>
	</mime-type>
</mime-info>
EOF
}