core/avahi/PKGBUILD

87 lines
2.6 KiB
Bash
Raw Normal View History

#
2015-01-05 21:54:56 +08:00
# Platform Packages for Chakra, part of chakraos.org
#
2015-01-05 21:54:56 +08:00
# maintainer almack <gluca86 at gmail dot com>
# contributor: Martín González kote[at]chakra-project[dot]org>
2010-03-14 23:48:48 +08:00
pkgname=avahi
2017-10-22 20:39:00 +08:00
pkgver=0.7
pkgrel=1
2010-03-14 23:48:48 +08:00
pkgdesc="A multicast/unicast DNS-SD framework"
arch=('x86_64')
2010-03-14 23:48:48 +08:00
url="http://www.avahi.org/"
license=('LGPL')
2015-01-05 21:54:56 +08:00
depends=('dbus' 'libcap' 'libdaemon' 'gdbm' 'glib2' 'expat')
2011-05-20 00:09:43 +08:00
optdepends=('qt: qt bindings'
'nss-mdns: NSS support for mDNS'
2017-10-22 20:39:00 +08:00
'python3-dbus: avahi-discover'
'python2-twisted: avahi-bookmarks'
'python3-gobject: avahi-discover')
makedepends=('qt' 'python3-dbus' 'gobject-introspection' 'intltool' 'python3-gobject')
2010-03-14 23:48:48 +08:00
backup=(etc/avahi/avahi-daemon.conf etc/avahi/services/{sftp-,}ssh.service)
install=avahi.install
source=("http://www.avahi.org/download/avahi-${pkgver}.tar.gz"
2018-02-05 04:06:51 +08:00
'gnome-nettool.png'
0001-avahi-python-Use-the-agnostic-DBM-interface.patch)
2017-10-22 20:39:00 +08:00
sha1sums=('8a062878968c0f8e083046429647ad33b122542f'
2018-02-05 04:06:51 +08:00
'cf56387c88aed246b9f435efc182ef44de4d52f3'
'641381523c84b470ec8d49a9bb2f5be861fa458f')
2010-03-14 23:48:48 +08:00
2015-01-05 21:54:56 +08:00
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
2018-02-05 04:06:51 +08:00
patch -Np1 -i ../0001-avahi-python-Use-the-agnostic-DBM-interface.patch
NOCONFIGURE=1 ./autogen.sh
2015-01-05 21:54:56 +08:00
}
2010-03-14 23:48:48 +08:00
build() {
cd ${srcdir}/${pkgname}-${pkgver}
2017-10-22 20:39:00 +08:00
export PYTHON=/usr/bin/python3
2010-03-14 23:48:48 +08:00
2011-06-10 00:12:55 +08:00
./configure --prefix=/usr \
2010-03-14 23:48:48 +08:00
--sysconfdir=/etc \
--localstatedir=/var \
2011-06-10 00:12:55 +08:00
--disable-static \
--disable-qt3 \
2011-05-20 00:09:43 +08:00
--enable-qt4 \
--disable-mono \
2010-03-14 23:48:48 +08:00
--disable-monodoc \
--disable-doxygen-doc \
--disable-xmltoman \
2011-05-20 00:09:43 +08:00
--disable-gtk \
--disable-gtk3 \
--disable-pygtk \
2010-03-14 23:48:48 +08:00
--enable-compat-libdns_sd \
--enable-compat-howl \
2011-06-10 00:12:55 +08:00
--with-distro=archlinux \
2010-03-14 23:48:48 +08:00
--with-avahi-priv-access-group=network \
--with-autoipd-user=avahi \
2011-06-10 00:12:55 +08:00
--with-autoipd-group=avahi \
--with-systemdsystemunitdir=/usr/lib/systemd/system
2017-10-22 20:39:00 +08:00
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
cp -a avahi-python/avahi avahi-python/avahi2
2010-03-14 23:48:48 +08:00
2017-10-22 20:39:00 +08:00
make
make -C avahi-python/avahi2 PYTHON=/usr/bin/python2
2011-06-10 00:12:55 +08:00
}
2010-03-14 23:48:48 +08:00
2011-06-10 00:12:55 +08:00
package() {
2015-01-05 21:54:56 +08:00
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
rm -fr "${pkgdir}"/etc/rc.d
2010-03-14 23:48:48 +08:00
# /var/run already provided by filesystem
rm -fr "${pkgdir}"/var
2015-01-05 21:54:56 +08:00
install -D -m 644 ../gnome-nettool.png "${pkgdir}"/usr/share/pixmaps/gnome-nettool.png
2013-05-08 05:07:58 +08:00
2015-01-05 21:54:56 +08:00
cd "${pkgdir}"
sed -i '1c #!/usr/bin/python2' usr/bin/avahi-bookmarks
# howl and mdnsresponder compatability
(cd usr/include; ln -s avahi-compat-libdns_sd/dns_sd.h dns_sd.h; ln -s avahi-compat-howl howl)
(cd usr/lib/pkgconfig; ln -s avahi-compat-howl.pc howl.pc)
ln avahi-daemon.service -s "${pkgdir}"/usr/lib/systemd/system/dbus-org.freedesktop.Avahi.service
2010-03-14 23:48:48 +08:00
}
2011-06-10 00:12:55 +08:00