ein Blog

Build Netatalk 3 on Debian 9

apt install \
    build-essential \
    libevent-dev \
    libssl-dev \
    libgcrypt-dev \
    libkrb5-dev \
    libpam0g-dev \
    libwrap0-dev \
    libdb-dev \
    libtdb-dev \
    libmariadbclient-dev \
    avahi-daemon \
    libavahi-client-dev \
    libacl1-dev \
    libldap2-dev \
    libcrack2-dev \
    systemtap-sdt-dev \
    libdbus-1-dev \
    libdbus-glib-1-dev \
    libglib2.0-dev \
    libio-socket-inet6-perl \
    tracker \
    libtracker-sparql-1.0-dev \
    libtracker-miner-1.0-dev

things like mysql/mariadb can be skipped when not required.

use apt search libtracker to find available versions

download latest netatalk (3.1.11) from sourceforge:

curl -JLO https://sourceforge.net/projects/netatalk/files/latest/download
tar -xvf netatalk-*.tar.bz2
cd netatalk-*/

use ./configure --help to see available options. Set options for mysql/mariadb etc appropriately when installation was skipped above.

./configure \
    --with-init-style=debian-systemd \
    --without-libevent \
    --without-tdb \
    --with-cracklib \
    --enable-krbV-uam \
    --with-pam-confdir=/etc/pam.d \
    --with-dbus-daemon=/usr/bin/dbus-daemon \
    --with-dbus-sysconf-dir=/etc/dbus-1/system.d \
    --with-tracker-pkgconfig-version=1.0

remember to set tracker version according to the installed version above. (pkg-config --list-all | grep tracker)

use --with-init-style=debian-sysv if you don't want to use systemd for whatever reason.

Configure summary:
    INIT STYLE:
         debian-systemd
    AFP:
         Extended Attributes: ad | sys
         ACL support: yes
         Spotlight: yes
    CNID:
         backends:  dbd last tdb mysql
    UAMS:
         DHX     (PAM SHADOW)
         DHX2    (PAM SHADOW)
         RANDNUM (afppasswd)
         Kerberos V
         clrtxt  (PAM SHADOW)
         guest
    Options:
         Zeroconf support:        yes
         tcp wrapper support:     yes
         quota support:           yes
         valid shell check:       yes
         cracklib support:        yes
         ACL support:             auto
         Kerberos support:        yes
         LDAP support:            yes
         AFP stats via dbus:      yes
         dtrace probes:           yes
    Paths:
         Netatalk lockfile:       /var/lock/netatalk
         init directory:          /lib/systemd/system
         dbus system directory:   /etc/dbus-1/system.d
         dbus daemon path:        /usr/bin/dbus-daemon
         tracker prefix:          /usr
         tracker install prefix:  /usr
         tracker manager:         /usr/bin/tracker daemon
         pam config directory:    /etc/pam.d
    Documentation:
         Docbook:                 no

check summary if everything what you need is enabled.

make && make install
systemctl daemon-reload
systemctl status netatalk.service

edit config file in /usr/local/etc/afp.conf and:

systemctl enable netatalk
systemctl enable avahi-daemon
systemctl start netatalk
systemctl start avahi-daemon

(see http://netatalk.sourceforge.net/wiki/index.php/Install_Netatalk_3.1.11_on_Debian_9_Stretch)