You are not logged in.
Pages: 1
Topic closed
A project I'm working on has a main executable along with a folder of functions that are called when the program runs.
I'm needing some way of copying the function folder to the `srcdir` folder so I can copy the files to the correct spots, but I haven't found any way to do so with the `source()` array.
My current way involves copying it from `srcdir/..` in `package()` (The PKGBUILD and function folder are at the same location), but it feels kind of hacky.
Does makepkg support what I'm wanting to do, in the `source()` array? If not, does it sound like something that would be accepted if I contributed the needed changes for it?
Last edited by hwittenborn (2021-05-30 21:53:57)
makedeb: create Debian archives from PKGBUILDs
Offline
AFAIK that is currently not supported.
But this sounds like you've got some source code repository and now want to ship a PKGBUILD together with it.
While that works fine for small/trivial repositories, PKGBUILDs are not really meant to be shipped alongside an upstream project (as opposed to what Debian's packaging system does with the `debian` directory), but rather be kept in a separate location/project/repository. That's also generally cleaner, as upstream and downstream are properly split.
That way, you can then specify the upstream repository as a whole in source() (e.g. with `git+https://someplace.domain/somerepo`, or whatever VCS you use), or if it is shipped as a tarball, reference that in source(), and the whole tree will be put into $srcdir by makepkg already.
Offline
That was part of my problem - I do a lot of builds locally, and I ideally wouldn't have to create a tar archive or anything similar every time I want to build.
Regardless though, your mentioning of git repositories got me to a solution, I just entered "git+file://${PWD}" into source() and everything worked fine. Thanks!
Last edited by hwittenborn (2021-05-30 19:02:25)
makedeb: create Debian archives from PKGBUILDs
Offline
Correct, this will not (by intention) work with many source files and we recommend using git repositories here using file:// clone urls.
Remember to point to something publicly available if you intend to upload it to the AUR though.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I have a trick for this case:
1. Go to the src dir and run `python -m http.server`
2. Change the location to `http://127.0.0.1:8000/${file_name}`
It should be simpler than "git+file".
Offline
Thanks for the suggestion. The original poster has been on the forums for several years I am going to go ahead and close this old topic.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Pages: 1
Topic closed