#Packager: Dimitris Tzemos pkgname=avahi pkgver=0.8 pkgrel=2dj source=("https://github.com/lathiat/avahi/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz" "README.Slackware" "avahi-discover.1" "bssh.1" "build-db" "fixup_avahi-dnsconfd.action.patch" "ipv6_race_condition_fix.patch") docs=("LICENSE" "README.Slackware") url=http://avahi.org options=('noautodotnew') dotnew=('/etc/avahi/avahi-dnsconfd.action' '/etc/avahi/avahi-daemon.conf' '/etc/avahi/hosts' '/etc/avahi/services/sftp-ssh.service' '/etc/avahi/services/ssh.service') slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "avahi (service discovery aka zeroconf)" "Avahi is an Implementation the DNS Service Discovery and Multicast " "DNS specifications for Zeroconf Computing. It uses D-BUS for " "communication between user applications and a system daemon. The " "daemon is used to coordinate application efforts in caching replies," "necessary to minimize the traffic imposed on networks." "You must have an avahi user and group to run avahi." "Something like this should suffice for most systems: " "# groupadd -g 214 avahi" "# useradd -u 214 -g 214 -c 'Avahi' -d /dev/null -s /bin/false avahi" ) build() { cd $startdir/src/$pkgname-$pkgver #NOCONFIGURE=1 ./autogen.sh warn_accounts() { echo " You must have an avahi user and group to run this script. " echo " Something like this should suffice for most systems: " echo " # groupadd -g 214 avahi" echo " # useradd -u 214 -g 214 -c "Avahi" -d /dev/null -s /bin/false avahi" exit 1 } # Bail if user and/or group isn't valid on your system if ! getent passwd avahi &>/dev/null; then warn_accounts fi if ! getent group avahi &>/dev/null; then warn_accounts fi patch -p1 --verbose < $startdir/src/fixup_avahi-dnsconfd.action.patch || return 1 patch -p1 --verbose < $startdir/src/ipv6_race_condition_fix.patch || return 1 # thanks, LFS # Okay, I had to cheat a bit on the manual pages; there's a commit # in git that will fix this, so I just built a git checkout, grabbed # the built manual pages, and we'll drop them into place so the build # will work for this released version... cat $startdir/src/build-db > service-type-database/build-db chmod 0755 service-type-database/build-db cat $startdir/src/bssh.1 > man/bssh.1 cat $startdir/src/avahi-discover.1 > man/avahi-discover.1 ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --docdir=/usr/doc/$pkgname-$pkgver \ --with-systemdsystemunitdir=no \ --enable-tests \ --disable-static \ --disable-monodoc \ --disable-autoipd \ --enable-python-dbus \ --enable-glib \ --enable-dbus \ --enable-python \ --enable-gtk \ --enable-gtk3 \ --disable-qt5 \ --disable-qt4 \ --disable-qt3 \ --enable-core-docs \ --enable-compat-libdns_sd \ --with-dbus-sys=/usr/share/dbus-1/system.d \ --with-avahi-user=avahi \ --with-avahi-group=avahi \ --with-avahi-priv-access-group=netdev \ --with-distro=slackware \ --program-prefix= \ --program-suffix= \ --build=$arch-slackware-linux \ --disable-mono make -j $numjobs || return 1 make install DESTDIR=$startdir/pkg mkdir -p $startdir/pkg/etc/rc.d/ || return 1 mkdir -p $startdir/pkg/etc/avahi/ || return 1 mkdir -p $startdir/pkg/etc/dbus-1/system.d/ || return 1 cp $startdir/src/$pkgname-$pkgver/initscript/slackware/rc.avahidaemon $startdir/pkg/etc/rc.d/rc.avahidaemon || return 1 cp $startdir/src/$pkgname-$pkgver/initscript/slackware/rc.avahidnsconfd $startdir/pkg/etc/rc.d/rc.avahidnsconfd || return 1 cp $startdir/src/$pkgname-$pkgver/avahi-daemon/avahi-daemon.conf $startdir/pkg/etc/avahi/avahi-daemon.conf || return 1 cp $startdir/src/$pkgname-$pkgver/avahi-daemon/avahi-dbus.conf $startdir/pkg/etc/dbus-1/system.d/avahi-dbus.conf || return 1 chown -R root:root $startdir/pkg }