FreeOrion

Forums for the FreeOrion project
It is currently Sat May 18, 2013 10:10 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: building rpm-package of gigi fails
PostPosted: Wed Mar 12, 2008 9:09 am 
Offline
Space Floater

Joined: Wed Mar 12, 2008 9:00 am
Posts: 34
Location: Horb, Germany
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


Top
 Profile  
 
 Post subject: Re: building rpm-package of gigi fails
PostPosted: Wed Mar 12, 2008 10:55 am 
Offline
Static Linker
User avatar

Joined: Thu Jun 28, 2007 10:28 am
Posts: 347
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.


Top
 Profile  
 
 Post subject: Re: building rpm-package of gigi fails
PostPosted: Wed Mar 12, 2008 11:10 am 
Offline
Compilation Expert
User avatar

Joined: Thu Jul 06, 2006 10:30 pm
Posts: 219
Location: Russia/Moscow
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!!


Top
 Profile  
 
 Post subject: Re: building rpm-package of gigi fails
PostPosted: Wed Mar 12, 2008 12:20 pm 
Offline
Space Floater

Joined: Wed Mar 12, 2008 9:00 am
Posts: 34
Location: Horb, Germany
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:
scons configure prefix=/usr

and then telling the installation-routine, where the fake root-Directory is.
Using autotools that's
Code:
./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


Top
 Profile  
 
 Post subject: Re: building rpm-package of gigi fails
PostPosted: Wed Mar 12, 2008 12:42 pm 
Offline
Compilation Expert
User avatar

Joined: Thu Jul 06, 2006 10:30 pm
Posts: 219
Location: Russia/Moscow
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!!


Top
 Profile  
 
 Post subject: Re: building rpm-package of gigi fails
PostPosted: Wed Mar 12, 2008 12:45 pm 
Offline
Space Floater

Joined: Wed Mar 12, 2008 9:00 am
Posts: 34
Location: Horb, Germany
I already tried, most things work now, but there are still problems witch some pkgconfig-Files, scons tries to write directly to /usr...

Oliver


Top
 Profile  
 
 Post subject: Re: building rpm-package of gigi fails
PostPosted: Wed Mar 12, 2008 1:49 pm 
Offline
Compilation Expert
User avatar

Joined: Thu Jul 06, 2006 10:30 pm
Posts: 219
Location: Russia/Moscow
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!!


Top
 Profile  
 
 Post subject: Re: building rpm-package of gigi fails
PostPosted: Wed Mar 12, 2008 6:37 pm 
Offline
Space Floater

Joined: Wed Mar 12, 2008 9:00 am
Posts: 34
Location: Horb, Germany
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


Top
 Profile  
 
 Post subject: Re: building rpm-package of gigi fails
PostPosted: Wed Mar 12, 2008 6:53 pm 
Offline
Space Floater

Joined: Wed Mar 12, 2008 9:00 am
Posts: 34
Location: Horb, Germany
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group