mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 12:54:36 +08:00
87 lines
2.6 KiB
Bash
87 lines
2.6 KiB
Bash
#
|
|
# Platform Packages for Chakra, part of chakraos.org
|
|
#
|
|
# maintainer almack <gluca86 at gmail dot com>
|
|
# contributor: Martín González kote[at]chakra-project[dot]org>
|
|
|
|
pkgname=avahi
|
|
pkgver=0.7
|
|
pkgrel=1
|
|
pkgdesc="A multicast/unicast DNS-SD framework"
|
|
arch=('x86_64')
|
|
url="http://www.avahi.org/"
|
|
license=('LGPL')
|
|
depends=('dbus' 'libcap' 'libdaemon' 'gdbm' 'glib2' 'expat')
|
|
optdepends=('qt: qt bindings'
|
|
'nss-mdns: NSS support for mDNS'
|
|
'python3-dbus: avahi-discover'
|
|
'python2-twisted: avahi-bookmarks'
|
|
'python3-gobject: avahi-discover')
|
|
makedepends=('qt' 'python3-dbus' 'gobject-introspection' 'intltool' 'python3-gobject')
|
|
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"
|
|
'gnome-nettool.png'
|
|
0001-avahi-python-Use-the-agnostic-DBM-interface.patch)
|
|
sha1sums=('8a062878968c0f8e083046429647ad33b122542f'
|
|
'cf56387c88aed246b9f435efc182ef44de4d52f3'
|
|
'641381523c84b470ec8d49a9bb2f5be861fa458f')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
patch -Np1 -i ../0001-avahi-python-Use-the-agnostic-DBM-interface.patch
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
}
|
|
|
|
build() {
|
|
cd ${srcdir}/${pkgname}-${pkgver}
|
|
export PYTHON=/usr/bin/python3
|
|
|
|
./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--disable-static \
|
|
--disable-qt3 \
|
|
--enable-qt4 \
|
|
--disable-mono \
|
|
--disable-monodoc \
|
|
--disable-doxygen-doc \
|
|
--disable-xmltoman \
|
|
--disable-gtk \
|
|
--disable-gtk3 \
|
|
--disable-pygtk \
|
|
--enable-compat-libdns_sd \
|
|
--enable-compat-howl \
|
|
--with-distro=archlinux \
|
|
--with-avahi-priv-access-group=network \
|
|
--with-autoipd-user=avahi \
|
|
--with-autoipd-group=avahi \
|
|
--with-systemdsystemunitdir=/usr/lib/systemd/system
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
|
|
cp -a avahi-python/avahi avahi-python/avahi2
|
|
|
|
make
|
|
make -C avahi-python/avahi2 PYTHON=/usr/bin/python2
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
make DESTDIR="${pkgdir}" install
|
|
rm -fr "${pkgdir}"/etc/rc.d
|
|
|
|
# /var/run already provided by filesystem
|
|
rm -fr "${pkgdir}"/var
|
|
|
|
install -D -m 644 ../gnome-nettool.png "${pkgdir}"/usr/share/pixmaps/gnome-nettool.png
|
|
|
|
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
|
|
}
|
|
|