The other day I tried installing opencv-git
from the AUR with makepkg
on Arch Linux. Of course it pulls from the git repository as the name indicates. This pulls 1Gb. I am reading about making a shallow clone with git
. When I look at the PKGBUILD
file, using grep git PKGBUILD
, I see:
pkgname="opencv-git"
makedepends=('git' 'cmake' 'python2-numpy' 'mesa' 'eigen2')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname%-git}::git+http://github.com/Itseez/opencv.git"
cd "${srcdir}/${pkgname%-git}"
git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
cd "${srcdir}/${pkgname%-git}"
cd "${srcdir}/${pkgname%-git}"
cd "${srcdir}/${pkgname%-git}"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
Is there a way to modify the recipe or the makepkg
command to pull only a shallow clone (the latest version of the source is what I want) and not the full repository to save space and bandwidth? Reading man 5 PKGBUILD
doesn't provide the insight I'm looking for. Also looked quickly through the makepkg
and pacman
manpages - can't seem to find how to do that.
git+http://github.com/Itseez/opencv.git
in the AUR recipe with a local pathname. Have you tried that? If this build system forces you to clone a repos even if it you have it available locally, then it is pretty freaking nutty.