aboutsummaryrefslogtreecommitdiff
path: root/base/avahi/avahi.build
diff options
context:
space:
mode:
authorDeposite Pirate2018-09-16 18:48:36 +0200
committerDeposite Pirate2018-09-16 18:48:36 +0200
commitd150a5f3e462fa7fe194a805a4aa0076f4d03ab9 (patch)
treece5e44d69c5f3175bfdbd1e3717b52c5dcca5638 /base/avahi/avahi.build
parentf29d3519ce073ec30f99754d93304324f7f26d65 (diff)
Add ports.
Diffstat (limited to 'base/avahi/avahi.build')
-rwxr-xr-xbase/avahi/avahi.build186
1 files changed, 186 insertions, 0 deletions
diff --git a/base/avahi/avahi.build b/base/avahi/avahi.build
new file mode 100755
index 0000000..4ce55b7
--- /dev/null
+++ b/base/avahi/avahi.build
@@ -0,0 +1,186 @@
+#!/bin/bash
+#
+# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd>
+
+source /usr/src/ports/Build/build.sh
+
+NAME=avahi
+VERSION=0.6.31
+BUILD=2
+DEPENDS=('libdaemon >= 0.14-1' 'expat >= 2.1.0-1' 'gdbm >= 1.10-1')
+
+# Description
+
+cat > ${PKG}/install/slack-desc <<EOF
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+$(padd)|-----handy-ruler------------------------------------------------------|
+${NAME}: avahi
+${NAME}:
+${NAME}: A free Zeroconf implementation, including a system for multicast
+${NAME}: DNS/DNS-SD service discovery. It allows programs to publish and
+${NAME}: discover services and hosts running on a local network with no
+${NAME}: specific configuration. For example, a user can plug their computer
+${NAME}: into a network and Avahi automatically finds printers to print to,
+${NAME}: files to look at and people to talk to, as well as advertising the
+${NAME}: network services running on the machine.
+${NAME}:
+${NAME}: Homepage: http://avahi.org
+EOF
+
+cat >> ${PKG}/install/doinst.sh <<EOF
+#!/bin/sh
+
+config() {
+ NEW="\$1"
+ OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/rc.d/rc.avahidaemon.new
+config etc/rc.d/rc.avahidnsconfd.new
+config etc/avahi/avahi-daemon.conf.new
+config etc/mdns.allow.new
+
+# If the avahi users/groups don't exist add them
+
+if grep "^avahi:x:" etc/passwd 1> /dev/null 2> /dev/null ; then
+ true
+else
+ echo "avahi:x:61:61:avahi:/:/bin/false" >> etc/passwd
+fi
+if grep "^avahi::" etc/group 1> /dev/null 2> /dev/null ; then
+ true
+else
+ echo "avahi::61:avahi" >> etc/group
+fi
+if grep "^avahi:" etc/shadow 1> /dev/null 2> /dev/null ; then
+ true
+else
+ echo "avahi:*:9797:0:::::" >> etc/shadow
+fi
+
+if grep "^autoipd:x:" etc/passwd 1> /dev/null 2> /dev/null ; then
+ true
+else
+ echo "autoipd:x:62:62:autoipd:/:/bin/false" >> etc/passwd
+fi
+if grep "^autoipd::" etc/group 1> /dev/null 2> /dev/null ; then
+ true
+else
+ echo "autoipd::62:autoipd" >> etc/group
+fi
+if grep "^autoipd:" etc/shadow 1> /dev/null 2> /dev/null ; then
+ true
+else
+ echo "autoipd:*:9797:0:::::" >> etc/shadow
+fi
+EOF
+
+# Sources
+
+SRCNAME[0]=${NAME}
+SRCVERS[0]=${VERSION}
+SRCPACK[0]=http://avahi.org/download/${SRCNAME[0]}-${SRCVERS[0]}.tar.gz
+SRCCOPY[0]="LGPL21"
+
+build0()
+{
+sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.{am,in}
+CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
+./configure \
+ --build="${ARCH}-slackware-linux" \
+ --disable-dependency-tracking \
+ --disable-silent-rules \
+ --enable-static=no \
+ --enable-shared=yes \
+ --enable-introspection=no \
+ --prefix="${SYS_DIR[usr]}" \
+ --mandir="${SYS_DIR[man]}" \
+ --sysconfdir="${SYS_DIR[etc]}" \
+ --libdir="${SYS_DIR[lib]}" \
+ --localstatedir="${SYS_DIR[var]}" \
+ --disable-qt3 \
+ --disable-qt4 \
+ --disable-python \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-mono \
+ --disable-monodoc \
+ --with-distro=slackware \
+ --with-systemdsystemunitdir="${SYS_DIR[systemdsystemunitdir]}" \
+ --with-xml=expat \
+ --with-avahi-user=avahi \
+ --with-avahi-group=avahi \
+ --with-autoipd-user=autoipd \
+ --with-autoipd-group=autoipd \
+ --with-avahi-priv-access-group=netdev
+make ${JOBS}
+make install DESTDIR="${PKG}"
+install.cfg mdns.allow.new ${PKG}${SYS_DIR[etc]}
+for manpage in \
+ avahi-browse-domains avahi-publish-address avahi-publish-service \
+ avahi-resolve-address avahi-resolve-host-name bvnc; do
+ rm -f ${PKG}${SYS_DIR[man]}/man?/${manpage}.?
+done
+(
+ cd ${PKG}${SYS_DIR[man]}/man1
+ echo ".so man/man1/avahi-browse.1" > avahi-browse-domains.1
+ echo ".so man/man1/avahi-publish.1" > avahi-publish-address.1
+ echo ".so man/man1/avahi-publish.1" > avahi-publish-service.1
+ echo ".so man/man1/avahi-resolve.1" > avahi-resolve-address.1
+ echo ".so man/man1/avahi-resolve.1" > avahi-resolve-host-name.1
+ echo ".so man/man1/bssh.1" > bvnc.1
+)
+config ${PKG}${SYS_DIR[etc]}/rc.d/rc.avahidaemon
+config ${PKG}${SYS_DIR[etc]}/rc.d/rc.avahidnsconfd
+config ${PKG}${SYS_DIR[etc]}/avahi/avahi-daemon.conf
+rm -rf \
+ ${PKG}${SYS_DIR[var]} \
+ ${PKG}${SYS_DIR[lib]}/avahi
+}
+
+SRCNAME[1]=nss-mdns
+SRCVERS[1]=0.10
+SRCPACK[1]=http://0pointer.de/lennart/projects/${SRCNAME[1]}/${SRCNAME[1]}-${SRCVERS[1]}.tar.gz
+SRCCOPY[1]="LGPL21"
+
+build1()
+{
+CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
+./configure \
+ --build="${ARCH}-slackware-linux" \
+ --disable-dependency-tracking \
+ --enable-static=no \
+ --enable-shared=yes \
+ --prefix="${SYS_DIR[usr]}" \
+ --mandir="${SYS_DIR[man]}" \
+ --sysconfdir="${SYS_DIR[etc]}" \
+ --libdir="${SYS_DIR[lib]}" \
+ --localstatedir="${SYS_DIR[var]}" \
+ --disable-lynx \
+ --enable-avahi
+make ${JOBS} V=1
+make install DESTDIR="${PKG}"
+doc README
+#FIXME: compat
+(
+ install.dir ${PKG}/lib64
+ cd ${PKG}/lib64
+ for link in libnss_mdns{4,6,,_minimal,{4,6}_minimal}.so.2; do
+ ln -sf ${SYS_DIR[lib]}/${link}
+ done
+)
+}