(Cc'ing the response to jucr-discuss because it may be useful for others too)
You can run the %build section only of a spec file using: pkgbuild --short-circuit -bc XXX.spec If you already built the code in the source dir and just want to build packages, you can do this: pkgbuild --short-circuit -bi XXX.spec pkgbuild --short-circuit -ba XXX.spec This former will run %install, the latter the packaging part. If you later want to make a patch from your changes, I suggest that before you change a file, create a backup copy, using the same suffix for all files, e.g. cp main.c main.c.hacked then change main.c, compile, etc. When you're done, go to the directory above the root of the source dir and run: gendiff XXX-<version> .hacked This will print a diff between each file named foo.hacked and foo in the XXX-<version> directory, recursively. You can redirect the output into a patch: gendiff XXX-<version> .hacked > XXX-01-what-my-patch-does.diff Then you can add it as Patch1 in the spec file and don't forget %patch1 -p1 in %prep. This is how I usually work with pkgbuild. Laca On Thu, 2009-04-23 at 13:56 +0800, FU Ning wrote: > Hi, all: > > After I use pkgbuild -ba XXX.spec to build and install a package, I want > to make some changes to the source code and would like to test if my > change works. Is there a way that I can modify the source directly under > ~/packages/BUILD/XXX/.../src and then build the package separately? I > don't want to compile all the source again from the beginning because it > costs time. I noticed that there is a generated ".pkgbuild.build.sh" > under ~/packages/BUILD/XXX/, I can use that script to build again. But > after that, how can I get the package directory under > ~/packages/PKGS/XXX ? I don't find a useful option from pkgbuild and > pkgtool. > > > Thanks, > Harry > _______________________________________________ > desktop-discuss mailing list > desktop-discuss at opensolaris.org
