opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

gen.lua (1744B)


      1 cflags({
      2 	'-std=c99', '-Wall', '-Wextra', '-Wpedantic', '-Wno-switch',
      3 	'-D _XOPEN_SOURCE=700',
      4 })
      5 
      6 lib('libcommon.a', {
      7 	'blaze822.c',
      8 	'filter.c',
      9 	'mymemmem.c',
     10 	'mystrverscmp.c',
     11 	'mytimegm.c',
     12 	'pipeto.c',
     13 	'rfc2045.c',
     14 	'rfc2047.c',
     15 	'rfc2231.c',
     16 	'safe_u8putstr.c',
     17 	'seq.c',
     18 	'slurp.c',
     19 	'squeeze_slash.c',
     20 })
     21 
     22 local tools = {
     23 	'maddr',
     24 	'magrep',
     25 	'mdate',
     26 	'mdeliver',
     27 	'mdirs',
     28 	'mexport',
     29 	'mflag',
     30 	'mflow',
     31 	'mgenmid',
     32 	'mhdr',
     33 	'minc',
     34 	'mlist',
     35 	'mmime',
     36 	'mpick',
     37 	'mscan',
     38 	'msed',
     39 	'mseq',
     40 	'mshow',
     41 	'msort',
     42 	'mthread',
     43 }
     44 for _, tool in ipairs(tools) do
     45 	exe(tool, {tool..'.c', 'libcommon.a'})
     46 	file('bin/'..tool, '755', '$outdir/'..tool)
     47 end
     48 
     49 build('awk', '$outdir/museragent', {'$srcdir/VERSION'}, {
     50 	expr=[['{print "#!/bin/sh"; print "exec printf \"User-Agent: mblaze/%s\\n\" \"" $$0 "\""}']],
     51 })
     52 
     53 local scripts = {
     54 	'mcolor',
     55 	'mcom',
     56 	'mless',
     57 	'mmkdir',
     58 	'mquote',
     59 }
     60 for _, script in ipairs(scripts) do
     61 	file('bin/'..script, '755', '$srcdir/'..script)
     62 end
     63 file('bin/msign', '755', '$srcdir/contrib/msign')
     64 file('bin/mverify', '755', '$srcdir/contrib/mverify')
     65 file('bin/museragent', '755', '$outdir/museragent')
     66 sym('bin/mbnc', 'mcom')
     67 sym('bin/mfwd', 'mcom')
     68 sym('bin/mrep', 'mcom')
     69 sym('bin/mrefile', 'mdeliver')
     70 
     71 man({
     72 	'man/maddr.1',
     73 	'man/magrep.1',
     74 	'man/mblaze-profile.5',
     75 	'man/mblaze.7',
     76 	'man/mbnc.1',
     77 	'man/mcom.1',
     78 	'man/mdeliver.1',
     79 	'man/mdirs.1',
     80 	'man/mexport.1',
     81 	'man/mflag.1',
     82 	'man/mflow.1',
     83 	'man/mfwd.1',
     84 	'man/mgenmid.1',
     85 	'man/mhdr.1',
     86 	'man/minc.1',
     87 	'man/mless.1',
     88 	'man/mlist.1',
     89 	'man/mmime.1',
     90 	'man/mmkdir.1',
     91 	'man/mmsg.7',
     92 	'man/mpick.1',
     93 	'man/mrefile.1',
     94 	'man/mrep.1',
     95 	'man/mscan.1',
     96 	'man/msed.1',
     97 	'man/mseq.1',
     98 	'man/mshow.1',
     99 	'man/msort.1',
    100 	'man/mthread.1',
    101 })
    102 
    103 fetch('git')