LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-17-2007, 07:40 AM   #1
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Rep: Reputation: 30
writing spec file


hi all

how to write $HOME in spec file...
i would like to install the files in $HOME/one

can you please help me

thank you inadvance
 
Old 08-17-2007, 12:45 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Two ways, IMHO:

I. 'install /some/file /home/one' and hardcode the location (%files) of the file. This RPM should then *never* be distributed because it isn't compliant.

II. Or you could make it a post-install section shellscript in which you figure out if there is a /home and if there is a user one, and then install the files. You see, installs do not install files in ~/ (OK, with RPM you can --relocate). The general idea is the installation provides central resource or configuration files in /etc or /usr/local/etc (or whatever else location the FSSTND, LSB or FHS mandates) and a user can copy those files to ~/ for customisation. It is then the application's choice to source files or read configuration files in a certain order and in certain locations.
 
Old 08-18-2007, 04:42 AM   #3
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by unSpawn View Post
Two ways, IMHO:

I. 'install /some/file /home/one' and hardcode the location (%files) of the file. This RPM should then *never* be distributed because it isn't compliant.

II. Or you could make it a post-install section shellscript in which you figure out if there is a /home and if there is a user one, and then install the files. You see, installs do not install files in ~/ (OK, with RPM you can --relocate). The general idea is the installation provides central resource or configuration files in /etc or /usr/local/etc (or whatever else location the FSSTND, LSB or FHS mandates) and a user can copy those files to ~/ for customisation. It is then the application's choice to source files or read configuration files in a certain order and in certain locations.
i tried this but it fails
Code:
Summary: GNU munna
Name: munna
Version: Beta
Release: FC7
Source0: %{name}-%{version}.tar.gz
License: GPL
Group  : Utilities/System
URL    : http://munna.com/
Packager: {%Packager}
%description
The GNU indent program reformats C code to any of a variety of
formatting standards, or you can define your own.
%prep
%setup -q
%build
make
%install
%clean
rm -rf %{buildroot}
%files 
$HOME/one/munna
rpmbuild -ba munna-Beta.spec

can you please rewrite this code

please help me

thank you in advance
 
Old 08-18-2007, 05:17 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
i tried this but it fails
Please don't talk *about* errors but post exact output.
 
  


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
How to extract spec file from rpm file nayankk Programming 18 11-12-2015 02:11 PM
changing the content of file in spec file dsubbarao Linux - Newbie 7 01-30-2007 06:41 AM
writing spec file for RPM to move files Help Me Linux - Newbie 2 05-08-2006 12:58 PM
questions on writing own rpm .spec file adrianmak Linux - Software 0 08-18-2005 06:03 AM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 10:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:44 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