LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-06-2006, 04:58 AM   #1
adddy
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Rep: Reputation: 0
RPM Spec file


--------------------------------------------------------------------------------

I have made a RPM package for a software the spec file is

Summary: Roamware VSMS
Name: RWARVSMS
Version: 6.0
Release: R60805
Copyright: Roamware Inc. Cupertino, USA.
Group: Application
Source: RWARVSMS-6.0.tar.gz
Vendor : Roamware Inc.

%description
It contains binary, cfg, shared libraries, prompts and application specific cron, operations, troubleshooting scripts.

%prep

%setup -q

%install
mkdir -p /opt/Roamware
cp -dRf * /opt/Roamware

%post
#find /opt/Roamware/ -name "*" -exec touch {} \;
cd /opt/Roamware/scripts/
find . -name "*.sh" -exec chmod +x {} \;
find . -name "*.pl" -exec chmod +x {} \;
cd /opt/Roamware/binaries/vsms/bin
find . -name "*" -exec chmod +x {} \;
chown -R roamware /opt/Roamware
chgrp -R roamware /opt/Roamware

%clean
rm -rf

%files

%defattr(-,root,root)

%doc
/opt/Roamware/binaries/vsms/config/vsms.cfg
/opt/Roamware/binaries/vsms/bin/VSMS
/opt/Roamware/logs/vsms/cdr/offline/
/opt/Roamware/libs/libasn1ber.so
/opt/Roamware/libs/libasn1rt.so
/opt/Roamware/libs/libasn1rt.so
/opt/Roamware/scripts/operations/vsms/vsmsperl.ini
/opt/Roamware/scripts/operations/vsms/vsmsperl.pl
/opt/Roamware/scripts/operations/vsms/StartVSMS.sh
/opt/Roamware/scripts/operations/vsms/vsmsperl_demo.pl
/opt/Roamware/scripts/operations/vsms/StopVSMS.sh
/opt/Roamware/scripts/operations/vsms/VSMS.sh
/opt/Roamware/scripts/operations/vsms/AppMonitor.ini
/opt/Roamware/scripts/troubleshooting/vsms/VSMS.ini
/opt/Roamware/scripts/cron/vsms/PurgeUtil.pl
/opt/Roamware/scripts/cron/vsms/PurgeUtil.ini
/opt/Roamware/scripts/perl-pm/vsms/RFC.pm
/opt/Roamware/scripts/perl-pm/vsms/RWIVR.pm
/opt/Roamware/scripts/perl-pm/vsms/RPCModuleDefs.pm
/opt/Roamware/prompts/vsms/en/tryAfterSometime.wav
/opt/Roamware/prompts/vsms/en/noRecentSentMsg.wav
/opt/Roamware/prompts/vsms/en/welcome.wav
/opt/Roamware/prompts/vsms/en/allMsgDeleted.wav
/opt/Roamware/prompts/vsms/en/noMesgInPreviousSession.wav
/opt/Roamware/prompts/vsms/en/tryAgainLater.wav
/opt/Roamware/prompts/vsms/en/noSentMsg.wav
/opt/Roamware/prompts/vsms/en/noMesgInNextSession.wav
/opt/Roamware/prompts/vsms/en/getdigits.wav
/opt/Roamware/prompts/vsms/en/menu.wav
/opt/Roamware/prompts/vsms/en/allSentMsgDeleted.wav
/opt/Roamware/prompts/vsms/en/curMsgSaved.wav
/opt/Roamware/prompts/vsms/en/allReceivedMsgDeleted.wav
/opt/Roamware/prompts/vsms/en/noFilesToPlay.wav
/opt/Roamware/prompts/vsms/en/recipientQuotaExceeded.wav
/opt/Roamware/prompts/vsms/en/noPreviousMsg.wav
/opt/Roamware/prompts/vsms/en/curMsgDeleted.wav
/opt/Roamware/prompts/vsms/en/menu1.wav
/opt/Roamware/prompts/vsms/en/senderQuotaExceeded.wav
/opt/Roamware/prompts/vsms/en/noNextMsg.wav
/opt/Roamware/prompts/vsms/en/cliNotPresent.wav
/opt/Roamware/prompts/vsms/en/noReplayMsg.wav
/opt/Roamware/prompts/vsms/en/noRecentMsg.wav
/opt/Roamware/prompts/vsms/en/menu2.wav

