[Pkg-clojure-maintainers] Clojure example

Wolodja Wentland debian at babilen5.org
Mon Apr 22 17:47:48 UTC 2013

On Mon, Apr 22, 2013 at 19:07 +0200, Eugenio Cano-Manuel Mendoza wrote:

> What's a good example of a Leiningen package? I've downloaded the packages for
> lein-clojars, clucy and robert-hooke. 

Yeah, they are reasonable. The most recent is probably robert-hooke in terms
of style.

> lein-clojars seems very straightforward, the debian/rules file is very simple
> and is exactly what I would have expected (I'm guessing because it has no
> dependencies).

I haven't packaged that, we might want to get malat to join us. It is,
however, interesting to see a package in action that actually uses leiningen
during the build. As expected (well, lein jar vs lein compile) this results in:

        lein jar

        lein clean

Which is probably the first thing our dh_lein2 should do.

> robert-hooke and clucy are a bit different, for instance they set a classpath
> to find the dependencies and there's a target %.html which is for
> documentation? Also a few variables are set in the beginning to make it
> possible to use the get-orig-source target.

The html target is simply there to help us to generate documentation from the
markdown files in which they come. We ship html versions in
/usr/share/doc/PKG/html and register them with doc-base [0]. This is
configured in, for example, robert-hooke with the following:

    babilen at asasello: ~/debian/pkg-java/robert-hooke/debian (master u=) $ cat librobert-hooke-clojure.docs
    babilen at asasello: ~/debian/pkg-java/robert-hooke/debian (master u=) $ cat librobert-hooke-clojure.doc-base
    Document: robert-hooke
    Title: Robert-Hooke tutorial
    Author: Phil Hagelberg, Robert Downey
    Abstract: A short tutorial on the Clojure function wrapper library
    Section: Programming

    Format: HTML
    Index: /usr/share/doc/librobert-hooke-clojure/html/README.html
    Files: /usr/share/doc/librobert-hooke-clojure/html/README.html

    Format: Text
    Index: /usr/share/doc/librobert-hooke-clojure/README.md
    Files: /usr/share/doc/librobert-hooke-clojure/README.md

Read dh_installdocs(1) for information about these :)

> Another question: Can I use javahelper to package my hello world
> pre-application contribution along with dh_lein2 or does it have to strictly be
> "--with dh_lein2" and nothing else?

I have to confess that I don't quite understand this question. The idea is,
more or less, simply to write a /very/ easy implementation of a debhelper
sequence. The way in which this would be called is by adding "--with
dh_lein2" in debian/rules to start the sequence. You would only jeed
javahelper if the tool you call in that sequence requires javahelper to be
compiled. You can, simply, ship a shell script that prints the required
string. It does not have to be written in Clojure, Java or anything like that.
In fact, the decision how to implement these tools is an important one during
the project.

[0] file:///usr/share/doc/doc-base/doc-base.html/index.html
Wolodja <debian at babilen5.org>

081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-clojure-maintainers/attachments/20130422/3b43d2a0/attachment.pgp>

More information about the Pkg-clojure-maintainers mailing list