This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathkh
executable file
·89 lines (70 loc) · 2.02 KB
/
kh
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/sh
case $TYPE in
pre-build)
IFS=. read -r _start _ < /proc/uptime
case $PKG in
llvm|clang|rust)
export MAKEFLAGS=-j2
;;
mesa)
_flags=-Dgallium-drivers=radeonsi
_flags=$_flags\ -Dvulkan-drivers=amd
_flags=$_flags\ -Dgallium-va=true
sed -i "s/\. output/$_flags \0/" .build
;;
tmux)
cat <<EOF > .build
#!/bin/sh -e
export CFLAGS="$CFLAGS -static"
./configure \
ac_cv_search_forkpty=-lncursesw \
--prefix=/usr \
--enable-static
make
make DESTDIR="$1" install
EOF
chmod +x .build
;;
esac
;;
pre-extract)
case $PKG in
firefox|firefox-esr|rust|llvm|clang|gcc)
mak_dir=$KISS_TMPDIR/build-$pid
pkg_dir=$KISS_TMPDIR/pkg-$pid
;;
*)
log "$PKG" "Activating tmpfs"
mak_dir=/tmp/build-$pid
pkg_dir=/tmp/pkg-$pid
;;
esac
mkdir -p "$mak_dir" "$pkg_dir/$PKG/var/db/kiss/installed"
;;
post-build)
IFS=. read -r _end _ < /proc/uptime
(
_s=$((_end - _start))
_h=$((_s / 60 / 60 % 24))
_m=$((_s / 60 % 60))
[ "$_h" = 0 ] || _u="${_u}${_h}h "
[ "$_m" = 0 ] || _u="${_u}${_m}m "
log "$PKG" "Build finished in ${_u:-${_s}s}"
)
: "${DEST:?DEST is unset}"
case $PKG in
kiss) rm -rf "$DEST/usr/bin" ;;
*)
rm -rf "$DEST/usr/share/doc"
rm -rf "$DEST/usr/share/gettext"
rm -rf "$DEST/usr/share/man"
rm -rf "$DEST/usr/share/locale"
rm -rf "$DEST/usr/share/polkit-1"
rm -rf "$DEST/usr/share/info"
rm -rf "$DEST/usr/share/gtk-doc"
rm -rf "$DEST/usr/share/zsh"
rm -f "$DEST/usr/lib/charset.alias"
;;
esac
;;
esac