This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plan.sh
74 lines (68 loc) · 1.85 KB
/
plan.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
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
pkg_name=mg
pkg_origin=core
pkg_version=20180927
pkg_maintainer="The Habitat Maintainers <[email protected]>"
pkg_description="\
mg is Micro GNU/emacs, this is a portable version of the mg maintained by the \
OpenBSD team.\
"
pkg_upstream_url="https://homepage.boetes.org/software/mg/"
pkg_license=('publicdomain')
pkg_source="https://github.com/hboetes/$pkg_name/archive/$pkg_version.tar.gz"
pkg_shasum="fbb09729ea00fe42dcdbc96ac7fc1d2b89eac651dec49e4e7af52fad4f5788f6"
pkg_deps=(
core/glibc
core/ncurses
core/libbsd
)
pkg_build_deps=(
core/coreutils
core/diffutils
core/patch
core/make
core/gcc
core/sed
core/pkg-config
core/clens
)
pkg_bin_dirs=(bin)
do_prepare() {
# shellcheck disable=SC2002
cat "$PLAN_CONTEXT/cleanup.patch" \
| sed \
-e "s,@prefix@,$pkg_prefix,g" \
-e "s,@clens_prefix@,$(pkg_path_for clens),g" \
-e "s,@libbsd_prefix@,$(pkg_path_for libbsd),g" \
| patch -p1
}
do_build() {
make \
prefix="$pkg_prefix" \
PKG_CONFIG=pkg-config \
INSTALL=install \
STRIP=strip
}
do_install() {
do_default_install
# Install license file from README
install -Dm644 README "$pkg_prefix/share/licenses/README"
}
# ----------------------------------------------------------------------------
# **NOTICE:** What follows are implementation details required for building a
# first-pass, "stage1" toolchain and environment. It is only used when running
# in a "stage1" Studio and can be safely ignored by almost everyone. Having
# said that, it performs a vital bootstrapping process and cannot be removed or
# significantly altered. Thank you!
# ----------------------------------------------------------------------------
if [[ "$STUDIO_TYPE" = "stage1" ]]; then
pkg_build_deps=(
core/gcc
core/pkg-config
core/coreutils
core/sed
core/diffutils
core/make
core/patch
core/clens
)
fi