diff options
| author | Michael Forney <mforney@mforney.org> | 2020-09-17 14:25:59 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2020-09-22 15:00:17 -0700 |
| commit | bb6f7b39a8cc5ad1186235644e91aadb243ca6bd (patch) | |
| tree | fbcc9a000218bd626f1b42261090fad058745a76 /pkg/mblaze/gen.lua | |
| parent | 501e736e01ea80263ebab29b14076be07b9d97fc (diff) | |
Add mblaze 1.0
Diffstat (limited to 'pkg/mblaze/gen.lua')
| -rw-r--r-- | pkg/mblaze/gen.lua | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/pkg/mblaze/gen.lua b/pkg/mblaze/gen.lua new file mode 100644 index 00000000..363c4ca8 --- /dev/null +++ b/pkg/mblaze/gen.lua @@ -0,0 +1,100 @@ +cflags{ + '-std=c99', '-Wall', '-Wextra', '-Wpedantic', '-Wno-switch', + '-D _XOPEN_SOURCE=700', +} + +lib('libcommon.a', { + 'blaze822.c', + 'filter.c', + 'mymemmem.c', + 'mystrverscmp.c', + 'mytimegm.c', + 'pipeto.c', + 'rfc2045.c', + 'rfc2047.c', + 'rfc2231.c', + 'safe_u8putstr.c', + 'seq.c', + 'slurp.c', + 'squeeze_slash.c', +}) + +local tools = { + 'maddr', + 'magrep', + 'mdate', + 'mdeliver', + 'mdirs', + 'mexport', + 'mflag', + 'mflow', + 'mgenmid', + 'mhdr', + 'minc', + 'mlist', + 'mmime', + 'mpick', + 'mscan', + 'msed', + 'mseq', + 'mshow', + 'msort', + 'mthread', +} +for _, tool in ipairs(tools) do + exe(tool, {tool..'.c', 'libcommon.a'}) + file('bin/'..tool, '755', '$outdir/'..tool) +end + +build('awk', '$outdir/museragent', {'$srcdir/VERSION'}, { + expr=[['{print "#!/bin/sh"; print "exec printf \"User-Agent: mblaze/%s\\n\" \"" $$0 "\""}']], +}) + +local scripts = { + 'mcolor', + 'mcom', + 'mless', + 'mmkdir', + 'mquote', +} +for _, script in ipairs(scripts) do + file('bin/'..script, '755', '$srcdir/'..script) +end +file('bin/museragent', '755', '$outdir/museragent') +sym('bin/mbnc', 'mcom') +sym('bin/mfwd', 'mcom') +sym('bin/mrep', 'mcom') + +man{ + 'man/maddr.1', + 'man/magrep.1', + 'man/mblaze-profile.5', + 'man/mblaze.7', + 'man/mbnc.1', + 'man/mcom.1', + 'man/mdeliver.1', + 'man/mdirs.1', + 'man/mexport.1', + 'man/mflag.1', + 'man/mflow.1', + 'man/mfwd.1', + 'man/mgenmid.1', + 'man/mhdr.1', + 'man/minc.1', + 'man/mless.1', + 'man/mlist.1', + 'man/mmime.1', + 'man/mmkdir.1', + 'man/mmsg.7', + 'man/mpick.1', + 'man/mrefile.1', + 'man/mrep.1', + 'man/mscan.1', + 'man/msed.1', + 'man/mseq.1', + 'man/mshow.1', + 'man/msort.1', + 'man/mthread.1', +} + +fetch 'git' |
