aboutsummaryrefslogtreecommitdiffstats
path: root/games/gtklife/Makefile
blob: 9bcc4c4c7fc6848676077b9acb88b907d1cc68f4 (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
# New ports collection makefile for:    gtklife
# Date created:         07 Aug 2004
# Whom:             Jean-Yves Lefort <jylefort@brutele.be>
#
# $FreeBSD$
#

PORTNAME=   gtklife
PORTVERSION=    4.2
PORTREVISION=   1
CATEGORIES= games
MASTER_SITES=   http://ironphoenix.org/tril/gtklife/

MAINTAINER= jylefort@FreeBSD.org
COMMENT=    A GTK+ implementation of Conway's Game of Life

USE_X_PREFIX=   yes
USE_GNOME=  gtk12
USE_GMAKE=  yes
MAKE_ARGS=  CC="${CC}" CFLAGS="${CFLAGS}" PREFIX="${PREFIX}" DOCDIR="${DOCSDIR}"

PLIST=      ${WRKDIR}/pkg-plist
PLIST_FILES=    bin/gtklife
PLIST_DIRS= %%DATADIR%%
PORTDOCS=   *

DATA_SUBDIRS=   graphics patterns

post-patch:
    @${REINPLACE_CMD} -e 's|gtk-config|${GTK_CONFIG}|' ${WRKSRC}/Makefile

pre-install:
    @cd ${WRKSRC} && >${PLIST} && \
    ${FIND} ${DATA_SUBDIRS} ! -type d | ${SORT} \
        | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} && \
    ${FIND} ${DATA_SUBDIRS} -type d ! -empty | ${SORT} -r \
        | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST}

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/gtklife ${PREFIX}/bin
    cd ${WRKSRC} && \
    ${FIND} ${DATA_SUBDIRS} -type d ! -empty -exec ${MKDIR} "${DATADIR}/{}" \; && \
    ${FIND} ${DATA_SUBDIRS} ! -type d -exec ${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
.endif

.include <bsd.port.mk>