summaryrefslogtreecommitdiff
path: root/games/crossfire-server/Makefile
blob: fe671359abd8cc9ce48ccee70913a77a94dd5d6e (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
96
97
98
99
100
101
102
103
104
# $NetBSD: Makefile,v 1.58 2020/08/31 18:09:33 wiz Exp $

DISTNAME=	crossfire-1.71.0
PKGNAME=	${DISTNAME:S/crossfire-/crossfire-server-/1}
PKGREVISION=	8
CATEGORIES=	games
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=crossfire/}
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
DISTFILES+=	${DISTNAME}.arch${EXTRACT_SUFX}
DISTFILES+=	${DISTNAME}.maps${EXTRACT_SUFX}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	adam@NetBSD.org
HOMEPAGE=	http://crossfire.real-time.com/
COMMENT=	Multi-player graphical arcade and adventure game (server)
LICENSE=	gnu-gpl-v2

WRKSRC=		${WRKDIR}/crossfire-server-${PKGVERSION_NOREV}
USE_LIBTOOL=	yes
USE_TOOLS+=	gmake perl:run bash:run csh:run ksh
CONFIG_SHELL=	ksh
GNU_CONFIGURE=	yes
PLIST_SRC=	${WRKDIR}/PLIST PLIST

BUILD_DEFS+=	VARBASE

CHECK_PORTABILITY_SKIP+=	utils/get_release.in

# "Collect is already running.
# If you think this is an error, rmdir collect.lock"
MAKE_JOBS_SAFE=	no

PKG_SYSCONFSUBDIR=	crossfire
CONFIGURE_ARGS+=	--disable-check
CONFIGURE_ARGS+=	--localstatedir=${VARBASE}/games
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ENV+=		ac_cv_path_GZIP=${GZIP_CMD:Q}

INSTALLATION_DIRS=	share/crossfire/arch
INSTALLATION_DIRS+=	share/crossfire/maps

# crossfire
REPLACE_BASH+=	utils/crossloop.web.in
REPLACE_PERL+=	doc/include_html.pl
REPLACE_PERL+=	doc/playbook/make_index.pl
REPLACE_PERL+=	doc/scripts/items-extract.pl
REPLACE_PERL+=	doc/scripts/makeps.pl
REPLACE_PERL+=	doc/scripts/monster-extract.pl
REPLACE_PERL+=	lib/adm/archsearch.pl
REPLACE_PERL+=	lib/adm/collect_images.pl
REPLACE_PERL+=	lib/adm/map_expand.pl
REPLACE_PERL+=	lib/adm/mapslitter.pl
REPLACE_PERL+=	utils/player_dl.pl.in
REPLACE_PERL+=	utils/metaserver.pl.in
REPLACE_PERL+=	utils/mktable.script
REPLACE_PERL+=	lib/adm/map_info
# arch
REPLACE_BASH+=	../arch/dev/png_recompress.sh
REPLACE_CSH+=	../arch/dev/xpmtopng
REPLACE_CSH+=	../arch/dev/merge.csh
REPLACE_CSH+=	../arch/dev/scripts/updatearch
REPLACE_PERL+=	../arch/dev/scripts/update_armor.pl
REPLACE_PERL+=	../arch/dev/scripts/update_body.pl
REPLACE_PERL+=	../arch/dev/scripts/update_monster.pl
REPLACE_PERL+=	../arch/dev/scripts/update_object.pl
REPLACE_PERL+=	../arch/dev/scripts/update_shield.pl
REPLACE_PERL+=	../arch/dev/split-png-linux.pl
REPLACE_PERL+=	../arch/dev/splitter-png.pl
REPLACE_PERL+=	../arch/dev/splitter.pl
# maps
REPLACE_BASH+=	../maps/brest/pshops/pshop_copier
REPLACE_PERL+=	../maps/Info/combine.pl
REPLACE_PERL+=	../maps/Info/map_sed.pl
REPLACE_PERL+=	../maps/Info/rewrite_exits.pl
REPLACE_PERL+=	../maps/Info/rewrite_styles.pl
REPLACE_PERL+=	../maps/Info/update_apart.pl
REPLACE_PERL+=	../maps/Info/update_exits.pl

EGDIR=		${PREFIX}/share/examples/crossfire
CONF_FILES+=	${EGDIR}/ban_file ${PKG_SYSCONFDIR}/ban_file
CONF_FILES+=	${EGDIR}/dm_file ${PKG_SYSCONFDIR}/dm_file
CONF_FILES+=	${EGDIR}/exp_table ${PKG_SYSCONFDIR}/exp_table
CONF_FILES+=	${EGDIR}/forbid ${PKG_SYSCONFDIR}/forbid
CONF_FILES+=	${EGDIR}/metaserver2 ${PKG_SYSCONFDIR}/metaserver2
CONF_FILES+=	${EGDIR}/motd ${PKG_SYSCONFDIR}/motd
CONF_FILES+=	${EGDIR}/news ${PKG_SYSCONFDIR}/news
CONF_FILES+=	${EGDIR}/rules ${PKG_SYSCONFDIR}/rules
CONF_FILES+=	${EGDIR}/settings ${PKG_SYSCONFDIR}/settings

pre-build:
	${LN} -sf ${WRKDIR}/arch ${WRKSRC}/lib

post-install:
	cd ${WRKDIR} && cp -R arch maps ${DESTDIR}${PREFIX}/share/crossfire
	cd ${DESTDIR}${PREFIX} && \
		${FIND} share/crossfire/arch -type f -print >> ${WRKDIR}/PLIST
	cd ${DESTDIR}${PREFIX} && \
		${FIND} share/crossfire/maps -type f -print >> ${WRKDIR}/PLIST

.include "../../graphics/gd/buildlink3.mk"
.include "../../textproc/libxslt/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"