You are not logged in.
I'm building a local python package. I've copied a PKGBUILD from an existing python package. That PKGBUILD expects a .tar.gz in the same directory as PKGBUILD. In my project, the .tar.gz produced by python-build is in dist/, so I modify the PKGBUILD to refer to dist/file.tar.gz. But makepkg reports "Retrieving sources... ERROR: file.tar.gz was not found in the build directory and is not a URL". I've added some debugging messages in prepare() but they are not printed. How to make makepkg use sources in other directory? Also how to see the messages in the PKGBUILD script? Thanks very much!
source=("${srcdir}/dist/${_realname}-${pkgver}.tar.gz")
noextract=("${srcdir}/dist/${_realname}-${pkgver}.tar.gz")
prepare() {
echo "prepare() echo ${srcdir}/dist/${_realname}-$pkgver.tar.gz"
msg "prepare() msg ${srcdir}/dist/${_realname}-$pkgver.tar.gz"
[[ -d ${_realname}-${pkgver} ]] && rm -rf ${_realname}-${pkgver}
tar zxf "${srcdir}/dist/${_realname}-$pkgver.tar.gz"
}
Last edited by wlsdx (2024-10-23 01:59:31)
Offline
Because ${srcdir} isn't where you think it is. You want ${startdir}, but that's deprecated and shouldn't generally be used, but for a local-only PKGBUILD, whatever.
Offline
Why would you make a tarball locally to only untar it again locally to then use the contents of it?
Just write your PKGBUILD to use the original content.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline