RPM Spec File questions
Hello,
I have been following various guides on the internet to see how to build a simple RPM. I think I've got the general idea, but when it comes to editing the spec file they all seem to have a different idea, and some of them goive spec file examples that don't look like the skeleton specfile I have. I am using rpmdevtools-7.5-2 (x86). My simple demo spec file is below: Code:
Name: Hello rpmdev-setuptree to create the build tree (BUILD, SOURCES, SPECS and so on) Wrote a bash script containing 'echo "Hello World"' and turn it into an executable called hello.sh Then I've tar/gzipped that into SOURCES directory tar -cvzf SOURCES/hello.tar.gz hello.sh Then ran rpmdev-newspec and populated it with the basic information in the quote above. I'm not bothered about URL being google.com, and I think (at least rpmbuild hasn't compolained about using path to the SOURCE directory as Source0. But two problems I see, BuildRoot- as there's no complilation required, can't I just have /tmp for this? Or does it have top be a string of Macros describing a path, and if so- path to where, to the SOURCE directory? The guides I have followed so far don't seem clear on this point at all. Which means furthe down, where I've put... install -d 0755 $RPM_BUILD_ROOT/usr/bin install -m 0755 hello.sh $RPM_BUILD_ROOT/usr/bin do those locations look ok (should result in /tmp/usr/bin) given what I've set as my BuildRoot? In some examples BuildRoot was a string of percentage symbols and curly brackets... Any pointers at all would be appreciated. |
As a maintainer of various RPM based software throughout the years, I will say that my favorite piece of software in many years is this:
https://github.com/jordansissel/fpm No hassle RPM/Deb/etc.. making. Hope this changes your life like it did for me. |
All times are GMT -5. The time now is 09:05 PM. |