Cross compilation framework to create native packages for the Synology's NAS
See the codeSynoCommunity is now on Discord!
spksrc is a cross compilation framework intended to compile and package software for Synology NAS devices. Packages are made available via the SynoCommunity repository.
DSM 7 was released on June 29 2021 as Version 7.0.41890.
Before opening a new issue, check the Troubleshooting guide and search open issues. If you can't find an answer, or if you want to open a package request, read CONTRIBUTING to make sure you include all the information needed for contributors to handle your request.
The Docker development environment supports Linux and macOS systems, but not Windows due to limitations of the underlying file system.
git clone https://github.com/YOUR-USERNAME/spksrcwget-based alternative for linux Install Docker with wget).docker pull ghcr.io/synocommunity/spksrc/spksrc directory with the appropriate command for your host Operating System:cd spksrc # Go to the cloned repository's root folder.
# If running on Linux:
docker run -it --platform=linux/amd64 -v $(pwd):/spksrc -w /spksrc ghcr.io/synocommunity/spksrc /bin/bash
# If running on macOS:
docker run -it --platform=linux/amd64 -v $(pwd):/spksrc -w /spksrc -e TAR_CMD="fakeroot tar" ghcr.io/synocommunity/spksrc /bin/bash
A virtual machine based on an 64-bit version of Debian 13 stable OS is recommended. Non-x86 architectures are not supported.
Install the requirements (in sync with Dockerfile):
sudo dpkg --add-architecture i386 && sudo apt-get update
sudo apt update
sudo apt install --no-install-recommends -y \
autoconf-archive autogen automake autopoint \
bash bash-completion bc bison build-essential \
check cmake curl cython3 debootstrap ed expect \
fakeroot flex gh g++-multilib gawk gettext gfortran \
git gobject-introspection gperf imagemagick intltool \
jq libbz2-dev libc6-i386 libcppunit-dev libelf-dev \
libffi-dev libgc-dev libgmp3-dev libicu76 libltdl-dev \
libmount-dev libncurses-dev libpcre2-dev libssl-dev \
libtool libtool-bin libunistring-dev lzip man-db manpages-dev \
moreutils nasm p7zip patchelf php pkg-config plocate \
rename ripgrep rsync ruby-mustache scons subversion \
sudo swig texinfo time tree unzip xmlto yasm \
zip zlib1g-dev
Install Python based dependencies (also in sync with Dockerfile):
sudo apt install --no-install-recommends -y \
httpie mercurial meson ninja-build \
python3 python3-mako python3-pip python3-setuptools \
python3-virtualenv python3-yaml
From there, follow the instructions in the Developer Guide.
A container based on 64-bit version of Debian 13 stable OS is recommended. Non-x86 architectures are not supported. The following assumes your LXD/LXC environment is already initiated (e.g. lxc init) and you have minimal LXD/LXC basic knowledge :
Create a new container (will use x86_64/amd64 arch by default): lxc launch images:debian/13 spksrc
Enable i386 arch: lxc exec spksrc -- /usr/bin/dpkg --add-architecture i386
Update apt channels: lxc exec spksrc -- /usr/bin/apt update
Install all default required packages:
lxc exec spksrc -- /usr/bin/apt install --no-install-recommends -y \
autoconf-archive autogen automake autopoint \
bash bash-completion bc bison build-essential \
check cmake curl cython3 debootstrap ed expect \
fakeroot flex gh g++-multilib gawk gettext gfortran \
git gobject-introspection gperf imagemagick intltool \
jq libbz2-dev libc6-i386 libcppunit-dev libelf-dev \
libffi-dev libgc-dev libgmp3-dev libicu76 libltdl-dev \
libmount-dev libncurses-dev libpcre2-dev libssl-dev \
libtool libtool-bin libunistring-dev lzip man-db manpages-dev \
moreutils nasm p7zip patchelf php pkg-config plocate \
rename ripgrep rsync ruby-mustache scons subversion \
sudo swig texinfo time tree unzip xmlto yasm \
zip zlib1g-dev
lxc exec spksrc -- /usr/bin/apt install --no-install-recommends -y \
httpie mercurial meson ninja-build \
python3 python3-mako python3-pip python3-setuptools \
python3-virtualenv python3-yaml
spksrc userspksrc user into the LXC container. Such user needs to be created into the default container image:lxc exec spksrc -- /usr/sbin/adduser --uid 1001 spksrc
lxc exec spksrc --user 1001 -- cp /etc/skel/.profile /etc/skel/.bashrc ~spksrc/.
From there you can connect to your container as spksrc and follow the instructions in the Developer Guide.
lxc exec spksrc -- su --login spksrc
spksrc@spksrc:~$
spksrc userYou can create a shared user between your Debian/Ubuntu host and the LXC Debian container which simplifies greatly file management between the two. The following assumes you already created a user spksrc with uid 1001 in your Debian/Ubuntu host environment and that you whish to share its /home userspace.
lxc config set spksrc raw.idmap "both 1001 1001"
lxc restart spksrc
Remapping container filesystem
/home/spksrc from the host to the LXC container:lxc config device add spksrc home disk path=/home/spksrc source=/home/spksrc
Device home added to spksrc
spksrc user:lxc exec spksrc -- su --login spksrc
spksrc@spksrc:~$
The following assume you have a running proxy on your LAN setup at IP 192.168.1.1 listening on port 3128 that will allow caching files.
lxc config set spksrc environment.http_proxy http://192.168.1.1:3128
lxc config set spksrc environment.https_proxy http://192.168.1.1:3128
wget in the spksrc container user account:lxc exec spksrc --user $(id -u spksrc) -- bash -c "cat << EOF > ~spksrc/.wgetrc
use_proxy = on
http_proxy = http://192.168.1.1:3128/
https_proxy = http://192.168.1.1:3128/
ftp_proxy = http://192.168.1.1:3128/
EOF"
Once you have a development environment set up, you can start building packages, create new ones, or improve upon existing packages while making your changes available to other people. See the Developer Guide for information on how to use spksrc.
When not explicitly set, files are placed under a 3 clause BSD license
96 followers · starred Feb 2024
1,274 followers · starred Dec 2014
34 followers · starred May 2021
223 followers · starred Jan 2016
Cross compilation framework to create native packages for the Synology's NAS
See the codeSynoCommunity is now on Discord!
spksrc is a cross compilation framework intended to compile and package software for Synology NAS devices. Packages are made available via the SynoCommunity repository.
DSM 7 was released on June 29 2021 as Version 7.0.41890.
Before opening a new issue, check the Troubleshooting guide and search open issues. If you can't find an answer, or if you want to open a package request, read CONTRIBUTING to make sure you include all the information needed for contributors to handle your request.
The Docker development environment supports Linux and macOS systems, but not Windows due to limitations of the underlying file system.
git clone https://github.com/YOUR-USERNAME/spksrcwget-based alternative for linux Install Docker with wget).docker pull ghcr.io/synocommunity/spksrc/spksrc directory with the appropriate command for your host Operating System:cd spksrc # Go to the cloned repository's root folder.
# If running on Linux:
docker run -it --platform=linux/amd64 -v $(pwd):/spksrc -w /spksrc ghcr.io/synocommunity/spksrc /bin/bash
# If running on macOS:
docker run -it --platform=linux/amd64 -v $(pwd):/spksrc -w /spksrc -e TAR_CMD="fakeroot tar" ghcr.io/synocommunity/spksrc /bin/bash
A virtual machine based on an 64-bit version of Debian 13 stable OS is recommended. Non-x86 architectures are not supported.
Install the requirements (in sync with Dockerfile):
sudo dpkg --add-architecture i386 && sudo apt-get update
sudo apt update
sudo apt install --no-install-recommends -y \
autoconf-archive autogen automake autopoint \
bash bash-completion bc bison build-essential \
check cmake curl cython3 debootstrap ed expect \
fakeroot flex gh g++-multilib gawk gettext gfortran \
git gobject-introspection gperf imagemagick intltool \
jq libbz2-dev libc6-i386 libcppunit-dev libelf-dev \
libffi-dev libgc-dev libgmp3-dev libicu76 libltdl-dev \
libmount-dev libncurses-dev libpcre2-dev libssl-dev \
libtool libtool-bin libunistring-dev lzip man-db manpages-dev \
moreutils nasm p7zip patchelf php pkg-config plocate \
rename ripgrep rsync ruby-mustache scons subversion \
sudo swig texinfo time tree unzip xmlto yasm \
zip zlib1g-dev
Install Python based dependencies (also in sync with Dockerfile):
sudo apt install --no-install-recommends -y \
httpie mercurial meson ninja-build \
python3 python3-mako python3-pip python3-setuptools \
python3-virtualenv python3-yaml
From there, follow the instructions in the Developer Guide.
A container based on 64-bit version of Debian 13 stable OS is recommended. Non-x86 architectures are not supported. The following assumes your LXD/LXC environment is already initiated (e.g. lxc init) and you have minimal LXD/LXC basic knowledge :
Create a new container (will use x86_64/amd64 arch by default): lxc launch images:debian/13 spksrc
Enable i386 arch: lxc exec spksrc -- /usr/bin/dpkg --add-architecture i386
Update apt channels: lxc exec spksrc -- /usr/bin/apt update
Install all default required packages:
lxc exec spksrc -- /usr/bin/apt install --no-install-recommends -y \
autoconf-archive autogen automake autopoint \
bash bash-completion bc bison build-essential \
check cmake curl cython3 debootstrap ed expect \
fakeroot flex gh g++-multilib gawk gettext gfortran \
git gobject-introspection gperf imagemagick intltool \
jq libbz2-dev libc6-i386 libcppunit-dev libelf-dev \
libffi-dev libgc-dev libgmp3-dev libicu76 libltdl-dev \
libmount-dev libncurses-dev libpcre2-dev libssl-dev \
libtool libtool-bin libunistring-dev lzip man-db manpages-dev \
moreutils nasm p7zip patchelf php pkg-config plocate \
rename ripgrep rsync ruby-mustache scons subversion \
sudo swig texinfo time tree unzip xmlto yasm \
zip zlib1g-dev
lxc exec spksrc -- /usr/bin/apt install --no-install-recommends -y \
httpie mercurial meson ninja-build \
python3 python3-mako python3-pip python3-setuptools \
python3-virtualenv python3-yaml
spksrc userspksrc user into the LXC container. Such user needs to be created into the default container image:lxc exec spksrc -- /usr/sbin/adduser --uid 1001 spksrc
lxc exec spksrc --user 1001 -- cp /etc/skel/.profile /etc/skel/.bashrc ~spksrc/.
From there you can connect to your container as spksrc and follow the instructions in the Developer Guide.
lxc exec spksrc -- su --login spksrc
spksrc@spksrc:~$
spksrc userYou can create a shared user between your Debian/Ubuntu host and the LXC Debian container which simplifies greatly file management between the two. The following assumes you already created a user spksrc with uid 1001 in your Debian/Ubuntu host environment and that you whish to share its /home userspace.
lxc config set spksrc raw.idmap "both 1001 1001"
lxc restart spksrc
Remapping container filesystem
/home/spksrc from the host to the LXC container:lxc config device add spksrc home disk path=/home/spksrc source=/home/spksrc
Device home added to spksrc
spksrc user:lxc exec spksrc -- su --login spksrc
spksrc@spksrc:~$
The following assume you have a running proxy on your LAN setup at IP 192.168.1.1 listening on port 3128 that will allow caching files.
lxc config set spksrc environment.http_proxy http://192.168.1.1:3128
lxc config set spksrc environment.https_proxy http://192.168.1.1:3128
wget in the spksrc container user account:lxc exec spksrc --user $(id -u spksrc) -- bash -c "cat << EOF > ~spksrc/.wgetrc
use_proxy = on
http_proxy = http://192.168.1.1:3128/
https_proxy = http://192.168.1.1:3128/
ftp_proxy = http://192.168.1.1:3128/
EOF"
Once you have a development environment set up, you can start building packages, create new ones, or improve upon existing packages while making your changes available to other people. See the Developer Guide for information on how to use spksrc.
When not explicitly set, files are placed under a 3 clause BSD license
96 followers · starred Feb 2024
1,274 followers · starred Dec 2014
34 followers · starred May 2021
223 followers · starred Jan 2016