User:Jjmcd/Drafts/Converting Publican RPM for Fedora

The point of this note is to document the steps for removing the version number from the RPM produced by Publican so that it matches Fedora packaging standards.

Grab the SRPM
If the Publican produced RPM has been produced by someone else, get the SRPM from Publican.

Unpack the SRPM
Make an empty directory to work in. For Publican, there really don't seem to be a lot of files, but another RPM might make a whole bunch

From this directory:

rpm2cpio {name.src.rpm} | cpio -i

This should leave you with two files; a tarball and a spec file.

Rename the tar
unpack the tar

tar -xzf {name of the tar}

this will create a subdirectory. Name that subdirectory version-number

repack the tar

tar -czf fedora-release-notes-{version}.tgz fedora-release-notes-{version}

Rename the spec file
mv {something}.spec fedora-release-notes.spec

Edit the spec file

 * 1) Near the top, change the name to
 * 2) Next line, change the version to match the tarball version
 * 3) Toward the latter part of the file,   represents what will show on the menu.  Adjust this if needed
 * 4) Near the end, the version number on the changelog entry must match the version number on the tar, then a dash, then the release number

Build the RPM
Copy the tar to ~/rpmbuild/SOURCES

rpmbuild -ba fedora-release-notes.spec

Check the RPM
cd ~/rpmbuild/RPMS/noarch rpmlint fedora-release-notes-(long version).noarch.rpm

C'est ca.