aboutsummaryrefslogtreecommitdiffstats
path: root/misc/xdg-menu/Makefile
blob: c0d76ea2b1849493ae2fcb3c98011428e2c7791f (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
# New Ports collection makefile for:    XDG-Menu
# Date created:     2012-05-07
# Whom:         nemysis@gmx.ch
#
# $FreeBSD$
#

PORTNAME=   menu
PORTVERSION=    1.5
CATEGORIES= misc
MASTER_SITES=   SF/xdg-menu/xdg-menu/${PORTVERSION}
PKGNAMEPREFIX=  xdg-
DISTNAME=   XDG-Menu-${PORTVERSION}
EXTRACT_SUFX=   .tgz

MAINTAINER= nemysis@gmx.ch
COMMENT=    A ROX panel applet that displays an applications menu button

LICENSE=    GPLv2

RUN_DEPENDS=    ${LOCALBASE}/bin/rox:${PORTSDIR}/x11-fm/rox-filer \
        ${PYTHON_SITELIBDIR}/xdg/__init__.py:${PORTSDIR}/devel/py-xdg \
        ${PYTHON_SITELIBDIR}/dbus/__init__.py:${PORTSDIR}/devel/py-dbus

WRKSRC=     ${WRKDIR}/XDG-Menu
DATADIR=    ${PREFIX}/apps/XDG-Menu

FETCH_ARGS?=    -Fpr
USE_PYTHON= yes
ALL_TARGET=
NO_BUILD=   yes

OPTIONS=    ROX "Enable ROX panel applet support" no

.include <bsd.port.options.mk>

.if defined(WITHOUT_ROX)
post-patch:
    @${REINPLACE_CMD} -i '' '/if not rox.confirm/,/sys.exit/s/^/#/' ${WRKSRC}/AppRun
    @${ECHO_MSG}
    @${ECHO_MSG} "You have not enabled ROX panel applet support"
    @${ECHO_MSG}
    @${FIND} ${WRKSRC} -name "*.bak" -delete
.endif

do-install:
# Scripts
    @${PRINTF} "#!/bin/sh\n\ncd ${DATADIR} &&\
        ./AppRun\n" > ${WRKDIR}/xdg-menu.sh
    @${INSTALL_SCRIPT} ${WRKDIR}/xdg-menu.sh ${PREFIX}/bin/xdg-menu
# Executable and Data
    ${MKDIR} ${DATADIR}
    @cd ${WRKSRC} && ${FIND} . | ${CPIO} -pdmu ${DATADIR}

.include <bsd.port.mk>