the build scriptlet doesn't take into account the source-subdir
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
I have a source in a subdir, and want to build and install it using scriptlets. Even if I declare the source-subdir tag, the scriptlets will run from the build dir. I think it would make more sense to run the scriptlets from the subdir instead.
Take a look at this part:
freeimage:
source: http://golem.network/FreeImage.zip
source-subdir: FreeImage
plugin: nil
build-packages: [g++]
build: |
cd FreeImage
make -j$(SNAPCRAFT_PARALLEL_BUILD_COUNT)
install: |
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/lib/
cp FreeImage/Dist/* $SNAPCRAFT_PART_INSTALL/usr/lib/
ln -s $SNAPCRAFT_PART_INSTALL/usr/lib/libfreeimage*.so $SNAPCRAFT_PART_INSTALL/usr/lib/libfreeimage.so
The subdir is FreeImage, and I still had to cd FreeImage during build, and during install I had to cp FreeImage/...
If we agree that the scriptlets should run from the subdir, a fix here is a little delicate because it will break the parts with subdir and scriptlets.
Evaluation history
No evaluation history available.