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

PORTNAME=   pyspacewar
PORTVERSION=    0.9.7
PORTREVISION=   3
CATEGORIES= games python
MASTER_SITES=   http://mg.pov.lt/${PORTNAME}/\
        LOCAL/beech
DIST_SUBDIR=    python

MAINTAINER= games@FreeBSD.org
COMMENT=    Two ships duel in a gravity field

LICENSE=    GPLv2

RUN_DEPENDS=    ${PYGAME}

USE_PYTHON= yes
USE_PYDISTUTILS=yes
PYDISTUTILS_AUTOPLIST=  yes

PLIST_FILES=    share/icons/hicolor/16x16/apps/pyspacewar.png \
        share/icons/hicolor/22x22/apps/pyspacewar.png \
        share/icons/hicolor/32x32/apps/pyspacewar.png \
        share/icons/hicolor/48x48/apps/pyspacewar.png \
        share/pixmaps/${PORTNAME}.png

PORTDOCS=   NEWS.txt README.txt performance-notes.txt
OPTIONS_DEFINE= DOCS

INSTALLS_ICONS= yes
ICON_SIZES= 16x16 22x22 32x32 48x48

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

post-patch:
.for s in 16 22 32 48
    @cd ${WRKSRC}/src/pyspacewar/icons && \
        ${MV} ${PORTNAME}${s}.png ${PORTNAME}_${s}x${s}.png
.endfor

post-install:
.for s in ${ICON_SIZES}
    @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps
    ${INSTALL_DATA} ${WRKSRC}/src/pyspacewar/icons/${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>