summaryrefslogtreecommitdiff
path: root/lang/smalleiffel/Makefile
blob: 041bd9c35533b17484fb378c8715287eb4b699f7 (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
95
# $NetBSD: Makefile,v 1.6 2000/02/21 21:23:28 jlam Exp $
#

DISTNAME=	se
PKGNAME=	smalleiffel-0.77
WRKSRC=		${WRKDIR}/SmallEiffel
CATEGORIES=	lang
MASTER_SITES=	ftp://ftp.loria.fr/pub/loria/genielog/SmallEiffel/ \
		ftp://ftp.cs.rit.edu/pub/mirrors/SmallEiffel/ \
		ftp://ftp.progsoc.uts.edu.au/pub/Eiffel/SmallEiffel/ \
		ftp://gd.tuwien.ac.at/pub/languages/SmallEiffel/
EXTRACT_SUFX=	.tgz

MAINTAINER=	jlam@netbsd.org
HOMEPAGE=	http://smalleiffel.loria.fr/

MAKE_ENV+=	SmallEiffel=${WRKSRC}/sys/system.se
ALL_TARGET=	./bin/compile_to_c

DIST_SUBDIR=	${PKGNAME}
DOCDIR=		share/doc/smalleiffel
EGDIR=		share/examples/smalleiffel
LIBDIR=		share/smalleiffel
LIBEXECDIR=	libexec/smalleiffel

PLIST_SRC=	${WRKDIR}/.PLIST_SRC

post-extract:
	${FIND} ${WRKSRC} -type f -print0 | xargs -0 ${CHMOD} 644

post-patch:
	${CHMOD} +x ${WRKSRC}/misc/GC.SH

post-build:
	${SED}	-e "s,@@SE_LIB@@,${PREFIX}/${LIBDIR},g" \
		-e "s,@@SE_LIBEXEC@@,${PREFIX}/${LIBEXECDIR},g" \
		${FILESDIR}/smalleiffel.sh > ${WRKDIR}/smalleiffel.sh
	${SED}	-e "s,@@SE_LIB@@,${PREFIX}/${LIBDIR},g" \
		${FILESDIR}/loadpath.UNIX.in > ${WRKDIR}/loadpath.UNIX

pre-install:
	${RM} -f ${WRKSRC}/sys/loadpath.*
	${FIND} ${WRKSRC} -name ".gdb*" -print0 | xargs -0 ${RM} -f
	${FIND} ${WRKSRC} -name "*.orig" -print0 | xargs -0 ${RM} -f

do-install:
	${INSTALL_SCRIPT} ${WRKDIR}/smalleiffel.sh ${PREFIX}/bin/smalleiffel

	${INSTALL_PROGRAM_DIR} ${PREFIX}/${LIBEXECDIR}
	${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${PREFIX}/${LIBEXECDIR}

	${INSTALL_DATA_DIR} ${PREFIX}/${LIBDIR}
	cd ${WRKSRC}; for dir in \
	    lib_iterator lib_number lib_random lib_se lib_std short sys; do \
		${PAX} -rw $${dir} ${PREFIX}/${LIBDIR}; \
	done
	${INSTALL_DATA} ${WRKDIR}/loadpath.UNIX ${PREFIX}/${LIBDIR}/sys
	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/${LIBDIR}

	${INSTALL_DATA_DIR} ${PREFIX}/${DOCDIR}
	${INSTALL_DATA} \
		${WRKSRC}/COPYING \
		${WRKSRC}/misc/WeNeedFeedBack.txt \
		${PREFIX}/${DOCDIR}
	cd ${WRKSRC}/misc; \
		${INSTALL_DATA} \
			HISTORY.html NOT_YET_IMPLEMENTED.html \
			THANKS.html people.html \
			${PREFIX}/${DOCDIR}
	cd ${WRKSRC}/man; \
		${INSTALL_DATA} Eiffel.FAQ *.html *.gif ${PREFIX}/${DOCDIR}

	${INSTALL_DATA_DIR} ${PREFIX}/${EGDIR}
	cd ${WRKSRC}; for dir in contrib lib_show; do \
		${PAX} -rw $${dir} ${PREFIX}/${EGDIR}; \
	done
	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/${EGDIR}

post-install:
	${RM} -f ${PLIST_SRC}
	${CAT} ${PKGDIR}/PLIST > ${PLIST_SRC}
	( cd ${PREFIX}; \
	  ${FIND} ${LIBEXECDIR} -type f -print; \
	  ${FIND} ${LIBDIR} -type f -print; \
	  ${FIND} ${DOCDIR} -type f -print; \
	  ${FIND} ${EGDIR} -type f -print; \
	) | sort >> ${PLIST_SRC}
	( cd ${PREFIX}; \
	  ${FIND} ${LIBEXECDIR} -type d; \
	  ${FIND} ${LIBDIR} -type d; \
	  ${FIND} ${DOCDIR} -type d; \
	  ${FIND} ${EGDIR} -type d; \
	) | sort -r | ${SED} "s,^,@dirrm ," >> ${PLIST_SRC}

.include "../../mk/bsd.pkg.mk"