Re: [Gambas-devel] problems while installing gambas into a buildroot (needed for packaging)
Brought to you by:
gambas
From: Rob <sou...@ku...> - 2003-12-23 20:01:23
|
On Tuesday 23 December 2003 13:53, Benoit Minisini wrote: > Could you explain me what is a "buildroot" ? I never heard > about the $DESTIR variable before, and I don't understand it, > because every variables like $(bindir), $(datadir), or > $(libdir) are already absolute paths given by the prefix > option of the configure script. Why adding something before an > absolute path ? You need to prefix your absolute install paths with a buildroot when building packages, because it's typically not done as root and therefore the user doesn't have access to install the files to their final destinations. However, having packaged Gambas for almost a year now, I have simply replaced "make install" with the following in my specfiles: export PATH=${RPM_BUILD_ROOT}/usr/bin:$PWD/src/comp:$PATH install -d ${RPM_BUILD_ROOT}/usr/bin/ install -d ${RPM_BUILD_ROOT}/usr/share/doc/%{name}-%{version} install -d ${RPM_BUILD_ROOT}/usr/include/ install -d ${RPM_BUILD_ROOT}/usr/include/%{name} install -d ${RPM_BUILD_ROOT}%appdir/ install -d ${RPM_BUILD_ROOT}%appdir/lib/ install -s -m 0755 src/exec/gbx ${RPM_BUILD_ROOT}/usr/bin/ install -s -m 0755 src/comp/gba ${RPM_BUILD_ROOT}/usr/bin/ install -s -m 0755 src/comp/gbi ${RPM_BUILD_ROOT}/usr/bin/ install -s -m 0755 src/comp/gbc ${RPM_BUILD_ROOT}/usr/bin/ find src -name *.la -exec cp {} ${RPM_BUILD_ROOT}%appdir/lib \; find src -name *.so* -exec cp -a {} ${RPM_BUILD_ROOT}%appdir/lib \; cp -a src/share/gambas.h ${RPM_BUILD_ROOT}/usr/include/%{name} find ${RPM_BUILD_ROOT} -size 0 -exec rm -f {} \; (someone else said:) > > Cannot read symbolic link /usr/bin/gbx > > Is there maybe a solution for this problem so i can also > > build the library info files within a buildroot? My solution to this problem was adding the following to the install script: tar cjvf ${RPM_BUILD_ROOT}%appdir/gambas-gui-%{version}.tar.bz2 app/ `find src/ -name *.component` and making gambas-gui a separate package dependent on gambas, gambas-lib, and gambas-help. However, I also have a ln -s /usr/lib/gambas-(version)/bin/gbx-real /usr/bin/gbx Granted that neither of these would be necessary if make install worked the "usual" way, but things are always tricky when you're writing part of an app in itself ;) Rob |