-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathPKGBUILD
More file actions
49 lines (41 loc) · 2.21 KB
/
Copy pathPKGBUILD
File metadata and controls
49 lines (41 loc) · 2.21 KB
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
# Maintainer: mcpp-community <x.d2learn.org@gmail.com>
#
# mcpp-bin — prebuilt release binaries from GitHub, the same artifacts the
# upstream `install.sh` one-liner downloads. See scripts/aur/README.md for
# how this is published to the AUR and how to bump it (scripts/aur/update.sh).
pkgname=mcpp-bin
pkgver=0.0.65
pkgrel=1
pkgdesc="Modern C++ build & package management tool (prebuilt binary)"
arch=('x86_64' 'aarch64')
url="https://github.com/mcpp-community/mcpp"
license=('Apache-2.0')
# mcpp/xlings are statically linked; git is used for package-index sync.
depends=('git')
# mcpp-m = same tool (mutually exclusive); mcpp = Matsui's C preprocessor
# (extra/mcpp), which also owns /usr/bin/mcpp. No `provides=mcpp` — that name
# is the preprocessor, not us.
conflicts=('mcpp-m' 'mcpp')
# Prebuilt upstream binaries — do not strip/repackage them.
options=('!strip')
_relbase="https://github.com/mcpp-community/mcpp/releases/download/v${pkgver}"
source_x86_64=("mcpp-${pkgver}-linux-x86_64.tar.gz::${_relbase}/mcpp-${pkgver}-linux-x86_64.tar.gz")
source_aarch64=("mcpp-${pkgver}-linux-aarch64.tar.gz::${_relbase}/mcpp-${pkgver}-linux-aarch64.tar.gz")
# Shared, arch-independent local file (the per-user launcher).
source=("mcpp.sh")
sha256sums=('SKIP')
sha256sums_x86_64=('0d1d16aae05e4d7c59a00a2621abc4b99421b9821d2145c139fabf95fcf93409')
sha256sums_aarch64=('20dd7a8be657bf2e32dcffcf10b758e34fe740fcdb1ceb374822d5ee25cb4a52')
package() {
local _src="${srcdir}/mcpp-${pkgver}-linux-${CARCH}"
# Self-contained tree, read-only and shared by all users, under /opt.
# Ship only the two binaries the runtime needs:
# bin/mcpp — the static mcpp executable
# registry/bin/xlings — bundled xlings, seeded per-user via the wrapper
install -Dm755 "${_src}/bin/mcpp" "${pkgdir}/opt/mcpp/bin/mcpp"
install -Dm755 "${_src}/registry/bin/xlings" "${pkgdir}/opt/mcpp/registry/bin/xlings"
# Per-user launcher on PATH (sets MCPP_HOME / MCPP_VENDORED_XLINGS).
install -Dm755 "${srcdir}/mcpp.sh" "${pkgdir}/usr/bin/mcpp"
install -Dm644 "${_src}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 "${_src}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}