[aur-general] How to deal with tarballs from GitHub

Felix Yan felixonmars at gmail.com
Thu Sep 12 02:43:04 EDT 2013


On Thursday, September 12, 2013 16:15:13 Phillip Smith wrote:
> Hi all,
> 
> When the source tarball is from a GitHub repository, part of the
> commit SHA1 forms the first level of the extracted directory tree.
> This leads to a non-deterministic tree in $srcdir
> 
> At the moment I deal with this by using noextract() and manually
> extracting the tarball within build() using --strip-components=1 which
> you can see in [1]. (Arguably it should perhaps happen in prepare()
> but that's a separate discussion).
> 
> Does anyone have any better ways to deal with these tarballs?
> 
> Cheers,
> ~p
> 
> [1] https://aur.archlinux.org/packages/ss/sshfp/PKGBUILD

You may use

https://github.com/xelerance/$pkgname/archive/$pkgver.tar.gz

instead, as this is now the default value of "tar.gz" links on github. This link wouldn't produce those unpredictable strings and you could just use

cd $pkgname-$pkgver

BTW, you could also use the VCS version like:

git+https://github.com/xelerance/$pkgname.git#tag=$pkgver

This would benefit those who keep the source :)

Regards,
Felix Yan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.archlinux.org/pipermail/aur-general/attachments/20130912/8f02991b/attachment-0001.asc>


More information about the aur-general mailing list