building rpm-package of gigi fails

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

building rpm-package of gigi fails

#1 Post by obgr_seneca »

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

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: building rpm-package of gigi fails

#2 Post by kroddn »

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.

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: building rpm-package of gigi fails

#3 Post by loonycyborg »

obgr_seneca wrote:"make DESTDIR=%{buildroot} install". This doesn't work with scons.
"scons prefix=%{buildroot} install". Why doesn't it work?
In Soviet Russia, forum posts YOU!!

obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

Re: building rpm-package of gigi fails

#4 Post by obgr_seneca »

loonycyborg wrote:"scons prefix=%{buildroot} install". Why doesn't it work?
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.
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
and then telling the installation-routine, where the fake root-Directory is.
Using autotools that's

Code: Select all

./configure --prefix=/usr
...
make DESTDIR=%{buildroot} install
I think scons should have a similar possibility, as I read here that is not yet the case and has to be done in some kind of workarround.

Oliver

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: building rpm-package of gigi fails

#5 Post by loonycyborg »

obgr_seneca wrote:tell scons, where the files will go, when the package is installed.
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".
In Soviet Russia, forum posts YOU!!

obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

Re: building rpm-package of gigi fails

#6 Post by obgr_seneca »

I already tried, most things work now, but there are still problems witch some pkgconfig-Files, scons tries to write directly to /usr...

Oliver

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: building rpm-package of gigi fails

#7 Post by loonycyborg »

There's an option to specify directory where to install .pc files:
scons prefix=%{buildroot} pkgconfigdir=%{buildroot}/lib/pkgconfig
In Soviet Russia, forum posts YOU!!

obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

Re: building rpm-package of gigi fails

#8 Post by obgr_seneca »

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

obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

Re: building rpm-package of gigi fails

#9 Post by obgr_seneca »

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

Post Reply