openSUSE Forums > openSUSE Build Service (OBS) » Building conflicting sub-packages

Go Back   openSUSE Forums > openSUSE Build Service (OBS)
Forums FAQ Members List Search Today's Posts Mark Forums Read


openSUSE Build Service (OBS) Questions about creating packages for openSUSE and using the Build Service

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 25-Jul-2009, 08:02
Puzzled Penguin
 
Join Date: Jul 2009
Posts: 2
Gnurou hasn't been rated much yet
Default Building conflicting sub-packages

Hello everybody,

This may be more a RPM-related question, but I don't know of any valid place where to ask this...

I'm trying to build a set of RPM packages from a single source tree (and therefore a single spec file), for a dictionary application. The main RPM would contain the binary, and the subpackages the dictionaries generated for different languages. In order to use the application, the user must install the binary + one of the dictionary packages corresponding to his preferred language.

The problem is that these dictionary subpackages all refer to a file which name is the same, but which content is different. After hours of searching, I have not found any way to allow this. The desired effect can be obtained with dpkg since it is possible to specify a given file and give it a different name, but I have not figured out how to do the same with RPM. To be more explicit, say I have 3 different dictionary files:

dict-en.db
dict-fr.db
dict-de.db

and what I need to obtain, is 3 different sub-packages (dict-en.rpm, dict-fr.rpm and dict-de.rpm) where the corresponding dictionary file gets installed into /usr/share/myapp/dict.db. Of course, the three packages would be conflicting since they refer to the same file in the filesystem.

Is there an easy way to obtain that? If so, could someone give me a hint or two about how to do it?

Thanks,
Alex.
Reply With Quote
  #2 (permalink)  
Old 12-Aug-2009, 14:02
etamPL's Avatar
Puzzled Penguin
 
Join Date: Dec 2008
Location: Warsaw, Poland
Posts: 41
etamPL hasn't been rated much yet
Default Re: Building conflicting sub-packages

My idea:
The package dict-en contains a file /usr/share/myapp/dict-en.db and a postinstall script
Code:
%post
ln -sf dict-en.db /usr/share/myapp/dict.db
__________________
OpenSuSE 11.2 x86_64; Gnome 2.28; Laptop Asus S96S: Intel T8300 2.40GHz; nVidia 8600m GS (256MB); 4GB RAM;

Save the buildpower. Use aggregation.
Reply With Quote
  #3 (permalink)  
Old 12-Aug-2009, 14:51
malcolmlewis's Avatar
Global Moderator
 
Join Date: Jun 2008
Location: Podunk
Posts: 4,689
malcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputation
Default Re: Building conflicting sub-packages

Quote:
Originally Posted by etamPL
My idea:
The package dict-en contains a file /usr/share/myapp/dict-en.db and a
postinstall script

Code:
--------------------
%post
ln -sf dict-en.db /usr/share/myapp/dict.db
--------------------
Hi
You can do that during the install with pushd/popd;
Code:
pushd %{buildroot}%{_datadir}/myapp
%{__ln_s} dict-en.db dict.db
popd
--
Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.25-0.1-default
up 7 days 23:22, 2 users, load average: 0.10, 0.06, 0.06
GPU GeForce 8600 GTS Silent - Driver Version: 190.18

Reply With Quote
  #4 (permalink)  
Old 12-Aug-2009, 22:45
Puzzled Penguin
 
Join Date: Jul 2009
Posts: 2
Gnurou hasn't been rated much yet
Default Re: Building conflicting sub-packages

Of course! Why didn't I think of that... Many thanks for the tip guys.
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2