Making PCLinuxOS RPM Packages ∞
Building an RPM ∞
Download the rpm-building tools:
su apt-get install rpm-build
- Put the files in a directory called
Go into that directory and make the file
- This will probably work, but is untested because RPM building is too stupid to deal with.
# This script builds an RPM from the contents of the directory it is in. # It's not magic.. the spec file must still be built properly! # The name of this script will be the name of the RPM it builds. # so if this is called "foo", then you will get something like "foo.i586.rpm" echo # Clean up, to help avoid unnecessary unpleasantness. rm -f *~ ../$0.tar.gz ../$0.rpm echo # Make a gzipped tarball from all files and all dotfiles in the current directory. tar -czvf ../$0.tar.gz ../$0/ echo # Copy the archive to the proper place cp ../$0.tar.gz /usr/src/RPM/SOURCES/ echo # Build the RPM rpm -ba --clean $0.spec echo # Move the RPM from where it got deposited, back here. mv /usr/src/RPM/RPMS/i586/$0.i586.rpm ../ cd ../ echo # Finished. This is what was produced: ls -al $0.tar.gz $0.rpm
Make your script executable:
chmod +x <packagename>
- Run your script.
Remember to keep your original tar file for reference.