2012-06-19 17:51:56 +04:00
### this might really belong to build-*...
2012-06-18 22:00:32 +04:00
# distributions
2011-10-06 12:46:31 +04:00
DISTRO_EXTS := .iso
use/pack :
2011-11-16 19:58:42 +04:00
@$( call add_feature)
2011-10-06 12:46:31 +04:00
2018-07-25 15:40:56 +03:00
# fallback type is isodata, might get set elsewhere to produce bootable iso
use/pack/iso : use /pack
@$( call try,IMAGE_PACKTYPE,isodata)
2011-10-06 12:46:31 +04:00
2012-06-18 22:00:32 +04:00
# virtual environments
2012-11-17 22:45:27 +04:00
VE_ARCHIVES := tar cpio ubifs
2011-11-25 00:13:31 +04:00
VE_COMPRESSORS := gz xz# there' s no sense in bzip2 by now
VE_ZIPS := $( call addsuffices, \
$( addprefix .,$( VE_COMPRESSORS) ) , \
$( VE_ARCHIVES) ) # tar.gz cpio.xz ...
VE_EXTS := $( sort $( addprefix .,$( VE_ARCHIVES) $( VE_ZIPS) ) ) # .tar .tar.gz ...
2011-10-06 12:46:31 +04:00
2011-11-25 00:13:31 +04:00
# generate rules for archive/compressor combinations
d e f i n e P A C K _ c o n t a i n e r s
use/pack/$(1) : use /pack
@$$ ( call set,IMAGE_PACKTYPE,$( 1) )
e n d e f
d e f i n e P A C K _ c o m p r e s s o r s
use/pack/$(1).$(2) : use /pack /$( 1)
@$$ ( call set,IMAGE_COMPRESS,$( 2) )
e n d e f
2019-05-19 09:23:16 +03:00
i f e q ( v e , $( IMAGE_CLASS ) )
2011-11-25 00:13:31 +04:00
$( foreach c ,$ ( VE_ARCHIVES ) , \
$( eval $( call PACK_containers,$( c) ) ) \
$( foreach z,$( VE_COMPRESSORS) , \
$( eval $( call PACK_compressors,$( c) ,$( z) ) ) ) )
2019-05-19 09:23:16 +03:00
e n d i f
2012-06-18 22:00:32 +04:00
2019-05-19 09:23:16 +03:00
# extensions for buld-vm
VM_EXTS := .tar .tar.gz .tar.xz .img .qcow2 .qcow2c .vdi .vmdk .vhd
2019-05-19 12:39:04 +03:00
VM_TAVOLGA_EXTS := .recovery.tar
2019-05-19 09:23:16 +03:00
i f e q ( v m , $( IMAGE_CLASS ) )
2012-06-18 22:00:32 +04:00
2012-06-19 17:51:56 +04:00
$(VM_EXTS : .%=use /pack /%): use /pack ; @:
2019-05-19 09:23:16 +03:00
2019-05-19 12:39:04 +03:00
i f e q ( m i p s e l , $( ARCH ) )
use/pack/recovery.tar : use /pack /tar ; @:
e n d i f
2019-05-19 09:23:16 +03:00
e n d i f