mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
GNU tar can automatically detect the compression format based on the file name since at least 2006. So just use "tar xf" to extract all tarballs and drop the redundant cases. GNU tar can also strip the top level directory from the archive which allows us to extract it to the directory wanted by the build system ($PKG_NAME-$PKG_VERSION), so packages don't need to specify PKG_SOURCE_DIR if the top level dir from that and scripts/unpack doesn't need to rename the directory. If PKG_SOURCE_DIR is not set the top level dir is automatically stripped from the archive and extracted to $BUILD/$PKG_NAME-$PKG_VERSION If PKG_SOURCE_DIR is set, scripts/extract behaviour is unchanged. Signed-off-by: Matthias Reichl <hias@horus.com>