aboutsummaryrefslogtreecommitdiffstats
path: root/games/asteroids3d/Makefile
blob: 85df5b5d2cd5989cea3250ded2d00799bf7cd8b1 (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
# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
# $FreeBSD$

PORTNAME=   asteroids3d
PORTVERSION=    0.5.1
PORTREVISION=   6
CATEGORIES= games
MASTER_SITES=   SF/a3d/${PORTVERSION}/ \
        SF/nemysisfreebsdp/${CATEGORIES}/:icons
DISTNAME=   ${PORTNAME:S/3d/3D/}-${DISTVERSION}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} \
        ${PORTNAME}_icons${EXTRACT_SUFX}:icons

MAINTAINER= ports@FreeBSD.org
COMMENT=    First-person shooter blowing up asteroids in 3D space

LICENSE=    GPLv2 # or later
LICENSE_FILE=   ${WRKSRC}/COPYRIGHT

USES=       tar:bzip2
USE_AUTOTOOLS=  aclocal autoheader
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  with_gamesdir="${PREFIX}/bin" with_gamedatadir="${DATADIR}"
USE_GL=     glut

CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

PORTDOCS=   README.html
OPTIONS_DEFINE= DOCS

INSTALLS_ICONS= yes
ICON_SIZES= 32x32 48x48 64x64 72x72 96x96 128x128

DESKTOP_ENTRIES="Asteroids3D" "" "${PORTNAME}" \
        "${PORTNAME}" "Game;ArcadeGame;" ""

pre-configure:
    @(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./autogen.sh)

post-patch:
    @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|g' ${WRKSRC}/autogen.sh

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME:S/3d/3D/} \
        ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
    @(cd ${WRKSRC}/src && ${COPYTREE_SHARE}  "*.ub *.ppm" \
         ${STAGEDIR}${DATADIR})

.for s in ${ICON_SIZES}
    @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps
    ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}_${s}.png \
        ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png
.endfor
    ${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
        ${STAGEDIR}${PREFIX}/share/pixmaps/

    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>