Skip to content

Instantly share code, notes, and snippets.

@ibqn
Last active July 13, 2019 08:22
Show Gist options
  • Save ibqn/90ea1492f79f96c60232207b363b0421 to your computer and use it in GitHub Desktop.
Save ibqn/90ea1492f79f96c60232207b363b0421 to your computer and use it in GitHub Desktop.
Create a deb package for rspamd on armhf (Raspberry Pi)

Install build and runtime dependencies:

git clone --recursive https://github.com/vstakhov/rspamd.git
cd rspamd

For master:

sudo apt install devscripts fakeroot debhelper libcurl4-openssl-dev dh-systemd libjemalloc-dev libunwind-dev ragel libevent-dev lua5.1 liblua5.1-dev cmake sqlite3 libmagic-dev libsqlite3-dev libicu-dev libglib2.0-dev libssl-dev libsodium-dev

Build and create deb package

mkdir build
cd build
cmake ..
make dist
tar xvf rspamd-2.0.tar.xz
cd rspamd-2.0
debuild -uc -us
cd ..
dpkg -i *.deb

For 1.9.4

Replace the corresponding lines in the above snippet

git checkout tags/1.9.4
...
sudo apt install devscripts fakeroot debhelper dh-systemd libjemalloc-dev libunwind-dev cmake ragel libevent-dev lua5.1 liblua5.1-dev libsqlite3-0=3.16.2-5+deb9u1 libsqlite3-dev sqlite3 libmagic1=1:5.30-1+deb9u2 libmagic-dev libfann-dev libfann2 libluajit-5.1-common=2.1.0~beta3+dfsg-5.1~bpo9+1 luajit libluajit-5.1
...
tar xvf rspamd-1.9.4.tar.xz
...

And it runs:

service rspamd status                                                                                                                           ● rspamd.service - rapid spam filtering system
   Loaded: loaded (/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-07-01 16:03:07 UTC; 6s ago                                                                                                                            Docs: https://rspamd.com/doc/
 Main PID: 14799 (rspamd)
    Tasks: 7 (limit: 4915)
   CGroup: /system.slice/rspamd.service

Also marked this package on hold, so apt wont ever replace it with: apt-mark hold rspamd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment