aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 332ef8de0cdf1944f8447144fc5c952b3822aa66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
                 Patches for NetBSD and pkgsrc

This repository contains my patches for various pkgsrc packages as
well as the NetBSD distribution itself. It also contains scripts
that make it easier to write patches.

The pkg* scripts are designed to be used in conjunction with the
scripts from the pkgtools/pkgdiff package, as they depend on the
existence of .orig files.

   Use `pkgdiffs' to make a patch containing multiple changes.
   Use `pkgpatch' to apply a patch to a source directory.
   Use `pkgundo' to reinstate the original files.

The other scripts have no special relation to pkgtools/pkgdiff.

   Use `convpatch' to make a patch from `git diff' output.
   Use `savepatch' to save a patch in ~/patches.
   Use `psu' to undo all patches applied to a pkgsrc build.
   Use `psx' to fetch and extract a pkgsrc package.

The `psu' and `psx' scripts are only to be used within pkgsrc
package directories. They do nothing within the NetBSD source tree.

                    Applying pkgsrc patches

To have `make do-patch' apply local patches, be sure to set the
LOCALPATCHES variable in mk.conf:

	echo LOCALPATCHES = ~/patches >> /etc/mk.conf

To rebuild a package with new patches, something along the following
lines should be performed:

	psu -x
	make do-patch
	make do-build
	make do-install
	# pkg_delete PACKAGE
	make reinstall # or make replace