Ticket #43372: Portfile

File Portfile, 2.0 KB (added by jul_bsd@…, 9 years ago)
Line 
1# -*- 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
2# $Id$
3
4PortSystem          1.0
5
6PortGroup           github 1.0
7
8github.setup        jedda OSX-Monitoring-Tools 0.9
9name                nagios-plugins-jedda
10version             20140109
11categories          net
12maintainers         yahoo.fr:jul_bsd openmaintainer
13description         A collection of scripts and tools to assist in monitoring Mac OS X and essential services with Nagios
14long_description    ${description}
15license             Public Domain
16platforms           darwin
17
18master_sites        https://github.com/jedda/OSX-Monitoring-Tools/archive/
19distname            cf9bbc6aa3fe64a77f2678eeda1525f7490939c4
20checksums           rmd160  d5d1acfd35b44b5230f167d5a6618a85345f2bc7 \
21                    sha256  943db3f58b8e95cce49ad770c58853e5dce42a7a34ba8256bfa3f4aec8aa946d
22worksrcdir          OSX-Monitoring-Tools-${distname}
23
24use_configure       no
25
26depends_run         port:smartmontools
27
28patchfiles          patch-check_smart.sh.diff
29
30set dstdir          ${prefix}/libexec/nagios
31
32build {
33    foreach f { check_osx_mem check_osx_smc } {
34        ## FIXME! how to compile *.xcodeproj in macports ? to adjust depending sdk
35        system -W ${worksrcpath}/$f "/usr/bin/xcodebuild -project $f.xcodeproj -sdk macosx10.9"
36    }
37}
38
39destroot {
40    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
41    copy ${worksrcpath}/README.md ${destroot}${prefix}/share/doc/${name}/
42    copy ${worksrcpath}/LICENSE ${destroot}${prefix}/share/doc/${name}/
43    ## more http://www.ifixit.com/Answers/View/44153/Logic+board+temperature+sensor
44    copy ${worksrcpath}/check_osx_smc/known-registers.md ${destroot}${prefix}/share/doc/${name}/
45
46    xinstall -d -m 755 ${destroot}${dstdir}
47    foreach f [glob -directory ${worksrcpath} *.sh] {
48        xinstall -m 755 ${f} ${destroot}${dstdir}/
49    }
50    foreach f { check_osx_mem check_osx_smc } {
51        xinstall -m 755 ${worksrcpath}/$f/build/Release/$f ${destroot}${dstdir}/
52    }
53}
54
55livecheck.type     none
56