aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm/openbox/Makefile
blob: 466e6e6c4661ee1f981224e0b412e974ec0033a7 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# New ports collection makefile for:    openbox
# Date created:             2002-04-28
# Whom:                 trevor
# based on the blackbox port
#
# $FreeBSD$
#

PORTNAME=   openbox
PORTVERSION=    0.3.0.4
CATEGORIES= x11-wm
MASTER_SITES=   http://icculus.org/openbox/releases/
DISTNAME=   openbox-3.0-rc4

MAINTAINER= trevor@FreeBSD.org
COMMENT=    Derived from, and similar to, Blackbox

LIB_DEPENDS=    Xft.2:${PORTSDIR}/x11-fonts/Xft

CONFIGURE_ARGS= --datadir=${PREFIX}/share/openbox --prefix=${PREFIX} \
        --sysconfdir=${PREFIX}/etc/openbox
DOCS=       ABOUT-NLS AUTHORS CHANGELOG COPYING README TODO
GNU_CONFIGURE=  yes
PKGMESSAGE= ${WRKDIR}/pkg-message
PLIST=      ${WRKDIR}/pkg-plist
USE_GMAKE=  yes
USE_GNOME=  glib20 libxml2
USE_X_PREFIX=   yes

post-build:
    ${CP} -P ${WRKSRC}/data/rc.xml ${WRKSRC}/data/rc.xml.orig
    ${CP} -P ${WRKSRC}/data/menu.xml ${WRKSRC}/data/openbox-menu.xml
    ${SED} -E "s:/etc/X11/openbox/:${PREFIX}/share/openbox/:g" \
        < ${WRKSRC}/data/rc.xml.orig > ${WRKSRC}/data/rc.xml
    ${RM} ${WRKSRC}/data/rc.xml.orig

pre-configure:
    ${MKDIR} ${WRKDIR}
    ${ECHO_CMD} \
    "Warning:  source code for this version has not been reviewed!" \
        > ${PKGMESSAGE}
    @${CAT} ${PKGMESSAGE}
    @${ECHO_CMD} 
    @${ECHO_CMD} Waiting ten seconds--press control-C to cancel build.
    @sleep 10

pre-install:
    ${RM} -f ${PLIST}
.for ii in gnome-panel-control openbox kdetrayproxy themeupdate.py
    ${ECHO_CMD} bin/${ii} >> ${PLIST}
.endfor
    cd ${WRKSRC} && ${FIND} -s data themes -type f \
        | ${SED} -e 's:^:share/openbox/:' >> ${PLIST} \
        && ${FIND} data themes -type d | sort -r \
        | ${SED} -e 's:^:@dirrm share/openbox/:' >> ${PLIST}
    cd ${WRKSRC}/data && ${FIND} -s * -type f \
        | ${SED} -e 's:^:share/openbox/:' >> ${PLIST}
    ${ECHO_CMD} share/gnome/wm-properties/openbox.desktop >> ${PLIST}
.for ii in menu rc
    ${ECHO_CMD} etc/openbox/xdg/openbox/${ii}.xml >> ${PLIST}
.endfor
.for ii in openbox/xdg/openbox openbox/xdg openbox
     ${ECHO_CMD} @dirrm etc/${ii} >> ${PLIST}
.endfor
.for ii in openbox/3.0 3.0
     ${ECHO_CMD} @dirrm include/${ii} >> ${PLIST}
.endfor
.for ii in la lai so so.1
    ${ECHO_CMD} lib/libobparser.${ii} >> ${PLIST}
    ${ECHO_CMD} lib/libobrender.${ii} >> ${PLIST}
.endfor
.if !defined(NOPORTDOCS)
.for ii in ${DOCS}
    ${ECHO_CMD} share/doc/openbox/${ii} >> ${PLIST}
.endfor
    ${ECHO_CMD} @dirrm share/doc/openbox >> ${PLIST}
.endif

do-install:
    ${MKDIR} ${DATADIR} ${PREFIX}/etc/openbox/xdg/openbox \
        ${PREFIX}/include/openbox/3.0
.for ii in parser/parse render/theme render/render
    ${INSTALL_DATA} ${WRKSRC}/${ii}.h ${PREFIX}/include/openbox/3.0
.endfor
.for ii in menu rc
    ${INSTALL_DATA} ${WRKSRC}/data/${ii}.xml \
        ${PREFIX}/etc/openbox/xdg/openbox
.endfor
.for ii in openbox/.libs/openbox tools/kdetrayproxy/kdetrayproxy \
    tools/gnome-panel-control/gnome-panel-control
    ${INSTALL_PROGRAM} ${WRKSRC}/${ii} ${PREFIX}/bin
.endfor
    ${INSTALL_SCRIPT} ${WRKSRC}/tools/themeupdate/themeupdate.py \
        ${PREFIX}/bin
    cd ${WRKSRC} && pax -r -w data themes ${PREFIX}/share/openbox/
    cd ${WRKSRC} && ${INSTALL_DATA} data/* ${PREFIX}/share/openbox/
    cd ${WRKSRC} && ${INSTALL_DATA} data/openbox.desktop \
        ${PREFIX}/share/gnome/wm-properties/
.for ii in la lai so so.1
    cd ${WRKSRC} && \
        ${INSTALL_DATA} parser/.libs/libobparser.${ii} ${PREFIX}/lib \
        && ${INSTALL_DATA} render/.libs/libobrender.${ii} ${PREFIX}/lib
.endfor
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for ii in ${DOCS}
    ${INSTALL_DATA} ${WRKSRC}/${ii} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>