1. What about patches? How to patch sources? Use function apply_patch (apply_patch file [level [source]]). For example: apply_patch fix_destdir.patch.gz 1 2 level is not obligatory. If not passed, the default is 0. To patch other than first sources, use third argument. If you want to do that, you must specify level first (at least ""). In the example above, the patch will be applied to source unpacked to $src2 directory. Patch file doesn't need to be gzipped, nor even compressed. bzip2 patches are supported as well. 2. I want to automatically run .builder script, but instead of default values that are being set by function yes_or_no there should be other ones. How to pass other defaults to .builder script? Is it to do with --scheme option for buildpkg? Yes, it is. If you want to change a default of variable, for example, with_pop3 in mutt.builder, create file scheme.no-pop3 in /usr/src/tgz/sources/mutt. Put there following line: export def_with_pop3=n Function 'yes_or_no VARIABLE' looks for variable def_VARIABLE and if there is such, does 'VARIABLE=$def_VARIABLE'. Remember about 'export' and 'def_'. Then if the file is scheme.no-pop3, you can make use of this by typing: buildpkg --scheme no-pop3 --auto mutt You can use any number of option --scheme. 3. My program needs an user/group other than root. 'make install' is installing a file as this user/group but I'm getting an error. How do I avoid this? When you are building a program on a non-root user account, it's normal that it can't change owning. Patch Makefile not to change owning and use function change_own in the .builder, like this: change_own main usr/sbin/popa3d popa3d.popa3d Instead of 'main' you can put a name of a subpackage that contains this file. There is another function: change_mod. It has the same syntax but instead of owning you pass mode, ie. 700 (format is the same as in chmod command). 4. How do I build a package for other architecture? I want i686, not i386 which is the default. Use option --target for buildpkg, for example: buildpkg --target i686 mutt You can also build for multiple architectures: buildpkg --target "i586 i686" mutt Then the package will be being built twice. Note that not all sources can be built this way. If source is based on autoconf (./configure script), it works. Other ones must be patched. This will be resolved in the future (somehow). 5. What is this strange message about --host when ./configure script starts? pwbuilder passes parameter --host to ./configure script to tell it about target host architecture. Some programs rely on this information. If you don't want this, use function build_host_off before calling do_configure. 6. Is there any function that allows to replace some string in a file? Yes. There is function replace_regexp: replace_regexp file regexp string For example: replace_regexp $src1/Makefile "^CFLAGS=-O2$" "CFLAGS=-O2 -Wall" .