LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 11-28-2002, 10:43 AM   #1
hems
LQ Newbie
 
Registered: Nov 2002
Posts: 3

Rep: Reputation: 0
RPM prefix problem


Hi,

I have been using Redhat 8.0 which has RPM version 4.1. I am trying to build my own RPM package. My work does not involve any building/make. I just need to pack directories and tar files which inturn has binaries and libraries that is already prepared. I am able to create the package (%files) which includes the directories and tar files. But the problem that I am facing is, During installation I wanted to install the files in the location the user wishes to install. So I created the spec file with the "Prefix: %{defpref}" tag making it a relocatable package. When I try to install using "rpm -i --prefix=<newdir> <rpm>" it does not install in the <newdir>, but installs in the location of the file as it is in package ( ie. in %{defpref}) . I tried using --relocate as well, but it didn't work out. Can anyone tell me what I am missing here? and solve my problem. Do let me know in case the question asked is not clear.

Thanks,
Hema




 
Old 11-29-2002, 12:05 AM   #2
DaveG
Member
 
Registered: Nov 2001
Location: London, UK
Distribution: Fedora
Posts: 161

Rep: Reputation: 43
Have you included the prefix in the Makefile install section?
RPM will just pass the prefix on to your install script, usually make.
 
Old 11-29-2002, 03:39 AM   #3
hems
LQ Newbie
 
Registered: Nov 2002
Posts: 3

Original Poster
Rep: Reputation: 0
Hi DaveG,

As I have mentioned in my question, my spec file is just a simple one which has
1) the Preamble ( which has Prefix tag since I wanted to make it a relocatable package) and
2) the (%files) list of files/directories (my_dir) that is a part of the package.

$ cat mypack.spec
%define defpref /home/hema/test_pack
Summary: MYPACK on Linux
Name: Mypack
Version: 1.0
Release: 1
Copyright: GPL
Group: Applications
Prefix: %{defpref}
Distribution: Linux
Vendor:

%description
This is just used for checking how rpm works.......

%files
%{defpref}/my_dir


So here I have my binaries ready. I just need to package the binaries which are there in my_dir. R U able to trace out any problem from the spec file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
./configure --prefix= plan9 Slackware 5 01-03-2013 05:44 AM
Always -prefix=/usr? oneandoneis2 Linux From Scratch 5 07-28-2004 01:11 AM
Optimize/Prefix rogk Linux - Software 1 07-25-2004 06:04 AM
Sendmail prefix mikeyt_333 Linux - Software 0 07-17-2004 03:13 PM
prefix for rpm packages hfawzy Linux - Newbie 2 09-09-2002 04:42 PM


All times are GMT -5. The time now is 06:56 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration