source: trunk/dports/devel/ninka/Portfile

Last change on this file was 142452, checked in by ryandesign@…, 21 months ago

ninka: update to 1.3, now licensed GPL-2+; take over as maintainer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
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: Portfile 142452 2015-11-12 09:27:39Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                ninka
7version             1.3
8categories          devel
9platforms           darwin
10maintainers         ryandesign openmaintainer
11license             GPL-2+
12
13description         license identification tool
14long_description    \
15    Ninka is a lightweight license identification tool for source code. It is \
16    sentence-based, and provides a simple way to identify open source licenses in a \
17    source code file. It is capable of identifying several dozen different licenses \
18    (and their variations)
19homepage            http://ninka.turingmachine.org
20master_sites        http://ninka.turingmachine.org/download
21depends_lib         bin:perl:perl5
22use_bzip2           yes
23supported_archs     noarch
24
25checksums           rmd160  84925c82173d54e036b76a6639d018055a033b5c \
26                    sha256  fb9c17bcea2c1c2f77ae0adfe1a95adc7778c55041249fba89f2ad5fb75374fb
27
28post-extract {
29    # Fix incorrect permissions in distfile, and remove backup files that
30    # were left in the distfile.
31    fs-traverse item ${workpath} {
32        if {[string index ${item} end] eq "~"} {
33            delete ${item}
34        } else {
35            file attributes ${item} -permissions a+r
36        }
37    }
38}
39
40set datadir         ${prefix}/share/${name}
41set docdir          ${prefix}/share/doc/${name}
42
43patchfiles          patch-ninka.pl.diff
44post-patch {
45    reinplace "s|%%DATADIR%%|${datadir}|" ${worksrcpath}/ninka.pl
46}
47
48use_configure       no
49build {}
50destroot {
51    xinstall ${worksrcpath}/ninka.pl ${destroot}${prefix}/bin/ninka
52
53    xinstall -d ${destroot}${datadir}
54    set directoriesToCopy [list comments extComments filter matcher senttok splitter]
55    foreach directory ${directoriesToCopy} {
56        copy ${worksrcpath}/${directory} ${destroot}${datadir}
57    }
58
59    xinstall -d ${destroot}${docdir}
60    xinstall -m 644 -W ${worksrcpath} ChangeLog README.txt ${destroot}${docdir}
61}
Note: See TracBrowser for help on using the repository browser.