vinix-ports / make / PKGBUILD.vile
28 lines · 28 sloc · 1.31 KB · 2a7da15a8608f305793f14f1a8c0e80255676108
Raw
1defpkgbuild(make,
2 #:pkgname, "make",
3 #:pkgver, "4.4.1",
4 #:pkgrel, 1,
5 #:pkgdesc, "GNU Make for Vinix",
6 #:arch, [#:x86-64],
7 #:url, "https://www.gnu.org/software/make/",
8 #:license, "GPL-3.0-or-later",
9 #:depends, ["musl"],
10 #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/make-4.4.1.tar.gz"],
11 #:sha256sums, ["dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3"],
12 #:build, fn() {
13 root := get-environment-variable("VPAC_MAKEPKG_ROOT")
14 cc := string-append("CC=gcc --sysroot=", root, " -specs=", root, "/usr/lib/musl-gcc-sysroot.specs")
15 run("env", cc, "CFLAGS=-O2 -std=gnu17", "make-4.4.1/configure", "--prefix=/usr", "--build=x86_64-pc-linux-gnu",
16 "--host=x86_64-linux-musl", "--disable-nls", "--without-guile")
17 run("make")
18 },
19 #:check, fn() {
20 root := get-environment-variable("VPAC_MAKEPKG_ROOT")
21 run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", string-append(root, "/usr/lib"),
22 "./make", "-f", "/dev/null", "--eval=all: ; @echo Vinix make works", "all")
23 },
24 #:package, fn() {
25 run("make", string-append("DESTDIR=", pkgdir()), "install")
26 run("rm", "-f", string-append(pkgdir(), "/usr/share/info/dir"))
27 run("install", "-Dm644", "make-4.4.1/COPYING", string-append(pkgdir(), "/usr/share/licenses/make/COPYING"))
28 })
29