summaryrefslogtreecommitdiff
path: root/sysutils/fdgw/Makefile
blob: 8bac4536a9fe650b34449075f1fd419771df0582 (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
# $NetBSD: Makefile,v 1.2 2002/01/07 17:26:08 wennmach Exp $
#

DISTNAME=	fdgw-20011216
PKGREVISION=	1
CATEGORIES=	sysutils net
MASTER_SITES=	ftp://ftp.fml.org/pub/fdgw/source/

MAINTAINER= 	fukachan@fml.org
HOMEPAGE=	http://www.fml.org/software/fdgw/
COMMENT= 	toolkit to build a one-floppy NetBSD system

BSDSRCDIR?=	/usr/src
_IMG_SRC_DIR =	${WRKSRC}/image.${MACHINE_ARCH}
_IMG_DST_DIR =	${PREFIX}/fdgw/${MACHINE_ARCH}

.include "../../mk/bsd.prefs.mk"

.if !exists(${X11BASE}/bin/lndir)
IGNORE=                 "${PKGNAME} requires the 'lndir' command, and hence X11"
.endif

.if (${MACHINE_ARCH} != "i386")
IGNORE=  "Sorry, fdgw is currently only available for i386 machines."
IGNORE+= "Please report to ${MAINTAINER} if you succeed to port fdgw to other architectures"
.endif

# we need NetBSD source tree.
.if !exists(${BSDSRCDIR})
IGNORE= "${PKGNAME} requires the NetBSD source tree in BSDSRCDIR (${BSDSRCDIR})"
.endif

ALL_TARGET=	dist-build

pre-fetch:
	@ ${ECHO} "";
	@ ${ECHO} "************************************";
	@ ${ECHO} "Please note: The install stage of fdgw requires a kernel"
	@ ${ECHO} "             with 'pseudo-device vnd 4' enabled.";
	@ ${ECHO} "************************************";
	@ ${ECHO} "";

pre-install:
	(cd ${WRKSRC} && ${MAKE} dist-image)

do-install:
	${TEST} -d ${_IMG_DST_DIR} || ${MKDIR} ${_IMG_DST_DIR}
	${INSTALL_DATA} ${_IMG_SRC_DIR}/natbox.img ${_IMG_DST_DIR}/natbox.img
	${INSTALL_DATA} ${_IMG_SRC_DIR}/adslrouter.img ${_IMG_DST_DIR}/adslrouter.img

post-install:
	@ ${ECHO} "";
	@ ${ECHO} "************************************";
	@ ${ECHO} "";
	@ ${ECHO} "The floppy images are installed into ${_IMG_DST_DIR}."
	@ ${ECHO} ""
	@ ${ECHO} "To write adslrouter.img onto a floppy:"
	@ ${ECHO} "     # dd if=adslrouter.img of=/dev/rfd0a bs=18k"
	@ ${ECHO} "";
	@ ${ECHO} "See ${HOMEPAGE} for more details, e.g. customization";
	@ ${ECHO} "";
	@ ${ECHO} "************************************";
	@ ${ECHO} "";

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