-
Notifications
You must be signed in to change notification settings - Fork 0
/
spmbuild.sh
46 lines (40 loc) · 1.38 KB
/
spmbuild.sh
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
project_dir="$(dirname "$0")"
$PKG python-gobject
$PKG gtk
$PKG gtksourceview
$PKG gtkwebkit
$PKG gstreamer
$PKG gvfs
$PKG gnunet
$PKG lsh
# hardlink the required files into $project_dir/.cache/spm/
mkdir -p "$project_dir/.cache/spm"
ln "$project_dir"/codev/* "$project_dir"/.cache/spm/
echo '#!/bin/sh
this_dir="$(dirname "$(realpath "$0")")"
export LD_LIBRARY_PATH=.
PATH="$this_dir"
exec python3 "$this_dir"
' > "$project_dir"/.cache/spm/0
chmod +x "$project_dir"/.cache/spm/0
mkdir -p "$HOME/.local/share/applications"
cat <<-__EOF__ > "$project_dir"/.cache/spm/codev.desktop
[Desktop Entry]
Type=Application
Name=Codev
Icon=codev
Exec=codev
StartupNotify=true
__EOF__
cat <<-__EOF__ > "$project_dir"/.cache/spm/icons/hicolor/scalable/apps/codev.svg
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64" height="64">
<rect style="fill:#dddddd" width="56" height="48" x="4" y="8"/>
<rect style="fill:#aaaaaa" width="16" height="48" x="4" y="8"/>
<path style="fill:none;stroke:#aaaaaa;stroke-width:2;stroke-linecap" d="M 24,16 H 56"/>
<path style="fill:none;stroke:#aaaaaa;stroke-width:2;stroke-linecap" d="M 24,24 H 56"/>
<path style="fill:none;stroke:#aaaaaa;stroke-width:2;stroke-linecap" d="M 24,32 H 56"/>
<path style="fill:none;stroke:#aaaaaa;stroke-width:2;stroke-linecap" d="M 24,40 H 56"/>
<path style="fill:none;stroke:#aaaaaa;stroke-width:2;stroke-linecap" d="M 24,48 H 56"/>
</svg>
__EOF__