# $Id: Portfile,v 1.4 2006/04/05 19:02:36 yves Exp $

PortSystem 1.0

name			 wm-extra
version			 0.1
revision         2
categories		 x11 x11-wm
maintainers		 yves@opendarwin.org
homepage         http://www.windowmaker.org/ / \
                 http://themes.freshmeat.net/browse/918/?topic_id=918
description		 Extra themes for WindowMaker
long_description ${description}
platforms		 darwin

set theme_site http://download.freshmeat.net/themes/
master_sites \
    http://www.windowmaker.info/pub/source/release/:source \
    http://www.opendarwin.org/~yves/:yd \
    ${theme_site}0ne/:One \
    ${theme_site}actekchallenge/:actek \
    ${theme_site}afeelingofrain/:rain \
    ${theme_site}alphawm/:alpha \
    ${theme_site}anemexiis/:anemexiis \
    ${theme_site}blaircastlestream/:blair \
    ${theme_site}blueleaves/:blue \
    ${theme_site}bluerose/:bluerose \
    ${theme_site}calvinandhobbes/:calvin \
    ${theme_site}chaosoflife/:chaos \
    ${theme_site}eldotsee/:eldotsee \
    ${theme_site}explorer/:explorer \
    ${theme_site}gnusteppenguin/:penguin \
    ${theme_site}secretspotwm/:secret

distfiles \
    WindowMaker-extra-latest${extract.suffix}:source \
    yd_wm_extras-0.2.tar.gz:yd \
    0ne-default-1.tar.gz:One \
    actekchallenge-default-0.1.tar.gz:actek \
    afeelingofrain-default-0.3.tar.gz:rain \
    alphawm-default-0.81.tar.gz:alpha \
    anemexiis-1.0.tar.gz:anemexiis \
    blaircastlestream-default-1.0.tar.gz:blair \
    blueleaves-default.tar.gz:blue \
    bluerose-default-0.3.tar.gz:bluerose \
    calvinandhobbes-0.60.0.tar.gz:calvin \
    chaosoflife-0.5.tar.gz:chaos \
    eldotsee-0.60.0.tar.gz:eldotsee \
    explorer-default-0.81.tar.gz:explorer \
    gnusteppenguin-0.60.0.tar.gz:penguin \
    secretspotwm-default-0.80.tar.gz:secret

checksums \
		WindowMaker-extra-latest${extract.suffix} \
		    md5 07c7700daaaf232bc490f5abaabef085 \
		yd_wm_extras-0.2.tar.gz \
		    md5 a2aa7a290c077806fd03192fe507f6fe \
		0ne-default-1.tar.gz \
		    md5 aa1aed3824217b01c87f3ff58cfbf23e \
		actekchallenge-default-0.1.tar.gz \
		    md5 c961cb68f22d52548c1572f2624e929e \
		afeelingofrain-default-0.3.tar.gz \
		    md5 588aa39261f54cab6f490e7460d8f431 \
		alphawm-default-0.81.tar.gz \
		    md5 d9eec2c1fd9a6691896609c203cb0d40 \
		anemexiis-1.0.tar.gz \
		    md5 b708c8c5b5aea97b7c2fa33b57003465 \
		blaircastlestream-default-1.0.tar.gz \
		    md5 9e9e7627dc0224f5375f2f16503aa54c \
		blueleaves-default.tar.gz \
		    md5 38aaf05cdeec52d700264f28b78e2544 \
		bluerose-default-0.3.tar.gz \
		    md5 899dcb1d60b9d7c82aa41fc23e64af9a \
		calvinandhobbes-0.60.0.tar.gz \
		    md5 f8b189ef916b11041f2403eec3155ca4 \
		chaosoflife-0.5.tar.gz \
		    md5 f5b86312dbf8033d38f16c23a32f1591 \
		eldotsee-0.60.0.tar.gz \
		    md5 6f3043c430c325cfb97eef73b71f280e \
		explorer-default-0.81.tar.gz \
		    md5 6db5e40bd4aba0e44dcecd1e6feeb8dd \
		gnusteppenguin-0.60.0.tar.gz \
		    md5 dc0a20c37869a38048c571e3ffad7d15 \
		secretspotwm-default-0.80.tar.gz \
		    md5 8ff1a55d36a7a32832cd74a1cc4d0976


worksrcdir      WindowMaker-extra-${version}
build { }

post-destroot {
    set wm_data ${destroot}${prefix}/share/WindowMaker
    cd ${workpath}
    xinstall -d -m 755 ${wm_data}/Backgrounds
    xinstall -m 644 gnustepeinstein3.png \
        ${wm_data}/Backgrounds
    xinstall -m 644 hexley_fork_96.tiff ${wm_data}/Icons
    file rename GNUstep/Library/WindowMaker/Themes/ElDotSee.themed .
    set fl [glob *.themed]
    foreach theme $fl {
        xinstall -d -m 755 ${wm_data}/Themes/$theme
        set dl [glob ${theme}/*]
        foreach item $dl {
            xinstall -m 644 $item ${wm_data}/Themes/$theme
        }
    }
    cd ${wm_data}/Icons
    file delete -force Draw.xpm PDF.xpm xv.xpm
}
