You are not logged in.
My project has a stale branch to store large files unused at build time, such as to binaries and screenshots. The source can be cloned manually using git clone <url> --single-branch. In the PKGBUILD however, adding a fragment (#branch=master) still download the whole repository. I read that the source may be pulled from the prepare() function instead, but found no examples. Is it possible to bypass the automated source download and pass custom arguments to git? If so, can anyone provide a working example?
My PKGBUILD file;
pkgname=primenote-git
pkgver=0
pkgrel=1
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
pkgdesc="Fanciest sticky note-taking application (now with Vim!)"
url="https://gitlab.com/william.belanger/${pkgname%-git}"
arch=("any")
license=("GPL3")
depends=("python" "python-setuptools" "python-pyqt5" "python-requests")
optdepends=("qtermwidget: support for console and Vim modes"
"vim: support for Vim mode")
source=("git+https://gitlab.com/william.belanger/${pkgname%-git}.git#branch=master")
md5sums=("SKIP")
pkgver()
{
cd "${pkgname%-git}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package()
{
cd "${pkgname%-git}"
python setup.py install --optimize="1" --root="$pkgdir"
}
Last edited by alfalfa (2021-12-03 01:54:19)
Offline
All you do is remove the git entry from the source line, then use whatever git command you want in prepare().
Offline
I tried to, but removing source gives
==> ERROR: Integrity checks (md5) differ in size from the source array.
and putting an empty string gives
==> ERROR: was not found in the build directory and is not a URL.
Offline
pkgname=NAME
pkgver=VERSION
pkgrel=1
pkgdesc=""
arch=('any')
url=""
license=('GPL')
makedepends=('git')
prepare() {
git clone https://github.com/archlinux/svntogit-packages.git --single-branch --branch "packages/pacman" pacman
}
Offline
It works with makedepends. Thank you.
pkgver=r494.36db029
pkgrel=1
pkgname=primenote-git
pkgdesc="Fanciest sticky note-taking application (now with Vim!)"
arch=("any")
url="https://gitlab.com/william.belanger/${pkgname%-git}"
license=("GPL3")
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
makedepends=("git")
depends=("python" "python-setuptools" "python-pyqt5" "python-requests")
optdepends=("qtermwidget: support for console and Vim modes"
"vim: support for Vim mode")
pkgver()
{
cd "${pkgname%-git}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
git clone https://gitlab.com/william.belanger/${pkgname%-git}.git --single-branch
}
package()
{
cd "${pkgname%-git}"
python setup.py install --optimize="1" --root="$pkgdir"
}
Offline