This is my first draft of a quick document saying how to convert an old to a new source package.
DO NOT DO ANYTHING YET except read this and suggest amendments. Ian. * Download the original source code from wherever it can be found and do any rearrangement required to make it look like the original tree of the Debian source. Put it in <package>-<upstream-version>.orig/. * Rename all files debian.* to debian/*. There may be some exceptions to this, but this is a good start. * Edit the debian/changelog - create or rename it if necessary. Add a new revision to the top with the appropriate details. * Edit/create debian/control: + Remove the Version field. If it is generated unusually (not equal to the source version) you must use the -v option to dpkg-gencontrol (see below). Section, Priority, Maintainer go above the line, most of the rest below. + Reorder the fields and add a blank line at an appropriate point, separating the source package fields from the binary package fields. + Add the Source field. + Add the Standards-Version field. + Change the Architecture field for each package to `any', `all' or whatever. If there isn't an Architecture field add one. + If any other seddery or things used to happen to make the binary control files use dpkg-gencontrol's variable substitution features to achieve the same effect. Use debian/substvars if you need to put unusally-generated information (apart from details of .deb files) in the .changes file too. * Edit the debian/rules: + Remove the source and diff and any changes and dist targets. These things now happen in a package-independent way and are not done by debian/rules. + Change the binary target to use dpkg-gencontrol to make the package control file(s). + Change occurrences of debian-tmp to debian/tmp. + Change occurrences of debian.{post,pre}{inst,rm} to debian/*. + Remove the version number make variable if there is one. * Check that the debian/README is really the copyright file, and if so rename it to debian/copyright and edit debian/rules accordingly. If it isn't then find debian/copyright and decide what to do with the README. * Check for various other anachronisms: + Remove any Package_Revision, Package-Revision or Revision fields. + Rename Optional to Suggests, Recommended to Recommends. + Change /usr/doc/examples/<package> to /usr/doc/<package>/examples and /usr/doc/copyright/<package> to /usr/doc/<package>/copyright. * Look everything over. * Do a test build using dpkg-buildpackage -ur -uc -r<whatever>. Check the permissions and locations of the results, and that the source build happened OK. Test install the binary package(s) and test extract the source package(s). * Sign the release: either re-run dpkg-buildpackage (this will rebuild the package entirely), or PGP-sign the .dsc, rebuild the .changes using dpkg-genchanges, and then PGP-sign the .changes. -- Ian Jackson, at home. [EMAIL PROTECTED] + 44 1223 3 31579 General: [EMAIL PROTECTED] Permanent: [EMAIL PROTECTED] Churchill College, Cambridge, CB3 0DS. http://www.cl.cam.ac.uk/users/iwj10/