|
|
Sponsored by
|
|
|
Buy iMac
|
|
|
News Editions
|
|
|
About iMac
|
|
|
About Linux
|
|
|
Getting Started
|
|
|
Getting Help
|
|
|
User Resources
|
|
|
Advertisement
|
|
|
Distributions
|
|
|
Software Picks
|
|
|
Search
|
|
|
Links
|
|
|
|
| iMacLinux Edition |
Friday, 04 July 2003 |
|
|
|
|
|
Posted by on Friday January 18th, 2002 09:16:30 PM
|
This tutorial will show you how to build *.ppc.rpms from SRPMs in three easy steps. REALLY EASY STEPS!!!
Alrighty. First off, why bother building an RPM at all? Why not just build from source and install in /usr/local/blah?
Well, life is easier when we use rpms. If I build , which ROCKS, from source, it makes upgrading to future versions uglier (I need to keep the source on my hard drive to 'make uninstall') and no one benefits from my compiling it. Whereas, if I build a galeon-*.ppc.rpm, I get to use it, upgrading is as simple as "rpm -Uvh galeon-*+1.ppc.rpm", and best of all, I can upload it to , and then all you cats can install it as well, saving you the compile time! Keen, eh?!!
And believe me, when you're compiling Mozilla, or a large package, that's a good thing.
So! Let's get started! We'll build because it rocks, and because it's a very quick package to make. To compile glchess, you'll need:
- gnuchess, which came with your distro CD
- , which allows you to stick Mesa/Open GL goodies in GTK apps
- Pretty much every conceivable Gnome/Xfree86/RPM devel package, which also came on your distro CDs.
- I recommend Ximian Gnome, as their packages are more current than most distros.
But if you compile your software you probably have most of these.
Step one is to grab and install it using:
- rpm -ivh glchess*.rpm
This installs a few things in /usr/src/rpm/.
Step two is where we build a glchess ppc.rpm.
- cd /usr/src/rpm/SPECS
now this is the tricky part...
- rpm -ba glchess.spec
Phew! Made it this far?! Good! Watch as nifty arcane automake info zips up your semi-transparent, '1337' term window. Ten seconds later, VOILA! We are done!! (assuming you have all the required libs/devel packages installed). The built glchess-*-ppc.rpm is in /usr/src/rpm/RPMS/ppc/.
So step three:
- cd ../RPMS/ppc/
- ls -al
- And you should see your glchess ppc.rpm. Install it, run it, and be amazed at how fun glchess is! Lastly, make yourself useful: Upload your package to incoming.redhat.com using the FTP client of your choice (I use gftp). Stick your nifty ppc.rpm AND SRC.RPM in the libc6 folder. Now, everyone can share your package (which will appear in rpmfind.net), and vice versa!
Now go forth and make packages! As a final note, go into all the subdirectories of /usr/src/rpm/ (RPMS, BUILD, etc) and delete the source code/etc. This will free up disk space.
Good luck!
|
 |
|
The Fine Print: The following comments are owned by whoever posted them.
(Reply)
|
|
by S. Moeller on Saturday January 19th, 2002 01:14:54 PM
|
It certainly is a good idea making people more comfortable with the power of their operating system.
Just three little things: 1. this only works for *.src.rmp files (or any sources you got rpm spec files for). If you just have plain sources it will probably require slightly more than five seconds. For writing your own spec files, "man rpm" and www.rpm.org are your friends. 2. if you have the *.src.rpm already there is no need to build it again, therefore "* rpm -bb glchess.spec" should be sufficient (-ba = build all, source and binary package; -bb = build binary package) 3. Instead of purging the /usr/src/RPM tree by hand, why not let rpm do the job? In /usr/src/rpm/SPECS issue "rpm --rmsource glchess.spec (from the rpm-man pages: --rmsource Remove the sources and spec file after the build (may also be used standalone, eg. "rpm --rmsource foo.spec")).
|
|
by stimuli's evil twin on Saturday January 19th, 2002 08:51:11 PM
|
re: 1: Yes, very true. Compiling a tarball and
- make install | cat > blah.txt
- is the only way I know of to figure out where everything gets installed, and I've had pretty limited luck with this. Are there better ways to find out where binaries go?
re: 2: True again, except if patches etc. are applied to the source.
re:3: Neat! I had no idea. Hmmm... I should really read those manpages!
This tutorial is for those who, like me, had no idea why src.rpms are so ubiquitous, and for those who didn't know making binary rpms is relatively painless.
cheers!
|
|
by on Monday January 21st, 2002 08:27:41 AM
|
|
i have made all the passages of this HOWTO but the rpm command version 4.0.2 that is inside the yellow dog 2.1 seems not to know the -bX (where X is any kind of option) Why? Do i need to build another rpm package?? Please let me know
|
|
by on Monday January 21st, 2002 08:27:42 AM
|
|
i have made all the passages of this HOWTO but the rpm command version 4.0.2 that is inside the yellow dog 2.1 seems not to know the -bX (where X is any kind of option) Why? Do i need to build another rpm package?? Please let me know
|
|
by on Tuesday January 22nd, 2002 07:19:44 AM
|
|
Doesn't `rpm --rebuild *.src.rpm` work?
I never used PPC linux before, but on i386 linux this command works fine.
It'll create the rpm in the same directory, only you don't need to install sources (It does that automagivally and removes them after build is complete)
|
|
|
|
|
|
|