← Back to issue list

the build scriptlet doesn't take into account the source-subdir

View original Launchpad issue

Metadata

Project
snapcraft
Number
#1676186
Type
issue
State
open
Author
~elopio
Labels
scripts sources
Created
2017-03-26 16:02:24.360030+00:00
Updated
2023-12-06 15:33:09.980423+00:00
Closed

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.