# -*- 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: Portfile 91253 2012-03-27 14:10:04Z and.damore@macports.org $

PortSystem          1.0
PortGroup   github  1.0

github.setup        ChrisJohnsen tmux-MacOSX-pasteboard v1.0
name                tmux-pasteboard
license             BSD
categories          sysutils
maintainers         and.damore openmaintainer
platforms           darwin
description         Wrapper to use pasteboard services in tmux
long_description    ${description}

checksums           md5     6d7539dc4a46b4aee6184792f1025395 \
                    sha1    583d4c016862f0670013f5d411c9cb1c55c7b271 \
                    rmd160  2a2638fc610f2fc06e523debd9396f029a0023d8

use_configure       no

build.env           CC="${configure.cc}" \
                    CFLAGS="-I${prefix}/include" \
                    LDFLAGS="-L${prefix}/lib"

build.target        reattach-to-user-namespace

destroot {
    xinstall -m 755 ${worksrcpath}/reattach-to-user-namespace ${destroot}${prefix}/bin/
}

notes "To enable tmux-MacOSX-pasteboard add following line to ~/.tmux.conf replacing 'bash' with your actual shell:" \
    "set-option -g default-command \"${prefix}/bin/reattach-to-user-namespace -l bash\"" 

