Skip to content

Commit

Permalink
upgrade to r87, install priv/skel contents as well, add a
Browse files Browse the repository at this point in the history
README.MacPorts for first instructions.

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@40483 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Caspar Florian Ebeling committed Oct 3, 2008
1 parent 86fabc6 commit 1170e06
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 5 deletions.
34 changes: 29 additions & 5 deletions erlang/mochiweb/Portfile
Expand Up @@ -4,7 +4,10 @@ PortSystem 1.0

name mochiweb

version 0.0 ; # project hasn't assigned a version yet
set svnrev 87

version r${svnrev} ; # project hasn't assigned a version yet
epoch 20081003

categories erlang devel
maintainers febeling openmaintainer
Expand All @@ -16,16 +19,35 @@ use_configure no
depends_lib port:erlang
fetch.type svn
svn.url http://mochiweb.googlecode.com/svn/trunk/
svn.tag 84
svn.tag ${svnrev}
worksrcdir trunk
build.target all
set libdir ${destroot}${prefix}/lib/erlang/lib/${name}
set privdir ${libdir}/priv
set ebindir ${libdir}/ebin
destroot.keepdirs ${privdir}/skel/ebin ${privdir}/skel/include ${privdir}/skel/docs ${privdir}/skel/deps
destroot {
set libdir ${destroot}${prefix}/lib/erlang/lib/${name}

set ebindir ${libdir}/ebin
xinstall -d -m 0755 ${ebindir}
eval xinstall -m 0644 [glob ${worksrcpath}/ebin/*.beam] ${ebindir}

xinstall -d -m 0755 ${privdir}/skel/priv/www
xinstall -d -m 0755 ${privdir}/skel/deps
xinstall -d -m 0755 ${privdir}/skel/docs
xinstall -d -m 0755 ${privdir}/skel/ebin
xinstall -d -m 0755 ${privdir}/skel/include
xinstall -d -m 0755 ${privdir}/skel/src
xinstall -d -m 0755 ${privdir}/skel/support
xinstall -m 0644 ${worksrcpath}/priv/skel/Makefile \
${privdir}/skel
eval xinstall -m 0644 [glob ${worksrcpath}/priv/skel/start*.sh] \
${privdir}/skel
eval xinstall -m 0644 ${worksrcpath}/priv/skel/priv/www/index.html \
${privdir}/skel/priv/www
eval xinstall -m 0644 [glob ${worksrcpath}/priv/skel/src/{Makefile,*.html,*.erl,*.hrl,*.app}] \
${privdir}/skel/src
xinstall -m 0644 ${worksrcpath}/priv/skel/support/include.mk \
${privdir}/skel/support

set docdir ${destroot}${prefix}/share/doc/${name}
xinstall -d -m 0755 ${docdir}
eval xinstall -m 0644 [glob ${worksrcpath}/doc/*.html] ${docdir}
Expand All @@ -34,6 +56,8 @@ destroot {
LICENSE README \
${docdir}

xinstall -m 0644 ${filespath}/README.MacPorts ${docdir}

set scriptsdir ${destroot}${prefix}/share/scripts
xinstall -d -m 0755 ${scriptsdir}
eval xinstall -m 0644 [glob ${worksrcpath}/scripts/*.erl] ${scriptsdir}
Expand Down
25 changes: 25 additions & 0 deletions erlang/mochiweb/files/README.MacPorts
@@ -0,0 +1,25 @@

== Getting started with mochiweb

Run this command to create an empty web
application project:

$ escript /opt/local/share/scripts/new_mochiweb.erl myapp
$ cd myapp
$ make
$ chmod u+x start-dev.sh
$ ./start-dev.sh

Then open a new terminal tab, because then current
one becomes an erlang shell. There do:

$ open http://localhost:8000

Your default browser should open and show a page
containing "MochiWeb running."

Start developing by modifiying
src/APPNAME_web.erl, in the main loop case construct.

C. Florian Ebeling <febeling@macports.org>
2008-10-03

0 comments on commit 1170e06

Please sign in to comment.