aboutsummaryrefslogtreecommitdiff
path: root/cad/linux-gid/Makefile
blob: 94d219d139e52b8ec040d036c7a3db1733d9f3a4 (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
65
66
67
68
69
70
71
72
73
74
75
# New ports collection makefile for:	GiD
# Date created:		19 Feb 2004
# Whom:			Pedro Giffuni
#
# $FreeBSD$
#

PORTNAME=	gid
PORTVERSION=	7.4.9b
CATEGORIES=	cad linux
MASTER_SITES=	ftp://gid.cimne.upc.es/pub/gid_adds/Linux/Old/
PKGNAMEPREFIX=	linux-
DISTNAME=	${PORTNAME}${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A graphical pre- and post-processor for numerical simulation programs

CONFLICTS=	id-utils-[0-9]* coreutils-[0-9]*
ONLY_FOR_ARCHS=	amd64 i386

USE_LINUX=	yes
USE_X_PREFIX=	yes
USE_REINPLACE=	yes
REINPLACE_ARGS=	-i ""
NO_WRKSUBDIR=	yes
NO_BUILD=	yes

INFO=		gid gid-faq gid-ptype
GID_BINS=	gen2dNNN gid.exe mesh3d99
GID_DATA=	GidPassword.txt License.htm License.txt README.txt
GID_DIRS=	bitmaps problemtypes scripts symbols templates info

post-extract:
	@${REINPLACE_CMD} -e 's+/usr/bin/X11+${X11BASE}/bin+g;'	\
		${WRKDIR}/install
	${RM} ${WRKDIR}/info/gid.info.cvs

do-install:
	@${MKDIR} ${DATADIR}
.for d in ${GID_DATA}
	${INSTALL_DATA} ${WRKDIR}/${d} ${DATADIR}
.endfor
.for d in ${GID_DIRS}
	@${MKDIR} ${DATADIR}/${d}
	@${TAR} -C ${WRKDIR}/${d} -cf - . |	\
	  ${TAR} -C ${DATADIR}/${d} -xf -
	@${CHOWN} -R root:wheel ${DATADIR}/${d}
	@${FIND} ${DATADIR}/${d} -type d -exec ${CHMOD} 0555 {} \;
	@${FIND} ${DATADIR}/${d} -type f -exec ${CHMOD} 0444 {} \;
.endfor
	${RM} ${DATADIR}/info/*.info*
.for b in ${GID_BINS}
	${INSTALL_PROGRAM} ${WRKDIR}/${b} ${DATADIR}
	@${BRANDELF} -t Linux ${DATADIR}/${b}
.endfor
	${INSTALL_SCRIPT} ${WRKDIR}/install ${DATADIR}
	@(cd ${WRKDIR}; ./install ${DATADIR})
	@${LN} -sf ${DATADIR}/gid ${PREFIX}/bin/gid

.if !defined(NOPORTDOCS)
	for f in ${WRKDIR}/info/gid*.info*; do \
	  ${INSTALL_DATA} $$f ${PREFIX}/info; \
	done
	for f in faq.info ptype.info; do \
	  ${INSTALL_DATA} ${WRKDIR}/info/$$f ${PREFIX}/info/gid-$$f; \
	done
.endif
	@${MKDIR} ${EXAMPLESDIR}
	@${TAR} -C ${WRKDIR}/Examples -cf - . |	\
	  ${TAR} -C ${EXAMPLESDIR} -xf -
	@${CHOWN} -R root:wheel ${EXAMPLESDIR}
	@${FIND} ${EXAMPLESDIR} -type d -exec ${CHMOD} 0555 {} \;
	@${FIND} ${EXAMPLESDIR} -type f -exec ${CHMOD} 0444 {} \;

.include <bsd.port.mk>