Q:

How to custom build debian's busybox?

I'm building an embedded system based on debian 7, and I'd like to make the most out of busybox that comes with debian. The problem is default busybox build in debian seems quite minimal, for example it does not even include passwd.
On the other hand I don't want to build busybox from busybox.net sources for stability and update issues.
So how can I build and install a bigger busybox from debian source package?

A:

If you need a .deb customized on the fly
mkdir /tmp/bb
cd /tmp/bb
apt-get source busybox
sudo apt-get build-dep busybox
cd busybox-1.20.0/
fakeroot debian/rules build
make -C debian/build/deb/ menuconfig
# enable passwd
fakeroot debian/rules binary

but probably the best would be to add a custom package inside debian/control and the relative config under debian/config/pkg/
(I'm not using Debian 7 but guess it is similar)
edit
You can use fakeroot debian/rules debian/build/deb/.built and fakeroot debian/rules binary-arch_busybox to build the deb target only

