build: Add buildroot packaging for static build

This commit is contained in:
Justin Maggard 2022-02-11 00:37:42 -08:00
parent 45a0b5fd56
commit cfb775682b
7 changed files with 99 additions and 0 deletions

1
buildroot/Config.in Normal file
View File

@ -0,0 +1 @@
source "$BR2_EXTERNAL_READYMEDIA_PATH/readymedia/Config.in"

13
buildroot/build-static.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash -e
if [ $# -ne 1 ]; then
echo "Usage: $0 <BUILDROOT_PATH>"
exit 1
fi
BUILDROOT_DIR=$1
BR2_DEFCONFIG=$(realpath readymedia_defconfig)
export BR2_EXTERNAL=$(realpath .)
cd $BUILDROOT_DIR
make O=output-readymedia defconfig BR2_DEFCONFIG=${BR2_DEFCONFIG}
make O=output-readymedia
echo -e "\n\nStatic binary built in $(realpath output/target/usr/sbin/minidlnad)"
ls -lh $(realpath output/target/usr/sbin/minidlnad)

2
buildroot/external.desc Normal file
View File

@ -0,0 +1,2 @@
name: READYMEDIA
desc: ReadyMedia external tree

1
buildroot/external.mk Normal file
View File

@ -0,0 +1 @@
include $(sort $(wildcard $(BR2_EXTERNAL_READYMEDIA_PATH)/*/*.mk))

View File

@ -0,0 +1,24 @@
config BR2_PACKAGE_READYMEDIA
bool "readymedia"
depends on BR2_USE_WCHAR # flac
depends on BR2_USE_MMU # fork
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
select BR2_PACKAGE_FFMPEG
select BR2_PACKAGE_FLAC
select BR2_PACKAGE_LIBVORBIS # selects libogg
select BR2_PACKAGE_LIBOGG
select BR2_PACKAGE_LIBID3TAG # selects zlib
select BR2_PACKAGE_LIBEXIF
select BR2_PACKAGE_JPEG
select BR2_PACKAGE_SQLITE
help
MiniDLNA (aka ReadyDLNA) is server software with the aim of
being fully compliant with DLNA/UPnP-AV clients.
http://minidlna.sourceforge.net/
comment "readymedia needs a toolchain w/ threads, wchar"
depends on BR2_USE_MMU
depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR

View File

@ -0,0 +1,30 @@
################################################################################
#
# readymedia
#
################################################################################
READYMEDIA_VERSION = v1_3_1
READYMEDIA_SITE = https://git.code.sf.net/p/minidlna/git
READYMEDIA_SITE_METHOD = git
READYMEDIA_LICENSE = GPL-2.0, BSD-3-Clause
READYMEDIA_LICENSE_FILES = COPYING LICENCE.miniupnpd
READYMEDIA_CPE_ID_VENDOR = readymedia_project
READYMEDIA_CPE_ID_PRODUCT = readymedia
READYMEDIA_DEPENDENCIES = \
$(TARGET_NLS_DEPENDENCIES) \
ffmpeg flac libvorbis libogg libid3tag libexif jpeg sqlite \
host-xutil_makedepend
READYMEDIA_CONF_OPTS = \
--enable-static \
--enable-tivo \
--enable-lto
define READYMEDIA_RUN_AUTOGEN
cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
endef
READYMEDIA_PRE_CONFIGURE_HOOKS = READYMEDIA_RUN_AUTOGEN
$(eval $(autotools-package))

View File

@ -0,0 +1,28 @@
BR2_SHARED_STATIC_LIBS=y
BR2_TOOLCHAIN_BUILDROOT_VENDOR="readymedia"
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="2.6.32"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD=y
BR2_BINUTILS_VERSION_2_37_X=y
BR2_GCC_VERSION_11_X=y
BR2_GCC_ENABLE_LTO=y
BR2_TARGET_GENERIC_HOSTNAME="readymedia"
BR2_INIT_NONE=y
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
# BR2_TARGET_GENERIC_GETTY is not set
# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_FFMPEG_ENCODERS=""
BR2_PACKAGE_FFMPEG_DECODERS="aac alac eac3 flac flv h264 mp3 mpeg2video mpeg4 pcm_s16be pcm_s16le vorbis wmalossless wmapro wmav1 wmav2"
BR2_PACKAGE_FFMPEG_MUXERS=""
BR2_PACKAGE_FFMPEG_DEMUXERS="aac ac3 aiff asf avi dts dv eac3 flac flv h261 h263 h264 matroska mjpeg mov m4v mp3 mpegps mpegts mpegtsraw mpegvideo ogg vc1 wav"
BR2_PACKAGE_FFMPEG_PARSERS="aac ac3 dvbsub dvdsub flac h261 h263 h264 mjpeg mlp mpeg4video mpegaudio mpegvideo vc1 vorbis vp3 vp8"
BR2_PACKAGE_FFMPEG_BSFS=""
BR2_PACKAGE_FFMPEG_PROTOCOLS="file"
BR2_PACKAGE_FFMPEG_FILTERS=""
# BR2_PACKAGE_FFMPEG_INDEVS is not set
# BR2_PACKAGE_FFMPEG_OUTDEVS is not set
BR2_PACKAGE_FFMPEG_EXTRACONF="--enable-small --disable-pic --disable-avfilter --disable-libvorbis --disable-network --disable-muxer=ogg"
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
BR2_PACKAGE_READYMEDIA=y