889a4a8d4f
Fixes http://autobuild.buildroot.net/results/aeb/aeb5481526497a01ada8ee9403f282a2374b0383/ http://autobuild.buildroot.net/results/255/25536df514477f3210caf4af27f2f107683f7fb2/ http://autobuild.buildroot.net/results/fa1/fa11cb360190b02d08e74997b0abc73079760dfa/ and many others This is a follow-up for these patches: http://patchwork.ozlabs.org/patch/493360/ http://patchwork.ozlabs.org/patch/416007/ [Thomas: - don't pass --static to pkg-config, since our pkg-config wrapper already passes it automatically when BR2_STATIC_LIBS=y. - make only one call to pkg-config for all three libraries - put the libintl logic separately from the definition of MINIDLNA_CONF_ENV.] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
50 lines
1.6 KiB
Makefile
50 lines
1.6 KiB
Makefile
################################################################################
|
|
#
|
|
# minidlna
|
|
#
|
|
################################################################################
|
|
|
|
MINIDLNA_VERSION = 1.1.4
|
|
MINIDLNA_SITE = http://downloads.sourceforge.net/project/minidlna/minidlna/$(MINIDLNA_VERSION)
|
|
MINIDLNA_LICENSE = GPLv2 BSD-3c
|
|
MINIDLNA_LICENSE_FILES = COPYING LICENCE.miniupnpd
|
|
|
|
MINIDLNA_DEPENDENCIES = \
|
|
$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-gettext \
|
|
ffmpeg flac libvorbis libogg libid3tag libexif libjpeg sqlite \
|
|
host-xutil_makedepend
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
# the configure script / Makefile forgets to link with some of the dependent
|
|
# libraries breaking static linking, so help it along
|
|
MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libavcodec libexif libvorbis`
|
|
MINIDLNA_STATIC_LIBS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)
|
|
MINIDLNA_CONF_ENV += LIBS="$(MINIDLNA_STATIC_LIBS)"
|
|
else
|
|
MINIDLNA_CONF_OPTS = \
|
|
--disable-static
|
|
endif
|
|
|
|
define MINIDLNA_INSTALL_CONF
|
|
$(INSTALL) -D -m 644 $(@D)/minidlna.conf $(TARGET_DIR)/etc/minidlna.conf
|
|
endef
|
|
|
|
MINIDLNA_POST_INSTALL_TARGET_HOOKS += MINIDLNA_INSTALL_CONF
|
|
|
|
define MINIDLNA_INSTALL_INIT_SYSV
|
|
$(INSTALL) -D -m 0755 package/minidlna/S60minidlnad \
|
|
$(TARGET_DIR)/etc/init.d/S60minidlnad
|
|
endef
|
|
|
|
define MINIDLNA_INSTALL_INIT_SYSTEMD
|
|
$(INSTALL) -D -m 0755 package/minidlna/minidlnad.service \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/minidlnad.service
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -fs ../../../../usr/lib/systemd/system/minidlnad.service \
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/minidlnad.service
|
|
endef
|
|
|
|
$(eval $(autotools-package))
|