makedepends=(gobject-introspection gtk-doc vala avahi gdk-pixbuf gstreamer-plugins-base libsoup python-setuptools)

description="A library that implements the DMAP family of protocols"
url="https://www.flyn.org/projects/libdmapsharing/index.html"

packager="Grat-OS Team"
maintainer="Grat-OS Team"

name="libdmapsharing"
version="3.9.13"
release=1

source=(https://gitlab.gnome.org/GNOME/libdmapsharing/-/archive/LIBDMAPSHARING_${version//./_}/libdmapsharing-LIBDMAPSHARING_${version//./_}.tar.gz)

build() {
    cd $name-LIBDMAPSHARING_${version//./_}
    NOCONFIGURE=1 ./autogen.sh

    ./configure --prefix=/usr \
                --sysconfdir=/etc \
                --localstatedir=/var \
                --with-mdns=avahi \
                --disable-tests \
                --disable-gtk-doc

    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool;

    make
    make DESTDIR="$PKG" install
}
