You are not logged in.
Pages: 1
Let's say I have a simple git repository:
test/
test/.git
test/makefile
test/...
test/pacman/PKGBUILD
when I invoke makepkg inside test/pacman/ the repository will be cloned in test/pacman/test
I can either use
an ssh URL: source('git+ssh://git@example.org/test.git')
or a file URL: source('git+file://../.git')
I like the second solution better because it makes it possible to use the local repository and there is no need to download the same repository from the remote server.
Unfortunately it seems the file URL does not allow relative path so I get a message:
fatal: '/../.git' does not appear to be a git repository, a forward slash was added
Using an absolute path source('git+file://home/user/test/.git') will work but it is not a viable option
Any idea how I can get this to work?
Thank you
Last edited by jlefebure (2017-12-10 06:03:43)
Offline
Not tested but possibly
$ APATH=`realpath \`pwd\`/.. `
source=("git+file://APATH/.git")
edit:
spelling not instead of note
Last edited by loqs (2017-12-09 19:44:28)
Offline
Please edit your title to be something that at least somewhat represents your question.
As for the question: you've answered it already: use a full path for it to work.
But all in all, this sounds like a needlessly complex set up. What are you really trying to do? If the PKGBUILD is just for your own personal use, change around the directory structure:
test/PKGBUILD
test/src/test/.git
test/src/test/makefile
test/src/test/...
Then just cd into the top `test` directory and `makepkg -e`.
Last edited by Trilby (2017-12-09 19:49:06)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I read it as they are trying to do something similar to the practise some projects have of carrying debian / fedora / X build instructions around with them.
Offline
Thanks loqs for bringing to my attention bash support in makepkg, it helped solve my initial problem and also made it possible to match the branch
source=("test::git+file://$(pwd)/../.git#branch=$(git rev-parse --abbrev-ref HEAD)")
This can be marked as solved
Offline
This can be marked as solved
Go on then...
https://wiki.archlinux.org/index.php/Co … ow_to_post
Offline
Pages: 1