building rpm-package of gigi fails
Moderator: Oberlus
-
- Space Floater
- Posts: 34
- Joined: Wed Mar 12, 2008 9:00 am
- Location: Horb, Germany
building rpm-package of gigi fails
Hi,
I'm trying to use an RPM of freeorion for Mandrivalinux but I have some problems with gigi.
The compilation of gigi does work flawlessly after some initial problems due to some mistakes I made in my spec-File.
But the "scons install"-step doesn't work.
The problem is, that rpmbuild does install the files into the rpm-buildroot, not the real /-directory. Using the autotools you have the possibility to do that using "make DESTDIR=%{buildroot} install". This doesn't work with scons.
Does anyone have an idea?
Oliver
I'm trying to use an RPM of freeorion for Mandrivalinux but I have some problems with gigi.
The compilation of gigi does work flawlessly after some initial problems due to some mistakes I made in my spec-File.
But the "scons install"-step doesn't work.
The problem is, that rpmbuild does install the files into the rpm-buildroot, not the real /-directory. Using the autotools you have the possibility to do that using "make DESTDIR=%{buildroot} install". This doesn't work with scons.
Does anyone have an idea?
Oliver
Re: building rpm-package of gigi fails
It would be better to statically link GiGi instead of delivering them with the rpm. GiGi can easyly be built with "scons configure dynamic=no", but building freeorion with GiGi linked statically is not that easy.
Maybe you can take a look at the scripts I use for generating a statically linked version here:
http://psitronic.de/div/FO/
Have a look at link.sh and GG/build.sh
If you manage to get FreeOrion linked statically, then creating an rpm is not that difficult any more.
Maybe you can take a look at the scripts I use for generating a statically linked version here:
http://psitronic.de/div/FO/
Have a look at link.sh and GG/build.sh
If you manage to get FreeOrion linked statically, then creating an rpm is not that difficult any more.
- loonycyborg
- Compilation Expert
- Posts: 219
- Joined: Thu Jul 06, 2006 10:30 pm
- Location: Russia/Moscow
Re: building rpm-package of gigi fails
"scons prefix=%{buildroot} install". Why doesn't it work?obgr_seneca wrote:"make DESTDIR=%{buildroot} install". This doesn't work with scons.
In Soviet Russia, forum posts YOU!!
-
- Space Floater
- Posts: 34
- Joined: Wed Mar 12, 2008 9:00 am
- Location: Horb, Germany
Re: building rpm-package of gigi fails
It's not, what I want to do, I have a prefix set, it's /usr, where the files shell be installed to, when the package is installed.loonycyborg wrote:"scons prefix=%{buildroot} install". Why doesn't it work?
During the creation of an rpm-package, the system has to install the packages into a fake root-Filesystem, the so called RPM_BUILD_ROOT.
So you have to do two differnt things, tell scons, where the files will go, when the package is installed, that is in my rpm-spec-File a line
Code: Select all
scons configure prefix=/usr
Using autotools that's
Code: Select all
./configure --prefix=/usr
...
make DESTDIR=%{buildroot} install
Oliver
- loonycyborg
- Compilation Expert
- Posts: 219
- Joined: Thu Jul 06, 2006 10:30 pm
- Location: Russia/Moscow
Re: building rpm-package of gigi fails
I'm not sure that "prefix" is used for anything other than specifying the location of the dir "install" copies files to, so try using "prefix" as "DESTDIR".obgr_seneca wrote:tell scons, where the files will go, when the package is installed.
In Soviet Russia, forum posts YOU!!
-
- Space Floater
- Posts: 34
- Joined: Wed Mar 12, 2008 9:00 am
- Location: Horb, Germany
Re: building rpm-package of gigi fails
I already tried, most things work now, but there are still problems witch some pkgconfig-Files, scons tries to write directly to /usr...
Oliver
Oliver
- loonycyborg
- Compilation Expert
- Posts: 219
- Joined: Thu Jul 06, 2006 10:30 pm
- Location: Russia/Moscow
Re: building rpm-package of gigi fails
There's an option to specify directory where to install .pc files:
scons prefix=%{buildroot} pkgconfigdir=%{buildroot}/lib/pkgconfig
scons prefix=%{buildroot} pkgconfigdir=%{buildroot}/lib/pkgconfig
In Soviet Russia, forum posts YOU!!
-
- Space Floater
- Posts: 34
- Joined: Wed Mar 12, 2008 9:00 am
- Location: Horb, Germany
Re: building rpm-package of gigi fails
I have to try that.
The question is, if the given prefix doesn't get compiled in some kind of path...
But I have found a workarround, I did install gigi into an empty directory using this as prefix, then I looked which files where copied by "scons install".
In my spec-file I wrote a bunch of copy-commands and didn't use "scons install" at all...
Momentarily I'm building freeorion using the gigi-version I installed using that workarround.
Let's see!
Oliver
The question is, if the given prefix doesn't get compiled in some kind of path...
But I have found a workarround, I did install gigi into an empty directory using this as prefix, then I looked which files where copied by "scons install".
In my spec-file I wrote a bunch of copy-commands and didn't use "scons install" at all...
Momentarily I'm building freeorion using the gigi-version I installed using that workarround.
Let's see!
Oliver
-
- Space Floater
- Posts: 34
- Joined: Wed Mar 12, 2008 9:00 am
- Location: Horb, Germany
Re: building rpm-package of gigi fails
It's done, I have RPM-packages of gigi and of freeorion, In the next few days I will load them into our repositories at mandrivauser.de.
This may take some time since my internet-connection is a bit unstable...
I will tell you, when I'm ready...
Oliver
This may take some time since my internet-connection is a bit unstable...
I will tell you, when I'm ready...
Oliver