I have looked through the requirements for the source build and here are my conclusions.
autoconf automake autopoint build-essential pkgconf libtool git libzip libjpeg62-turbo gettext libmicrohttpd
libzip, libjpeg and libmicrohttpd are not available in the IPFire build tree.
autopoint is part of gettext which is available in the IPFire build tree. However if this is also required for running your package then you will need to change the gettext rootfile to uncomment autopoint.
For the Optional packages:-
FFMpeg Functionality(Required for creating movies, using network cameras, etc.)
libavformat libavcodec libavutil libswscale libavdevice
ffmpeg is available as an addon. You will need to make it a dependency of the addon you are creating. None of the other libraries listed are available in the IPFire Build tree.
MySQL, MariaDB and PostgreSQL are not available in the IPFire Build tree.
SQLite3 is available.
JPEG Turbo and Webp Image Support are not available in the IPFire Build tree.
Your best starting point is to follow the links @cfusco provided and get a standard IPFire Build tree to successfully build on whatever hardware and distro you decide to use. To have the builds complete in a reasonable period of time then you will need a reasonably powerful system.
I use an i5 based computer with 16GB ram running with an Arch Linux distro and my first build was something like 5 or 6 hours. Subsequent builds are quicker because of the ccache capability and mine are around 2.5 hours.
@pavlos has listed the following performance on his i7 based computer. I suspect he is running Debian or Ubuntu from his use of
adding more data, system i7-7700K, 16GB ram
first run: *** Build finished in 3:39:11
second run: *** Build finished in 1:17:42
Once you have a working standard build then you can start to look at working on the motion package and its dependencies and come back with any questions you get.