LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-12-2004, 10:47 PM   #1
raqueeb
LQ Newbie
 
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
RPM: Copying files to desired loc using %install directive


Hello there!

I'm little confused about the rpm's spec file. I was trying to create
a rpm where I just need to copy some files to desired directories and
edit some existing system configuration files. So I thougth of not
making any Makefile cause I'll copy the required files from source tar
ball file as placed in default /usr/src/redhat/SOURCES directory and
modify few existing files from %install directive in spec file placed
in default SPECS directory.

Sample to do list:

1. Please create a directory "/usr/X11R6/lib/X11/fonts/bangla" and
copy the font files in that directory.

2. Copy the file "bn_BD" in "/usr/share/i18n/locales/" directory.

<snip>
10. Now you need to edit a file to indicate the fonts path. Edit the
file "/etc/fonts/fonts.conf" and add line(s) as section below that.
<dir>/usr/X11R6/lib/X11/fonts/bangla</dir>

Now, when I used RUST (rusthq.com), it generated a spec file for
me.

--------
%install

$MKDIR -p $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/bangla
$MKDIR -p $RPM_BUILD_ROOT/usr/share/i18n/locales

$CP ./usr/X11R6/lib/X11/fonts/bangla/muktibold.ttf $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/bangla/muktibold.ttf
$CP ./usr/share/i18n/locales/bn_BD $RPM_BUILD_ROOT/usr/share/i18n/locales/bn_BD
--------

Now, why is it creating directories and copying files in
$RPM_BUILD_ROOT which I've assigned in /tmp dir? Is it not enough that
I copy those files using these lines ....?

cp -f ./font/*.* /usr/X11R6/lib/X11/fonts/bangla/
cp -f bn_BD /usr/share/i18n/locales/

I thought that if I include the files list in %files directive it
should copy those automatically to desired location, shouldn't it?

%files
/usr/X11R6/lib/X11/fonts/bangla/muktibold.ttf
/usr/share/i18n/locales/bn_BD

How do I copy executable files to all home directories using shell
script, please?

I read both redhat rpm guide and maximum rpm, but they mostly dealt
with Makefile. Thanks for your time.

Thanks in advance.

Raqueeb Hassan
Democratic Republic of Congo
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Freeze while copying files - FC3 Install arosiqueh Fedora - Installation 3 01-21-2005 05:26 PM
How to install rpm files pepejeria Linux - Newbie 7 09-14-2004 11:01 AM
Strange Problem: Install freezes on format of HDB7 or copying files to HDB7 cowboy45 Mandriva 0 08-18-2004 11:26 PM
How do you install tar/gz files, and rpm files? Fear58 Linux - Software 6 02-14-2004 04:35 PM
MDK 9.2. install hangs when copying files pumpuli Linux - Newbie 0 12-23-2003 12:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration