aboutsummaryrefslogtreecommitdiffstats
path: root/astro/gdesklets-weather/Makefile
blob: 9d9d873af78dca30db86992b9a1934bdbb34c584 (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:    gdesklets-weather
# Date created:             17 November 2003
# Whom:                 Mezz <mezz7@cox.net>
#
# $FreeBSD$
#

PORTNAME=   weather
PORTVERSION=    0.25
CATEGORIES= astro gnome
MASTER_SITES=   http://gdesklets.gnomedesktop.org/files/
PKGNAMEPREFIX=  gdesklets-
DISTNAME=   weather-desklet-${PORTVERSION}

MAINTAINER= pav@FreeBSD.org
COMMENT=    A weather monitoring Sensor and Display for gdesklets

RUN_DEPENDS=    ${X11BASE}/libdata/pkgconfig/gdesklets-core.pc:${PORTSDIR}/deskutils/gdesklets

USE_PYTHON= yes
USE_X_PREFIX=   yes
USE_REINPLACE=  yes

NAME=       Weather
DATADIR=    ${PREFIX}/share/gnome
PKGMESSAGE= ${WRKDIR}/pkg-message

do-build:
    @${WRKSRC}/Install_${NAME}_Sensor.bin --nomsg ${WRKSRC}

do-install:
    @${MKDIR} ${DATADIR}/gdesklets/Displays/${NAME}/gfx
    @${MKDIR} ${DATADIR}/gdesklets/Sensors/${NAME}/icons
    @${INSTALL_DATA} ${WRKSRC}/${NAME}/*.py ${DATADIR}/gdesklets/Sensors/${NAME}/
    @${INSTALL_DATA} ${WRKSRC}/${NAME}/icons/*.png ${DATADIR}/gdesklets/Sensors/${NAME}/icons/
    @${INSTALL_DATA} ${WRKSRC}/*.display ${DATADIR}/gdesklets/Displays/${NAME}/
    @${INSTALL_DATA} ${WRKSRC}/gfx/*.png ${DATADIR}/gdesklets/Displays/${NAME}/gfx/
    @${INSTALL_DATA} ${WRKSRC}/README ${DATADIR}/gdesklets/Displays/${NAME}/
    @${LN} -s ${DATADIR}/gdesklets/Displays/${NAME}/README \
        ${DATADIR}/gdesklets/Sensors/${NAME}/README

post-install:
    @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${DATADIR}/gdesklets/Sensors/${NAME}
    @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${DATADIR}/gdesklets/Sensors/${NAME}
    @${SED} -e 's|%%PREFIX%%|${PREFIX}|g ; s|%%NAME%%|${NAME}|g' \
        ${FILESDIR}/pkg-message.in > ${PKGMESSAGE}
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>