Ticket #2662: ckstyle.shar

File ckstyle.shar, 2.4 KB (added by dave@…, 20 years ago)

Shar file with Portfile and shell script

Line 
1# This is a shell archive.  Save it in a file, remove anything before
2# this line, and then unpack it by entering "sh file".  Note, it may
3# create directories; files and directories will be owned by you and
4# have default permissions.
5#
6# This archive contains:
7#
8#       Portfile
9#       files/checkstyle
10#
11echo x - Portfile
12sed 's/^X//' >Portfile << 'END-of-Portfile'
13X# $Id$
14X
15XPortSystem 1.0
16X
17Xname                   checkstyle
18Xversion                        3.5
19Xcategories             java lang
20Xplatforms              darwin
21Xmaintainers            dglo@icecube.wisc.edu
22Xdescription            CheckStyle is a Java source code analyzer
23Xlong_description       Checkstyle is a Java source code analyzer. \
24X                       It automates the process of checking Java code, \
25X                       and can be made to support almost any coding \
26X                       standard.  It can also find class design problems, \
27X                       duplicate code, or bug patterns like \
28X                       double checked locking.
29X
30Xhomepage               http://checkstyle.sourceforge.net/
31Xmaster_sites   sourceforge
32Xdistname               ${name}-src-${version}
33Xchecksums              md5 1b4403f6c03b21c841431678dad92a85
34Xuse_zip                        yes
35X
36Xdepends_build  bin:ant:apache-ant
37Xdepends_lib            bin:java:kaffe
38Xdepends_run            lib:XXX:junit
39X
40Xworksrcdir             ${name}-src-${version}
41X
42Xuse_configure  no
43X
44Xbuild.cmd              ant
45Xbuild.target   build.bindist
46Xbuild.dir              ${worksrcpath}
47Xbuild.env              CLASSPATH=${prefix}/share/java/junit.jar
48X
49Xdestroot       {
50X       xinstall -m 755 ${filespath}/${name} ${destroot}${prefix}/bin
51X       reinplace "s|_PREFIX_|${prefix}|g" ${destroot}${prefix}/bin/${name}
52X       xinstall -m 755 -d ${destroot}${prefix}/share/java \
53X               ${destroot}${prefix}/share/doc
54X       xinstall -m 644 ${worksrcpath}/target/dist/${name}-${version}/${name}-all-${version}.jar \
55X               ${destroot}${prefix}/share/java/${name}.jar
56X       xinstall -m 644 ${worksrcpath}/target/dist/${name}-${version}/${name}-optional-${version}.jar \
57X               ${destroot}${prefix}/share/java/${name}-optional.jar
58X       file copy ${worksrcpath}/target/docs \
59X               ${destroot}${prefix}/share/doc/${name}
60X       file mkdir ${destroot}${prefix}/share/${name}/
61X       foreach xsl [glob -nocomplain ${worksrcpath}/contrib/*.xsl] {
62X         file copy ${xsl} ${destroot}${prefix}/share/${name}/
63X       }
64X}
65END-of-Portfile
66echo x - files/checkstyle
67sed 's/^X//' >files/checkstyle << 'END-of-files/checkstyle'
68X#!/bin/sh
69XPREFIX=_PREFIX_
70X                                                                                java -classpath ${PREFIX}/share/java/checkstyle.jar:${PREFIX}/share/java/checkstyle-optional.jar com.puppycrawl.tools/checkstyle.Main "$@"
71Xfi
72X
73END-of-files/checkstyle
74exit
75