`. To generate all patches invoke
-To use this tool, you need to install the pkgtools/pkgdiff package. As indicated earlier in this document, you first need to either extract an existing package or create and extract your own. Then you must keep the original version of each files modified by making a copy of it with the extension .orig. When changes are complete, you can run mkpatches from the directory, say, /usr/pkgsrc/foo/bar. This action will create a set of patches by using the .orig files previously created as a basis. A new directory will be created, here /usr/obj/pkgsrc/foo/bar/work/.newpatches. You then copy this directory like this:
+ mkpatches
- mkpatches
- mv patches patches.old
- cp -Rp /usr/obj/pkgsrc/foo/bar/work/.newpatches patches
- bmake checksum
+from the package directory (not the work directory!) The new patches will be saved in the `patches/` directory along with backups of the previous patchset. When you are content with the generated patches commit them and update the patch checksums:
-The last command, bmake checksum, will regenerate the verification file distinfo. From that moment, you can run bmake clean and rebuild the package at will. If you have any other changes to add, you can remove the package again and repeat these steps.
+ mkpatches -c
+ bmake makepatchsum
+
+You may also revert to the old patches by calling `mkpatches -r`.
+
+Now clean up and try to rebuild your package:
+
+ bmake clean
+ bmake
+
+If you have any other changes to add, you can remove the package again and repeat these steps.
## Submitting a package in pkgsrc
@@ -249,6 +267,7 @@ This section will attempt to give you some minimal guidance on submitting change
A source code package can be submitted with the gtk-send-pr package (pr=Problem Report), or by visiting the page [NetBSD Problem Report](http://www.netbsd.org/support/send-pr.html). The indications given by the pkgsrc developer's guide in connection with this tool are summarized here:
âIn the form of the problem report, the category should be âpkgâ, the synopsis should include the package name and version number, and the description field should contain a short description of your package (contents of the COMMENT variable or DESCR file are OK). The uuencoded package data should go into the âfixâ field.â ̶ http://www.netbsd.org/docs/pkgsrc/submit.html#submitting-your-package
+
It is also possible to import new packages in pkgsrc-wip. See [http://pkgsrc-wip.sourceforge.net/](http://pkgsrc-wip.sourceforge.net/) for more information.
## References
@@ -283,7 +302,7 @@ It is also possible to import new packages in pkgsrc-wip. See [http://pkgsrc-wip
- Previously, the work directory was created directly in the directory dedicated to the ported application, under the pkgsrc directory. But to preserve the integrity of these directories and to be able to compile on another volume, the working files have been moved under /usr/obj. The source code located in /usr/src followed the same path.
+ Previously, the work directory was created directly in the directory dedicated to the ported application, under the pkgsrc directory. But to preserve the integrity of these directories and to be able to compile on another volume, the working files have been moved under /usr/pkgobj.
|