If the archive filename ends with .zip, use unzip rather than tar to test and extract.
.zip
unzip
tar
$ opam2rpm camlzip Archive: /home/michel/.cache/opam2rpm/src/camlzip-rel110.zip 61b7f60b29d6a432b303b978a95e9262f27a969e creating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/ inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/.depend inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/.gitignore inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/Changes inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/LICENSE extracting: /home/michel/.cache/opam2rpm/src/camlzip-rel110/META-camlzip inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/META-zip inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/Makefile inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/README inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/gzip.ml inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/gzip.mli creating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/test/ inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/test/Makefile inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/test/minigzip.ml inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/test/minizip.ml inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/test/testzlib.ml inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/zip.ml inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/zip.mli inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/zlib.ml inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/zlib.mli inflating: /home/michel/.cache/opam2rpm/src/camlzip-rel110/zlibstubs.c Upstream license tag LGPL-2.1-or-later translated to LGPLv2+
Fixes #5.
Signed-off-by: Michel Alexandre Salim salimma@fedoraproject.org
Thank you very much for the patch!
Pull-Request has been merged by jjames
If the archive filename ends with
.zip, useunziprather thantarto test and extract.Fixes #5.
Signed-off-by: Michel Alexandre Salim salimma@fedoraproject.org