-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
44 lines (40 loc) · 1.43 KB
/
template
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
# Template file for 'scratch'
pkgname=scratch
version=1.4.0.7
revision=2
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="squeak pango-devel shared-mime-info desktop-file-utils gtk-update-icon-cache"
depends="${makedepends/pango-devel/}"
short_desc="Create and share your own interactive stories, games, music and art"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only, MIT"
homepage="http://scratch.mit.edu"
distfiles="http://download.scratch.mit.edu/${pkgname}-${version}.src.tar.gz"
checksum=b94d89278ecef2ba2d1147eec23936dd99697293ffa2c216c0a375ba98226a3e
post_patch() {
sed -n -e '/Author:/,/IN THE SOFTWARE/p' \
src/plugins/wedo/WeDoLinux.c >LICENSE.MIT
find . -name Makefile -exec \
sed -i -e '
/gcc.*CFLAGS/s/gcc/$(CC) $(CPPFLAGS)/
/gcc -shared/s/gcc/$(CC) $(LDFLAGS)/
' {} +
}
do_install() {
vbin src/scratch
vinstall Scratch.image 644 usr/lib/scratch
vinstall Scratch.ini 644 usr/lib/scratch
vinstall src/scratch.desktop 644 usr/share/applications
vman src/man/scratch.1.gz
vinstall src/scratch.xml 644 usr/share/mime/packages
install -dm755 ${DESTDIR}/usr/share/{scratch,icons/hicolor}
cp -rp Help locale Media Projects README ${DESTDIR}/usr/share/scratch
cp -rp Plugins ${DESTDIR}/usr/lib/scratch
for res in 32 48 128; do
install -D -m644 src/icons/${res}x${res}/scratch.png \
${DESTDIR}/usr/share/icons/hicolor/${res}x${res}/apps/scratch.png
done
vlicense NOTICE
vlicense LICENSE.MIT
}