Hi Phil et al,
My company has a requirement that all tools used in our services be built from source. The built artifacts are then bundled with the application, a top-level bin is created, and each executable is symlinked from its install directory to a file in the top-level bin.
In standard make, I can use
./configure --prefix=$INSTALL_DIR
to accomplish this.
I found with the perl make setup, I am able to do
make DESTDIR="$INSTALL_DIR" install
but it still installs everything under
$INSTALL_DIR/usr/local/
instead of just
$INSTALL_DIR
Further, when I try to run the final symlinked bin, I get an error message like the following:
Can't locate Image/ExifTool.pm in @INC (@INC contains: $INSTALL_DIR/bin/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./exiftool line 41.
From reading the generated Makefile, I see
SITEPREFIX = /usr/local
VENDORPREFIX = /usr
INSTALLPRIVLIB = /usr/share/perl5
DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
INSTALLSITELIB = /usr/local/share/perl5
DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
So it does seem like it would be possible to modify something to change the install paths, but I'm not sure what I would change (and whether I would need to hand edit the Makefile or if I can change the Makefile.PL).
I know it might be out-of-scope, but I was wondering if you had any guidance on how I can make and install exiftool from source to an arbitrary directory, symlink to the final install, and still locate required files properly on execution.
Thanks
Ok, I'm now realizing it might be entirely unnecessary to make at all, it looks like I can run ./exiftool directly from source. Let me investigate and update here.
Yes. No build is necessary.