From: David C. <cl...@au...> - 2004-08-03 02:05:31
|
On Mon, Aug 02, 2004 at 03:29:36PM -0500, Mike wrote: > I can build these things, but I like the idea of the *.rpm to keep > separate those things that come as part of the BOS and those things > that I've added on. The differences between installp and rpm do > that nicely. Mike -- want to try an experiment? Suppose that you want a package which is not in the Toolbox, but you find that it is pre-built at the UCLA site. Their image is just a compressed tarball, and you'd rather it be in rpm format, but you also aren't particularly excited about building it yourself. So -- how about converting their tarball into an installable rpm image without actually building anything? You could do this without really having to know much about rpm builds, using the file below. Visit http://aixpdslib.seas.ucla.edu and find the package you want, then download it. Save the file below (and edit it if a different package is desired). Then run: "rpm -bb net-snmp.spec" assuming net-snmp.spec is the name of the saved file. Conventionally you'd put this file in /opt/freeware/src/packages/SPECS, but you could store it anywhere. This method ought to work with pretty much any of the UCLA images. Note that theirs are built based in /usr/local, so if you use that directory for your own other uses, take care that you don't overwrite any of your own files that you might have copied there. If this is a concern, list the files in the package (rpm -qlp <rpmname>) after you create the package but before you install it. -- David Clissold cl...@au... ############################################################################ # Download desired tarball from http://aixpdslib.seas.ucla.edu # Place the tarball in /opt/freeware/src/packages/SOURCES # Edit "Summary:", "Name:", and "Version:" below to set package name/version. # Edit "Source0:" to match the filename of the compressed tarball. # Edit "License:" to indicate type of license; It's up to you to read the # license and agree to it. USE THIS IMAGE AT YOUR OWN RISK! # Edit "%description" section to describe package as you like. # Edit "%changelog" and follow the format as desired. (Optional; you could # remove this section if you want). # Save this file and use rpm to build an installable rpm image. For example, # if this file is named "net-snmp.spec": # $ rpm -bb net-snmp.spec # After a few minutes, this should finish and the rpm image should appear # in directory /opt/freeware/src/packages/RPMS/ppc. # Try "rpm -qip <filename>" and "rpm -qlp <filename>" to examine it before # installing. # # If the 'rpm -bb' fails, you probably need more space in /var/tmp. ############################################################################ Summary: net-snmp from http://aixpdslib.seas.ucla.edu Name: net-snmp Version: 5.0.6 Source0: net-snmp.5.0.6.tar.Z Release: 1 License: BSD-like Group: UCLA/Prebuilt Prefix: /usr/local BuildRoot: /var/tmp/%{name}-root %description This is net-snmp. Add description here as you see fit. %prep %build %install [[ $RPM_BUILD_ROOT != "/" ]] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT cd $RPM_BUILD_ROOT uncompress -c %{SOURCE0} | tar -xf - # Optional. Would be nice to have the binaries stripped. /usr/bin/strip ./%{prefix}/bin/* ./%{prefix}/sbin/* 2>/dev/null || : %clean [[ $RPM_BUILD_ROOT != "/" ]] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,bin,bin) %{prefix}/* %changelog * Mon Aug 02 2004 Your Name <you...@yo...> - create rpm from the UCLA tarball. |