speedata / publisher

speedata Publisher - a professional database Publishing system

Home Page:https://www.speedata.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No install target and build assumes isolated directory structure

alerque opened this issue · comments

The Rakefile used to build this makes some assumptions about file system layout including hard coding the paths of the internal project as the runtime location for assets. This makes it un-necessarily difficult to install from source and package for distributions. As a fix the expected runtime location of libraries, assets, etc. should be configurable at build time and an installation target included that copies the generated assets to those locations (relative to whatever the rake equivalent of DISTDIR is).

Do you have an example of such an build file? I have several assets that need to be packed and I guess this is much dependent on the distribution which files go where (shared object files, fonts, images, Java files). Should each of these directories be configurable?

I have only experience with the .deb package format, nothing else, so I'd be happy to get any help from people with experience with package managers.

Currently most of the "dist" part is in sphelper.go.

I'd like to raise a question:

How detailled should the configuration be?

I currently have a directory bin for the executables, sw for the source code but also some optional fonts/images and share for other third party / optional stuff (but also contains necessary libraries). I know this is a mess, but currently the way it is. I assume it would be fine to be able to control the destination directories for these three directories, right?

I will add a build target which accepts these environment variables:

SP_BUILDDIR_SW
SP_BUILDDIR_SHARE
SP_BUILDDIR_BIN
SP_DESTDIR_SW
SP_DESTDIR_SHARE
SP_DESTDIR_BIN

for setting the directories for build time and run time. If this needs some changes, I'd be happy to integrate them.

Working from memory ... I messed with this a week or so ago and started trying to setup a build/install that would put things in recognizable places. I didn't get anything working yet, but yes what you commented on sounds roughly right from what I saw.

For Arch Linux at least and many distros that follow FHS, your sw doesn't make a lot of sense. Basically everything in there would belong in /usr/share/speedata/.... and some of what you have in share would actually belong in a lib directory like /usr/lib/ (the so files at least; the schema stuff and possibly jar files would be more of a share thing).

And yes of course a bin location for sp. The sdluatex binary could probably be put there too, although it's possible to put supporting binaries that aren't meant to be called directly in share too. I think some distros use libexec for this, but Arch does not.

The binaries sdluatex and sp are now in the bin directory.

The Rake file has a blueprint for using the new custom dist command:

task :distcustom => [:sphelper] do

If this is not useful, please feel free to re-open the issue! Thank you very much for your advice so far.

I know that sw/ and share/ and lib/ are a mess, and one day I will clean this up.