%pre

%changelog
--------------------------------------------------------------------------
if their are changes in source files ,then file names in SPEC file also need to be change.
I have tried putting * instead of file names,but while installing the package it brings all other files from other packages also..
is their any way were do need to put file names in the file section.
 
Old 11-06-2006, 05:30 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
Remember to *not* build RPM's as root account user. Using wildcards does work. I've made some changes to your spec file to test it:
Code:
Summary: Roamware VSMS
Name: RWARVSMS
Version: 6.0
Release: R60805
Copyright: Roamware Inc. Cupertino, USA.
Group: Application
Source: %{name}-%{version}.tar.gz
Vendor : Roamware Inc.
BuildRoot: %{_tmppath}/%{name}-%{version}

%description
It contains binary, cfg, shared libraries, prompts and application specific cron, operations, troubleshooting scripts.

%prep
%setup -q

%install
mkdir -p ${RPM_BUILD_ROOT}/opt/Roamware
cp -dRf *${RPM_BUILD_ROOT}/opt/Roamware

%post

%clean
if [ -d %{buildroot} ] ; then
  rm -rf %{buildroot}
fi

%files
%defattr(-,root,root)
/opt/Roamware/*

%changelog
 
Old 11-06-2006, 06:43 AM   #3
adddy
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Original Poster
Rep: Reputation: 0
RPM spec file

can u plz tell me how to run this spec file
 
Old 11-06-2006, 06:47 AM   #4
adddy
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Original Poster
Rep: Reputation: 0
plz tell me how to run this command

i m doing it like (without root login) in new directory were i have created all directories SPECS,BUILD,SOURCES,ETC

rpmbuild -ba RWARVSMS-6.0.spec

but i m getting an error message likeerror: File /usr/src/redhat/SOURCES/RWARVSMS-6.0.tar.gz: No such file or directory
 
Old 11-06-2006, 07:07 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
rpmbuild -ba RWARVSMS-6.0.spec
but i m getting an error message likeerror: File /usr/src/redhat/SOURCES/RWARVSMS-6.0.tar.gz: No such file or directory

Then you miss an rpm resource file. Touch ~/.rpmmacros and fill it with this:
Code:
%_topdir	/home/YOURACCOUNTNAME/redhat
%_tmppath	%{_topdir}/tmp
%_builddir	%{_topdir}/BUILD
%_rpmdir	%{_topdir}/RPMS
%_sourcedir	%{_topdir}/SOURCES
%_specdir	%{_topdir}/SPECS
%_srcrpmdir	%{_topdir}/SRPMS
Note this makes all the SPECS, BUILD, SOURCES and such relative to your /home/YOURACCOUNTNAME/redhat directory.
 
Old 11-06-2006, 07:23 AM   #6
adddy
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Original Poster
Rep: Reputation: 0
how to fill rpmmacros.plz tell.
 
Old 11-06-2006, 02:14 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
how to fill rpmmacros.
Uh. Copy and paste?
 
Old 11-06-2006, 10:46 PM   #8
adddy
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Original Poster
Rep: Reputation: 0
hai plz tell in brief were to paste it.
as rpm macros dont open
 
Old 11-07-2006, 05:02 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
plz tell in brief were to paste it.
as rpm macros dont open


I already told you: "touch ~/.rpmmacros" which is short for "create a file called .rpmmacros in your home directory". Maybe you should read a generic *NIX tutorial like Rute's first?
 
  


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
How to extract spec file from rpm file nayankk Programming 18 11-12-2015 02:11 PM
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
%file attribute for RPM SPEC files Brian of Gep Fedora 0 06-15-2004 07:12 PM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 10:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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