You should try and merge with the existing template out there <a href="https://github.com/varnish/libvmod-example">https://github.com/varnish/libvmod-example</a><div><br></div><div><br><br><div class="gmail_quote">On Fri, Mar 23, 2012 at 1:26 PM, Cosimo Streppone <span dir="ltr"><<a href="mailto:cosimo@streppone.it">cosimo@streppone.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">During today's VUG5 dev meeting, we discussed<br>
vmod development, and looks like most people<br>
are interested in it.<br>
<br>
Now, I may be a bit slow to understand how to build<br>
a vmod, but my personal view is I don't like copying and<br>
pasting stuff around to start something new.<br>
<br>
For this reason, during this morning dev meeting,<br>
I hacked together, with a bit of spit and duct tape,<br>
sorry for that, vmod-bootstrap.<br>
<br>
<a href="https://github.com/cosimo/vmod-bootstrap/" target="_blank">https://github.com/cosimo/<u></u>vmod-bootstrap/</a><br>
<br>
vmod-bootstrap is a script that will generate<br>
a new vmod skeleton for you.<br>
<br>
It needs a "vmod.conf" file:<br>
<br>
{<br>
"name" : "frobnicator",<br>
"author" : "James J. Hacker",<br>
"version" : "0.01",<br>
"src" : "src/vmod_frobnicator.vcc",<br>
"required_libs" : [<br>
{<br>
"name" : "mhash",<br>
"function" : "mhash_count",<br>
},<br>
],<br>
"copyright" : "Copyright (c) 2012 James J. Hacker",<br>
"repository" : "git://<a href="http://github.com/jamesjhacker/vmod-frobnicator" target="_blank">github.com/<u></u>jamesjhacker/vmod-frobnicator</a>"<u></u>,<br>
...<br>
yadda yadda<br>
...<br>
}<br>
<br>
Run vmod-bootstrap and it will:<br>
<br>
- check pre-requisite packages (automake, libtool and friends)<br>
- build autoconf and automake files<br>
- inflate "m4" and "src" dirs<br>
<br>
so you can hopefully run ./autogen.sh && ./configure.<br>
<br>
Pointless? Yeah, probably. It helps me in 3 ways:<br>
<br>
- understanding which of these files are actually necessary<br>
- saves me time doing search/replace<br>
- keeps all files consistent<br>
<br>
Additional intelligence can be hardwired directly into the bootstrap tool,<br>
which makes it really interesting going forward, where now is quite<br>
stupid.<br>
<br>
Bonus idea: take all the vmod.conf you can find, and<br>
build a tool that automatically clones the sources, builds<br>
and installs/packages the vmod, cpanm-like.<br>
<br>
Thoughts?<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Cosimo<br>
<br>
______________________________<u></u>_________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/<u></u>lists/mailman/listinfo/<u></u>varnish-misc</a><br>
</font></span></blockquote></div><br></div>