I'd like to to hook into an existing and well tested RPM deployment system for deploying a module of mine. It simply consists of 3rd party binaries in a tar.gz file and a Bash script to install and configure it to my custom specification.
Are there any standard ways of doing this with RPM? I don't have sources to build, for example, but all the examples I can find assume I am building from source. I'd like to adhere as close as possible to what's standard, so what's the best way to organize this RPM?
The %build
section is entirely optional in an rpm spec file.
If you don't need one then you don't need to include one and can skip it.
Just have a %prep
section which extracts your tarball and an %install
section which puts the files in the right places under the buildroot and a %files
section to package them (and the header metadata lines of course).
If your script to install and configure it needs to be run on the target/deployment system then you need to put that in a %post
scriptlet instead of the %install
section.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.