summaryrefslogtreecommitdiff
path: root/devel/asmutils/Makefile
blob: 6a1579fc92d51413b8f90eb17199e19e8c662687 (plain)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# New ports collection makefile for:	asmutils
# Date created:				22 January 2001
# Whom:					George Reid <greid@ukug.uk.freebsd.org>
#
# $FreeBSD$
#

PORTNAME=	asmutils
PORTVERSION=	0.18
CATEGORIES=	devel
MASTER_SITES=	http://asm.sourceforge.net/asmutils/

MAINTAINER=	danfe@FreeBSD.org
COMMENT=	A set of UNIX utilities written in assembly language

BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm

ONLY_FOR_ARCHS=	i386

USE_GMAKE=	yes

INSTALLS_SHLIB=	yes
LDCONFIG_DIRS=	${PREFIX}/lib/asmutils

# This will play merry hell with portlint
BINS=		bonus/asmutils basename cal cat chmod chown chroot cmp cp \
		cpuinfo cut date dc dd deflate dirname du echo env bonus/execve \
		extname factor fromdos ftpd getty grep head hexdump host hostname \
		httpd id idea init kill kldload less ln ls lzss m_inetd md5 \
		md5sum  mkdir mknod mount mv nc netstat nice nm nohup od \
		paste ping pop3d proxy pwd rc6crypt readelf readkey readlink \
		reboot renice bonus/report rm rmdsum rot13 scan scons sh sha1sum \
		sleep strings sync tail tar tee telnet telnetd test touch tr \
		true uname uuencode watch wc wget which whoami write yes

LINKS=		arch cpuspeed domainname false halt inflate kldstat kldunload \
		mkfifo more poweroff regs rmdir size sln todos umount usleep

LIBS=		libc.so.0 libcrypto.so.0 libm.so.0

DOCS=		Asmutils-HOWTO.html acknowledgements.html endorsements.html \
		history.html s-contrib.html s-debug.html s-include.html \
		s-layout.html s-optimize.html sha1sum.html sha1sum_toc.html

PLIST_FILES=	${BINS:S/^/bin\/asmutils\//:S/bonus\///} \
		${LINKS:S/^/bin\/asmutils\//} ${LIBS:S/^/lib\/asmutils\//}
PLIST_DIRS=	bin/asmutils lib/asmutils
PORTDOCS=	*

post-patch:
	@${REINPLACE_CMD} -e 's,%%KERNEL%%,${OSREL:S/.//g},g' ${WRKSRC}/MCONFIG
	@${REINPLACE_CMD} -e 's,^static ,,' ${WRKSRC}/lib/libm.c

# Stripping binaries will break install
STRIP=	#

do-install:
	@${MKDIR} ${PREFIX}/bin/asmutils
	@${MKDIR} ${PREFIX}/lib/asmutils
.for B in ${BINS}
	${INSTALL_PROGRAM} ${WRKSRC}/src/${B} ${PREFIX}/bin/asmutils
.endfor
.for L in ${LIBS}
	${INSTALL_PROGRAM} ${WRKSRC}/lib/${L} ${PREFIX}/lib/asmutils
.endfor
	(cd ${PREFIX}/bin/asmutils && \
		${LN} -sf uname arch && \
		${LN} -sf cpuinfo cpuspeed && \
		${LN} -sf hostname domainname && \
		${LN} -sf true false && \
		${LN} -sf reboot halt && \
		${LN} -sf deflate inflate && \
		${LN} -sf kldload kldstat && \
		${LN} -sf kldload kldunload && \
		${LN} -sf mknod mkfifo && \
		${LN} -sf less more && \
		${LN} -sf reboot poweroff && \
		${LN} -sf execve regs && \
		${LN} -sf mkdir rmdir && \
		${LN} -sf nm size && \
		${LN} -sf ln sln && \
		${LN} -sf fromdos todos && \
		${LN} -sf mount umount && \
		${LN} -sf sleep usleep)

.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for D in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/doc/${D} ${DOCSDIR}
.endfor
	cd ${DOCSDIR} && ${LN} -sf Asmutils-HOWTO.html index.html
.endif

.include <bsd.port.mk>