Results 1 to 1 of 1
Hi Everybody!
Am new to Linux Forum. I would like you people to help me out with this problem.
I'l brief up the scenario where I started on.
I want ...
- 03-23-2009 #1Just Joined!
- Join Date
- Mar 2009
- Location
- Bangalore
- Posts
- 2
Installation always goes in Root while installing binary rpm
Hi Everybody!
Am new to Linux Forum. I would like you people to help me out with this problem.
I'l brief up the scenario where I started on.
I want to create my own binary rpm, I created the directory structure and spec file. I have an already build and compiled libraries and binaries folder with me, my task is to put the libraries and binaries to correct location after installation say /tmp/abc. After creation of the rpm, and after firing the command
rpm -ivh packagename-version-norarch.rpm --nodeps
it is always installing under / directory.
Please help me !!
My spec file looks like this
%define _topdir /usr/src/redhat
%define _tmppath /tmp/abc
Summary : ABCDEFG
Name : ABCDEFG
Version : 1
Release : 1.1
License : GPL
Group : Applications/Systems
Source : %{_sourcedir}/%name-%version.tar.gz
BuildRoot : %{_tmppath}
BuildArch : noarch
ExclusiveArch : i386 i686
%description
This spec file gives a brief description of, how to package new rpms.
%prep
%setup -q
%install
rm -rf /tmp/abc/%{name}-%{version}*
%clean
rm -rf %buildroot/%{name}-%{version}
rm -rf %{_builddir}/%{name}-%{version}
%files
%defattr(-,root,root)
/%{name}-%{version}/*
-----------------------------------------------------------------------------------
Can you please make me understand what the install stanza is doing. how to specify the default location to go after installing the rpm using the -ivh command.


Reply With Quote