gen.lua (648B)
1 cflags({ 2 '-std=c99', '-Wall', '-Wpedantic', 3 '-D _XOPEN_SOURCE=700', 4 '-isystem $builddir/pkg/libs/libgit2/include', 5 }) 6 7 pkg.deps = {'pkg/libs/libgit2/headers'} 8 9 lib('libcompat.a', {'strlcat.c', 'strlcpy.c', 'reallocarray.c'}) 10 11 for _, tool in ipairs({'stagit', 'stagit-index'}) do 12 exe(tool, {tool..'.c', 'libcompat.a', '$builddir/pkg/libs/libgit2/libgit2.a.d'}) 13 file('bin/'..tool, '755', '$outdir/'..tool) 14 man({tool..'.1'}) 15 end 16 17 local examples = { 18 'example_create.sh', 19 'example_post-receive.sh', 20 'favicon.png', 21 'logo.png', 22 'style.css' 23 } 24 25 for _, ex in ipairs(examples) do 26 file('share/stagit/'..ex, '644', '$srcdir/'..ex) 27 end 28 29 fetch('git')