new package: samurai

This commit is contained in:
Pooya Moradi 2022-09-08 13:30:57 +04:30 committed by Henrik Grimler
parent 257a1c2ab0
commit 886942c556
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,16 @@
diff --git a/Makefile b/Makefile
index 82bd263..919fd1a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
.POSIX:
-PREFIX=/usr/local
+PREFIX=@TERMUX_PREFIX@
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
-ALL_CFLAGS=$(CFLAGS) -std=c99 -Wall -Wextra -Wpedantic -Wno-unused-parameter
+ALL_CFLAGS=$(CFLAGS) -std=c99 -Wall -Wextra -Wpedantic -Wno-unused-parameter -I@TERMUX_PREFIX@/include
OBJ=\
build.o\
deps.o\

14
packages/samurai/build.sh Normal file
View File

@ -0,0 +1,14 @@
TERMUX_PKG_HOMEPAGE="https://github.com/michaelforney/samurai"
TERMUX_PKG_DESCRIPTION="ninja-compatible build tool written in C"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.2"
TERMUX_PKG_SRCURL="https://github.com/michaelforney/samurai/archive/refs/tags/$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=37a2d9f35f338c53387eba210bab7e5d8abe033492664984704ad84f91b71bac
TERMUX_PKG_DEPENDS="libandroid-spawn"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
rm -f "build.ninja"
export LDFLAGS+=" -landroid-spawn"
}