Skip to content
Snippets Groups Projects
Verified Commit a97ad117 authored by Anna Wilcox's avatar Anna Wilcox :fox:
Browse files

user/avahi: New package

parent 1786fe3b
No related branches found
No related tags found
No related merge requests found
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=avahi
pkgver=0.8
pkgrel=0
pkgdesc="Local network service discovery library"
url="https://avahi.org/"
arch="all"
license="LGPL-2.1+"
depends=""
makedepends="dbus-dev expat-dev glib-dev gobject-introspection-dev
gtk+3.0-dev libdaemon-dev libevent-dev qt5-qtbase-dev doxygen
py3-dbus-python py3-pygobject-dev"
pkgusers="avahi avahi-autoipd"
pkggroups="avahi avahi-autoipd"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc
$pkgname-gtk3 $pkgname-py3 $pkgname-qt5"
install="$pkgname.pre-install $pkgname.pre-upgrade"
source="https://avahi.org/download/avahi-$pkgver.tar.gz
build-db
"
prepare() {
default_prepare
# Missing from release tarballs:
# https://github.com/lathiat/avahi/pull/281
mv "$srcdir"/build-db "$builddir"/service-type-database/
}
build() {
[ "$CBUILD_ARCH" = "$CTARGET_ARCH" ] || \
die "You cannot cross-build Avahi; dbm files are not portable."
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--with-distro=gentoo \
--enable-core-docs \
--disable-mono \
--disable-gdbm
make
}
check() {
make check
}
package() {
make DESTDIR="$pkgdir" install
}
gtk3() {
pkgdesc="$pkgdesc (Gtk+ 3 bindings)"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libavahi*gtk3* "$subpkgdir"/usr/lib/
}
py3() {
pkgdesc="$pkgdesc (Python bindings)"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}
qt5() {
pkgdesc="$pkgdesc (Qt 5 bindings)"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libavahi*qt5* "$subpkgdir"/usr/lib/
}
sha512sums="c6ba76feb6e92f70289f94b3bf12e5f5c66c11628ce0aeb3cadfb72c13a5d1a9bd56d71bdf3072627a76cd103b9b056d9131aa49ffe11fa334c24ab3b596c7de avahi-0.8.tar.gz
60f5cab8417ba1f7ef9b3e30a9f33923fd71a11ae846dda9c29fd0327008821f55f6c77f8ef8442e6dd164d1b777d858cec95c31b7b3bc7f1121417620ca5f08 build-db"
#!/bin/sh
groupadd -r -g 201 avahi 2>/dev/null
groupadd -r -g 202 avahi-autoipd 2>/dev/null
useradd -c "Service Discovery User" -s /sbin/nologin -g avahi \
-d /var/empty -M -N -u 201 2>/dev/null
useradd -c "IPv4LL network address configuration daemon" -s /sbin/nologin \
-g avahi-autoipd -d /var/empty -M -N -u 202 2>/dev/null
exit 0
avahi.pre-install
\ No newline at end of file
#!/usr/bin/env python
# -*-python-*-
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
try:
import anydbm as dbm
except ImportError:
import dbm
import sys
if len(sys.argv) > 1:
infn = sys.argv[1]
else:
infn = "service-types"
if len(sys.argv) > 2:
outfn = sys.argv[2]
else:
outfn = infn + ".db"
db = dbm.open(outfn, "n")
for ln in open(infn, "r"):
ln = ln.strip(" \r\n\t")
if ln == "" or ln.startswith("#"):
continue
t, n = ln.split(":", 1)
db[t.strip()] = n.strip()
db.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment