extract gzip files
Ryan Schmidt
ryandesign at macports.org
Mon Dec 3 00:27:34 UTC 2018
On Dec 2, 2018, at 15:20, Mark Brethen wrote:
> On Dec 2, 2018, at 2:32 PM, Mark Brethen wrote:
>
>> Abiword used this solution:
>>
>> distname AbiWord-${version}-10.2
>> extract.suffix .dmg.gz
>> extract.post_args > ${workpath}/${distname}.dmg
>>
>> but I seven files, all .ps.gz, will this work with distfiles instead?
No, since it specifies the name of the file to write the output to.
> This works, avoids overriding extract, but is less direct:
>
> extract.cmd cp
> extract.pre_args
> extract.post_args ${workpath}/.
>
> destroot {
> xinstall -d ${destroot}${prefix}/share/doc/${name}
> foreach f ${distfiles} {
> set stem [file rootname [file tail ${f}]]
> system -W ${workpath} "gunzip -c ${f} > ${destroot}${prefix}/share/doc/${name}/${stem}"
> }
> }
At that point, you may as well skip the extract part entirely by setting "extract.only", and ungzipping each file in destroot directly from its location in distpath. That would save the time of copying the gzipped files.
More information about the macports-dev
mailing list