Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 04-08-2007, 10:26 PM   #1
Registered: Dec 2004
Location: malaysia
Posts: 56

Rep: Reputation: 15
Question Situation/condition in spec file for RPM

I 'm trying to build my own rpm. In the spec file, can we state a condition like if/else.For example, if the installation find some files. it will stop the installation.

if(Found some file)

continue the installation

it is possible to do that ??
Old 04-09-2007, 02:46 AM   #2
Registered: Mar 2004
Location: Sydney
Distribution: Bodhi 3.0
Posts: 88

Rep: Reputation: 15
You should be able to add any shell commands to the specfile. The rpmbuild script will run any shell commands you put in there, including your if/else statement.
Old 04-12-2007, 12:06 AM   #3
Registered: Dec 2004
Location: malaysia
Posts: 56

Original Poster
Rep: Reputation: 15

the "if/else" is not shell is right?? ..i'm very confuse
can you give me simple example or point me a right tutorial about this??


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
rpm spec file alrawab Linux - General 2 03-28-2007 06:39 AM
RPM Spec file adddy Linux - Software 8 11-07-2006 05:02 AM
questions on writing own rpm .spec file adrianmak Linux - Software 0 08-18-2005 06:03 AM
%file attribute for RPM SPEC files Brian of Gep Linux - Software 3 06-18-2004 04:51 AM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 10:36 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:27 PM.

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