summaryrefslogtreecommitdiff
path: root/sysutils/sformat/Makefile
blob: 8298ea582c95ed6b1fb01fd86adcb907109fa3a8 (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
# Created by: marius@alchemy.franken.de
# $FreeBSD$

PORTNAME=	sformat
PORTVERSION=	3.5
PORTREVISION=	5
CATEGORIES=	sysutils
MASTER_SITES=	ftp://ftp.berlios.de/pub/sformat/:sformat \
		${MASTER_SITE_LOCAL:S/$/:libschily,sformat/}
MASTER_SITE_SUBDIR=	marius/:libschily,sformat
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:sformat \
		${LIBSCHILY}:libschily
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

MAINTAINER=	marius@FreeBSD.org
COMMENT=	Allows formatting/partitioning/analysis/repairing of SCSI disks

LIBSCHILY=	libschily-2.01.01a07.tar.gz
USE_GMAKE=	yes
MAN1=		sformat.1

NO_STAGE=	yes
.include <bsd.port.pre.mk>

CCOM!=		${BASENAME} ${CC}
MAKE_ENV=	CCOM=${CCOM} LANG=C
SFMTTARGET=	${ARCH:S/powerpc64/powerpc/}-freebsd-${CCOM}

post-extract:
	@cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
		${DISTDIR}/${DIST_SUBDIR}/${LIBSCHILY} ${EXTRACT_AFTER_ARGS}
.for i in config.guess config.sub
	@${CP} ${PORTSDIR}/Templates/${i} ${WRKSRC}/conf
.endfor
.if ${SFMTTARGET} != "i386-freebsd-cc"
	@${LN} -sf ${WRKSRC}/RULES/i386-freebsd-cc.rul \
		${WRKSRC}/RULES/${SFMTTARGET}.rul
.endif

post-patch:
.for i in datio.c sformat.1
	@${REINPLACE_CMD} -i "" -e 's:%%DATADIR%%:${DATADIR}:g;' \
		${WRKSRC}/sformat/${i}
.endfor
.for i in include/schily.h libschily/fexec.c libschily/libschily-mapvers
	@${REINPLACE_CMD} -e 's|fexecve|js_fexecve|g' ${WRKSRC}/${i}
.endfor

do-install:
	@${INSTALL_PROGRAM} ${WRKSRC}/sformat/OBJ/${SFMTTARGET}/sformat \
		${PREFIX}/bin
	@${MKDIR} ${DATADIR}
	@${INSTALL_DATA} ${WRKSRC}/sformat/sformat.dat ${DATADIR}
	@${INSTALL_MAN} ${WRKSRC}/sformat/sformat.1 ${PREFIX}/man/man1

.include <bsd.port.post.mk>