# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem          1.0
PortGroup           github 1.0
PortGroup           xcode 1.0

github.setup        whomwah qlstephen 1.4.2
name                QLStephen
categories          sysutils

platforms           darwin
license             public-domain
maintainers         sean openmaintainer

description         A QuickLook plugin that lets you view plain text \
                    files without a file extension
long_description    ${description}

checksums           rmd160  dfd7681f989cc01e27417ec56c5fa2a06c3e2512 \
                    sha256  e2b7acc5f70ace951b2ad28836c3dcc6b1452fa83929ba4e541ed416097e6ea3

worksrcdir          ${distname}/QuickLookStephenProject

destroot.violate_mtree  yes

post-extract {
    reinplace -W ${worksrcpath} "s,AEF4F27A0EDD58F800A55543.*,," QuickLookStephen.xcodeproj/project.pbxproj
}

destroot {
    xinstall -d ${destroot}/Library/QuickLook
    file copy ${worksrcpath}/build/Release/${name}.qlgenerator ${destroot}/Library/QuickLook
}

# force quicklook to reload plugins
post-activate {
    system "qlmanage -r"
}

post-deactivate {
    system "qlmanage -r"
}
