packages/multimedia/minidlna/Makefile
Alberto Bursi 154f5b6806 minidlna: add static uuid in config
minidlna uses UUID to uniquely identify the media server
by default, if the "uuid" option is not specified in
its setting file it will try to autogenerate it by
reading MAC address.

This seems to fail on some devices resulting in random
UUID on reboot, and this causes confusion and issues as
for clients this is a new server and must be added to
the list.
In OpenWrt there are also devices where the system can't
read the true MAC address and it is therefore randomized
on reboot.

So, add a static UUID in the settings file.
Since each mindlna server should have a different UUID,
if the user has more than one OpenWrt device with
minidlna, he should change the UUID of the
additional devices.

Signed-off-by: Alberto Bursi <bobafetthotmail@gmail.com>
2019-12-13 11:12:31 +01:00

85 lines
2.3 KiB
Makefile

#
# Copyright (C) 2010-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=minidlna
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.code.sf.net/p/minidlna/git
PKG_SOURCE_DATE:=2018-04-10
PKG_SOURCE_VERSION:=799e6cf505ec470b2bf0ae4118143380aa16b837
PKG_MIRROR_HASH:=67cc817e671de99e5a3f5ed237f89e22470f1de94819bcaba86c0ba821104af5
PKG_LICENSE:=GPL-2.0 BSD-3-Clause
PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
PKG_MAINTAINER:=Knyazkov Dmitry <medavedik@gmail.com>
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=0
PKG_BUILD_DEPENDS:=util-linux
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/minidlna
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE:=UPnP A/V & DLNA Media Server
URL:=http://minidlna.sourceforge.net/
DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg \
+libid3tag +libflac +libvorbis +libuuid \
$(ICONV_DEPENDS) $(INTL_DEPENDS)
USERID:=minidlna:minidlna
endef
define Package/minidlna/description
MiniDLNA (aka ReadyDLNA) is server software with the aim of
being fully compliant with DLNA/UPnP-AV clients.
endef
define Package/minidlna/conffiles
/etc/config/minidlna
endef
TARGET_CPPFLAGS += \
-I$(ICONV_PREFIX)/include \
-I$(INTL_PREFIX)/include \
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
TARGET_LDFLAGS += \
-L$(ICONV_PREFIX)/lib \
-L$(INTL_PREFIX)/lib \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
MAKE_FLAGS +=\
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
ICONV_LIBS="-liconv $(if $(INTL_FULL),-lintl)" \
CONFIGURE_ARGS +=\
--with-libiconv-prefix="$(ICONV_PREFIX)" \
--with-libintl-prefix="$(INTL_PREFIX)" \
--with-os-name="OpenWrt Linux" \
--with-os-version="$(LINUX_VERSION)" \
--with-os-url="http://openwrt.org/" \
--with-db-path="/var/run/minidlna" \
--with-log-path="/var/log" \
define Package/minidlna/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/minidlnad $(1)/usr/bin/minidlna
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/minidlna.init $(1)/etc/init.d/minidlna
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/minidlna.config $(1)/etc/config/minidlna
endef
$(eval $(call BuildPackage,minidlna))