<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 4, 2015 at 7:51 PM, <span dir="ltr"><<a href="mailto:robert_joslyn@selinc.com" target="_blank">robert_joslyn@selinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Is it possible to configure Snapcraft to conduct an autotools build in a<br>
subdirectory of a cloned repository? The repository I'm cloning has the<br>
source in a src subdirectory, which is where the autogen/configure/make<br>
process needs to happen. If I manually repackage the source as a tarball<br>
without a subdirectory, everything works great. I looked at the Snapcraft<br>
code, and I didn't see anything that looked like this is an option. Seems<br>
like there could be a "source-directory" or similar option to go alongside<br>
source, source-type, source-branch, and source-tag.<br></blockquote><div><br></div><div>It is not there today, but the RFC about sources I sent to this list earlier today was also meant to solve this particular issue and avoid introducing another toplevel (to the part), source-[key] and have it live in its own yaml object.<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I can work around this by writing a build script to manipulate the sources<br>
and call snappy build directly, but I'd rather have snapcraft do this for<br>
me than maintain another build script :-)<br></blockquote><div><br></div><div>This is certainly not possible today, but I planned on working on this tomorrow.<br><br></div><div>For now I suggest (just for now) doing<br><br></div><div> mkdir parts/plugins<br></div><div> cp /usr/lib/python3/dist-packages/snapcraft/plugins/autotools.py parts/plugins/x-autotools.py<br></div><div> [edit cwd in the build parts]<br></div><div> snapcraft away<br><br></div><div>This should get you by until we either introduce<br><br></div><div>source-subdirectory|source-directory|source-subdir (not sure on the name yet)<br><br></div><div>Or the source object<br><br></div><div>source:<br></div><div> type: <type><br> repo: <repo><br></div><div> subdir: <dir> # also not settled on this name<br><br></div><div>0.5 will have this and it is not far away. We are aiming at releasing regularly, especially when there's an unblocking feature on the way.<br><br></div><div>Cheers<br></div><div>Sergio<br></div></div></div></div>