diff --git a/opkg-build b/opkg-build index 937f2f3..0d3ca23 100755 --- a/opkg-build +++ b/opkg-build @@ -189,12 +189,12 @@ compressor_ext() { : <<=cut =head1 SYNOPSIS -B [B<-c>] [B<-C>] [B<-Z> I] [B<-O>] [B<-o> I] [B<-g> I] I [I] +B [B<-c>] [B<-C>] [B<-Z> I] [B<-a>] [B<-O>] [B<-o> I] [B<-g> I] I [I] =cut -usage="Usage: $0 [-c] [-C] [-Z compressor] [-O] [-o owner] [-g group] []" -while getopts "cCg:ho:vOZ:" opt; do +usage="Usage: $0 [-c] [-C] [-Z compressor] [-a] [-O] [-o owner] [-g group] []" +while getopts "a:cCg:ho:vOZ:" opt; do case $opt in o ) owner=$OPTARG ogargs="--owner=$owner" @@ -210,6 +210,8 @@ while getopts "cCg:ho:vOZ:" opt; do ;; Z ) compressor=$OPTARG ;; + a ) compressorargs=$OPTARG + ;; v ) echo $version exit 0 ;; @@ -228,11 +230,14 @@ cext=$(compressor_ext $compressor) if gzip --help 2>&1 | grep -- "-T" > /dev/null; then zipargs="-9nT" fi -if [ $compressor = "gzip" ] ; then - compressorargs=$zipargs -elif [ $compressor = "pigz" ] ; then - if $compressor --help 2>&1 | grep -- "-T" > /dev/null; then - compressorargs="-9nT" + +if [ compressorargs = "" ] ; then + if [ $compressor = "gzip" ] ; then + compressorargs=$zipargs + elif [ $compressor = "pigz" ] ; then + if $compressor --help 2>&1 | grep -- "-T" > /dev/null; then + compressorargs="-9nT" + fi fi fi @@ -343,6 +348,10 @@ Stop with an error if any files ending with B<~> are found. The default behaviou Specify which compression type to use when building a package. Allowed values are B, B, B and B (default is B). +=item B<-a> I + +Specify the arguments used by the compressor. Overrides the default values. + =item B<-O> Use B<.opk> extension. By default, B<.ipk> is used.