Easy delivery and installation of a project helps massively with user acceptance. Take a look at all the app stores and user friendly package managers. For quite some of our Linux specific projects we build RPM-Packages using a build farm and the Jenkins continuous integration (CI) server. Sometimes we have to package dependencies which are not available for the used distributions. Some days ago we packaged some projects that were using the SCons build system. Using SCons is quite simple but there is one caveat to make it work nicely with rpmbuild
: You have to fiddle with the installation prefixes. Let’s have a look at the build
and install
stanza of the SPEC
-file:
# build stanza %build scons PREFIX=/usr LIBDIR=%_libdir all # install stanza %install rm -rf $RPM_BUILD_ROOT scons PREFIX=/usr LIBDIR=%_libdir install --install-sandbox="$RPM_BUILD_ROOT"
The two crucial parts here are:
- Setting the correct prefixes in build and install because the build could use configured paths which have to match the situation of the installed result
- The
--install-sandbox
command line switch which tells SCons to install everything under the specified location instead of directly to the system. This allows rpmbuild to put the artifacts into the package using the correct layout.
Using the above advice it should be quite easy to build nicely working RPM packages out of projects using SCons.
SCons is a bitch in so many ways, with Debian even discouraging use of it. I guess you packaged Eugen’s NeXus stuff?
Yes, it was libpniutils and libpninx (http://sourceforge.net/projects/libpninx/) because one of the students uses it for FUSE integration of NeXus.