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 :( |
Have you included the prefix in the Makefile install section?
RPM will just pass the prefix on to your install script, usually make. |
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. |
All times are GMT -5. The time now is 07:17 AM. |