Need help writing RPM .spec file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help writing RPM .spec file
# 1  
Old 10-12-2010
Need help writing RPM .spec file

I'm new to this. This installer just installs PHP code so NOTHING needs to be built (do I still need to use the build and buildroot directories?). I would just like to create an installer (spec) that:
1) unpacks a tarball
2) moves the unpacked files to the installation target
3) runs a script after installing that will modify a prior existing configuration file to work with the above

Also when I see things like %setup -q I'm wondering what is done exactly? Where can I look up info on what %setup or the -q option does for instance? Also when I see stuff like %{!?version:%define unset_version yes%{nil}} where can I read about what this syntax means? Does it have a name? Is a .spec essentially a special type of shell script? Thanks
# 2  
Old 10-12-2010
Have a look at the Packager Documentation documentation at rpm.org.
# 3  
Old 10-13-2010
Yeah RPM's are always fun, remember to create and uninstall function too :P
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Rpm issue with autoconf-2.63-1.AIX6.1.noarch.rpm

dears i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message . P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm error: failed dependencies: m4 is needed by autoconf-2.63-1 P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 Replies

2. Red Hat

RedHat version in rpm spec files

Hi In opensuse we have this nice version control variable I use much when designing rpm spec files: rpm --showrc | grep suse_version %if 0%{?suse_version} > 0 && 0%{?suse_version} < 1700 -14: suse_version 1140But I do not find anything close to this in rhel/centos The only way... (0 Replies)
Discussion started by: mortenb
0 Replies

3. Shell Programming and Scripting

build rpm with SPEC file for packaging .jar and some .sh files..

Good day people, Hereby wish to have your advise for below: I have some .jar files, some script files (install.sh, action.sh) , and a libaes.so file. Basically, the .jar files compute the operation of my system and define the working directory for my system. My current scenario: i trigger... (1 Reply)
Discussion started by: cielle
1 Replies

4. Shell Programming and Scripting

Calling script from a RPM spec file

Hi, I want to execute a script "myscript.sh" in the %post part of a rpm spec file. Suppose the script is placed in /opt/path. Then simply calling like sh /opt/path/myscript.sh from %post part (of that spec file) will suffice? Or there is any other way? (0 Replies)
Discussion started by: saurabhkoar
0 Replies

5. Shell Programming and Scripting

Need help with spec. characters.

Hi., I need transfer as parameter into shell script some spec. characters, for example " or ' or & or \ at the end of second parameter. (this parameter used as changed password). How I can transfer it into shell script. Thanks Staas,. (5 Replies)
Discussion started by: beckss
5 Replies

6. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

7. Shell Programming and Scripting

Extract RPM name from path to .rpm file

It's the end of the day and I just can't get my head around this. I'm trying to extract just the name of the RPM from the path to a .rpm file. So from: /home/me/rpm/RPMS/i386/nagios-our-plugins-1.2-6.i386.rpmI need to extract 'nagios-our-plugins'. I can't get the awk syntax right: awk '{... (5 Replies)
Discussion started by: aussieos
5 Replies

8. SuSE

How to install .src.rpm ? ( source rpm )

Hi, I have got few RPM's from rpmfind.net ( mainly gcc ). But it seems to be src files instead of the image. so I think we have to build the src files according to target machine using rpmbuild. Can any one help me with 1) Various options of rpm build that have to be taken care 2)... (3 Replies)
Discussion started by: Sivaswami
3 Replies

9. Linux

Converting source rpm to binary rpm

Hi, I need to install an rpm file,but I only have '.src.rpm' version of it. I want to convert it to a binary rpm. so I tried this rpm --rebuild somethin.src.rpm But I am gettin '--rebuild:Invalid option' as output Is there another way to rebuild source rpm.? Thanks in... (2 Replies)
Discussion started by: eamani_sun
2 Replies

10. Linux

Failed dependencies of rpm / how does RPM check for ?

Hey, I've a problem installing a package. rpm -ivh brings the errors: libjvm.so is needed by libverify.so is needed by But I have installed the Java SDK like requested and the files are on the disk. But I have no idea how to find out, why rpm cann't find them. I have also... (2 Replies)
Discussion started by: mod
2 Replies
Login or Register to Ask a Question