opkg

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

gen.lua (1015B)


      1 cflags({
      2 	'-Wall', '-Wextra', '-Wpedantic',
      3 	'-include $dir/config.h',
      4 })
      5 
      6 pkg.hdrs = {
      7 	copy('$outdir/include', '$srcdir/lib', {'zstd.h', 'zdict.h', 'zstd_errors.h'}),
      8 }
      9 pkg.deps = {
     10 	'$gendir/headers',
     11 	'$dir/config.h',
     12 }
     13 
     14 lib('libzstd.a', [[lib/(
     15 	common/(
     16 		debug.c
     17 		entropy_common.c
     18 		error_private.c
     19 		fse_decompress.c
     20 		pool.c
     21 		threading.c
     22 		xxhash.c
     23 		zstd_common.c
     24 	)
     25 	compress/(
     26 		fse_compress.c
     27 		hist.c
     28 		huf_compress.c
     29 		zstd_compress.c
     30 		zstd_compress_literals.c
     31 		zstd_compress_sequences.c
     32 		zstd_compress_superblock.c
     33 		zstd_double_fast.c
     34 		zstd_fast.c
     35 		zstd_lazy.c
     36 		zstd_ldm.c
     37 		zstd_opt.c
     38 		zstd_preSplit.c
     39 		zstdmt_compress.c
     40 	)
     41 	decompress/(
     42 		@x86_64 huf_decompress_amd64.S
     43 		huf_decompress.c
     44 		zstd_ddict.c
     45 		zstd_decompress.c
     46 		zstd_decompress_block.c
     47 	)
     48 )]])
     49 
     50 exe('zstd', [[
     51 	programs/(zstdcli.c util.c timefn.c fileio.c fileio_asyncio.c)
     52 	libzstd.a
     53 ]])
     54 file('bin/zstd', '755', '$outdir/zstd')
     55 sym('bin/unzstd', 'zstd')
     56 sym('bin/zstdcat', 'zstd')
     57 
     58 man({'programs/zstd.1'})
     59 
     60 fetch('git')