aboutsummaryrefslogtreecommitdiff
path: root/sysutils/toybox/Makefile
blob: fcc1c03f4c6ae828f8629f8bf9184bc86fa6376b (plain) (blame)
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
PORTNAME=	toybox
PORTVERSION=	0.8.10
CATEGORIES=	sysutils
MASTER_SITES=	http://landley.net/toybox/downloads/

MAINTAINER=	vidar@karlsen.tech
COMMENT=	All-in-one command line
WWW=		https://landley.net/toybox/

LICENSE=	0BSD
LICENSE_NAME=	BSD Zero Clause License
LICENSE_FILE=	${WRKSRC}/LICENSE
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

BUILD_DEPENDS=	bash:shells/bash gsed:textproc/gsed

USES=		gmake shebangfix

SHEBANG_FILES=	mkroot/record-commands scripts/bloatcheck \
		scripts/mcm-buildall.sh scripts/change.sh \
		scripts/findglobals.sh 	scripts/genconfig.sh \
		scripts/install.sh scripts/make.sh scripts/mkroot.sh \
		scripts/portability.sh 	scripts/runtest.sh \
		scripts/single.sh scripts/test.sh configure \
		tests/*

BIN_LINKS=	[ cat chgrp chmod chown cksum cpio crc32 date dos2unix echo \
		egrep false fgrep fsync grep help hostname kill ln ls mkdir \
		mknod mktemp mountpoint nice pidof printenv pwd rm rmdir sed \
		sleep sync touch true uname unix2dos usleep vmstat
SBIN_LINKS=	killall5 lsmod mkswap modinfo sysctl
USRBIN_LINKS=	acpi ascii base64 basename bunzip2 bzcat cal chrt chvt \
		clear cmp comm count cut dirname du expand factor fallocate \
		file find flock fmt groups head hexedit iconv id killall link \
		logger logname lspci lsusb makedevs mkfifo mkpasswd nl nohup \
		od paste patch pmap printf pwdx readlink realpath renice \
		reset rev seq setsid shred shuf sort split strings tac tee \
		test time timeout truncate tty uniq unlink uudecode uuencode \
		uuidgen w watch wc which who whoami xargs xxd yes
USRSBIN_LINKS=	chroot

do-configure:
	cd ${WRKSRC} && HOSTCC=${CC} ${GMAKE} bsd_defconfig

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/toybox ${STAGEDIR}${PREFIX}/bin
	${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin
	${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/sbin
	${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/usr/bin
	${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/usr/sbin
.for f in ${BIN_LINKS}
	${LN} -s ../../bin/toybox ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/${f}
.endfor
.for f in ${SBIN_LINKS}
	${LN} -s ../../bin/toybox ${STAGEDIR}${PREFIX}/${PORTNAME}/sbin/${f}
.endfor
.for f in ${USRBIN_LINKS}
	${LN} -s ../../../bin/toybox ${STAGEDIR}${PREFIX}/${PORTNAME}/usr/bin/${f}
.endfor
.for f in ${USRSBIN_LINKS}
	${LN} -s ../../../bin/toybox ${STAGEDIR}${PREFIX}/${PORTNAME}/usr/sbin/${f}
.endfor

.include <bsd.port.mk>