summaryrefslogtreecommitdiff
path: root/security/tthsum/Makefile
blob: 8f041348ff173f310d063e24995d6fdbc12b09c5 (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
# New ports collection makefile for:	tthsum
# Date created:				25 Sep 2005
# Whom:					Emanuel Haupt <ehaupt@critical.ch>
#
# $FreeBSD$
#

PORTNAME=	tthsum
PORTVERSION=	1.1.0
CATEGORIES=	security
MASTER_SITES=	http://critical.ch/distfiles/ \
		http://energy.critical.ch/distfiles/ \
		${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=	ehaupt

MAINTAINER=	ehaupt@FreeBSD.org
COMMENT=	A command-line utility for generating and checking TTH message digests

USE_GMAKE=	yes

MAKE_ENV=	CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"

PORTDOCS=	Changelog.txt
PLIST_FILES=	bin/tthsum
MAN1=		tthsum.1

post-patch:
	@${REINPLACE_CMD} -E '/^(CC|CFLAGS)/d' \
		${WRKSRC}/Makefile
	@${REINPLACE_CMD} -e 's,malloc.h,stdlib.h,g' \
		${WRKSRC}/base32.c \
		${WRKSRC}/read.c \
		${WRKSRC}/utf8.c
	@${REINPLACE_CMD} '/stdio.h/H; /stdio\.h/{ p; s/#include <stdio.h>/#define O_LARGEFILE 0/;}' \
		${WRKSRC}/read.c \
		${WRKSRC}/thex.c

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/obj-${ARCH}/${PORTNAME} ${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MANPREFIX}/man/man1

.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${DOCSDIR}
.endif

.include <bsd.port.mk>