LinuxQuestions.org
Visit Jeremy's Blog.
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 02-19-2013, 12:54 AM   #1
kirthan
LQ Newbie
 
Registered: Feb 2013
Location: India
Posts: 3

Rep: Reputation: Disabled
How to create rpm package (.sh file to rpm package)


Hi
i have created backup.sh file , I want this to create as a rpm installation package .please help me out how to do this ?
 
Old 02-19-2013, 01:41 AM   #2
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 272
Blog Entries: 2

Rep: Reputation: 49
You are not clear enough.
Do you want to make a shell script which will install RPM package?
Same as you install it on terminal.
Code:
$ rpm -ivh file.rpm
Take a look here
 
Old 02-19-2013, 04:35 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
Setting up the rpm-build environment in /home/<name>/ :
# 13 http://www.linuxquestions.org/questi...1-a-766486/#13

Simplified build example :
$ mkdir -p rpms/BUILDROOT/script-1.0-1.i386/usr/bin/
.. and copy the script.sh to rpms/BUILDROOT/script-1.0-1.i386/usr/bin/

Write a "script.spec". This is my tested example :
Code:
Summary:   None
Name:      script
Version:   1.0
Release:   1
License:   GPL
Group:     None          
Packager:  Jerry Donut <jerry@donut.com>
BuildArchitectures: i386
BuildRoot: /home/knudfl/rpms/BUILDROOT/script-1.0-1.i386

%description
No description

%files
/usr/bin/script.sh
.. Then run $ rpmbuild -bb script.spec
.. And the rpm package 'script-1.0-1.i386.rpm' is created.

.

Last edited by knudfl; 02-19-2013 at 04:38 AM.
 
  


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
File conflict with the old installed rpm package while installing new package sr164w Linux - Newbie 3 12-15-2011 11:43 AM
You can create your own RPM package mike_rhce Linux - Certification 2 07-11-2011 02:35 PM
Need to create rpm package Mr.J Linux - Desktop 3 08-12-2009 05:30 AM
how to create .rpm package shalin Programming 1 07-13-2004 10:12 AM
how to create RPM Package shalin Programming 0 03-09-2004 11:04 PM


All times are GMT -5. The time now is 03:02 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration