Changeset 29081


Ignore:
Timestamp:
2011-11-13T23:16:28+01:00 (5 years ago)
Author:
nico
Message:

packages/minidlna: various changes:

  • fix "invasive" patches (those introducing a STAGING_DIR var into upstream Makefiles)
  • pass proper target OS name/version, not host ones
  • change db path to /var/run/minidlna and log path to /var/log
  • use new service functions
Location:
packages/multimedia/minidlna
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • packages/multimedia/minidlna/Makefile

    r28590 r29081  
    1010PKG_NAME:=minidlna 
    1111PKG_VERSION:=1.0.22 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_src.tar.gz 
     
    1818PKG_BUILD_PARALLEL:=0 
    1919 
     20include $(INCLUDE_DIR)/kernel.mk 
    2021include $(INCLUDE_DIR)/package.mk 
    2122include $(INCLUDE_DIR)/nls.mk 
    22  
    23 MAKE_VARS += \ 
    24         ICONV_PREFIX="$(ICONV_PREFIX)" \ 
    25         INTL_PREFIX="$(INTL_PREFIX)" 
    2623 
    2724define Package/minidlna 
     
    4441endef 
    4542 
     43TARGET_CPPFLAGS += \ 
     44        -I$(STAGING_DIR)/usr/include \ 
     45        -I$(STAGING_DIR)/usr/include/FLAC \ 
     46        -I$(STAGING_DIR)/usr/include/libavcodec \ 
     47        -I$(STAGING_DIR)/usr/include/libavformat \ 
     48        -I$(STAGING_DIR)/usr/include/libavutil \ 
     49        -I$(STAGING_DIR)/usr/include/libexif \ 
     50        -I$(STAGING_DIR)/usr/include/uuid \ 
     51        -I$(STAGING_DIR)/usr/include/vorbis \ 
     52        -I$(ICONV_PREFIX)/include \ 
     53        -I$(INTL_PREFIX)/include \ 
     54        -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \ 
     55 
     56TARGET_LDFLAGS += \ 
     57        -L$(ICONV_PREFIX)/lib \ 
     58        -L$(INTL_PREFIX)/lib \ 
     59        -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ 
     60 
     61MAKE_FLAGS +=\ 
     62        CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ 
     63        LDFLAGS="$(TARGET_LDFLAGS)" \ 
     64        ICONV_LIBS="-liconv" \ 
     65 
     66MAKE_VARS +=\ 
     67        PREFIX="$(STAGING_DIR)/usr" \ 
     68        ICONV_PREFIX="$(ICONV_PREFIX)" \ 
     69        INTL_PREFIX="$(INTL_PREFIX)" \ 
     70        OS_NAME="OpenWrt Linux" \ 
     71        OS_VERSION="$(LINUX_VERSION)" \ 
     72        OS_URL="http://openwrt.org/" \ 
     73        DB_PATH="/var/run/minidlna" \ 
     74        LOG_PATH="/var/log" \ 
     75 
     76 
    4677define Package/minidlna/install 
    4778        $(INSTALL_DIR) $(1)/etc 
  • packages/multimedia/minidlna/files/minidlna.init

    r28034 r29081  
    33 
    44START=50 
    5 BIN=/usr/bin/minidlna 
    6 PID=/var/run/minidlna.pid 
    7 SSD=start-stop-daemon 
     5 
     6SERVICE_USE_PID=1 
    87 
    98start() { 
    10         $SSD -p $PID -S -x $BIN -- -P $PID 
     9        mkdir -m 0755 -p /var/log 
     10        mkdir -m 0755 -p /var/run/minidlna 
     11        service_start /usr/bin/minidlna 
    1112} 
    1213 
    1314stop() { 
    14         $SSD -p $PID -K -s SIGINT 
     15        service_stop /usr/bin/minidlna 
    1516} 
  • packages/multimedia/minidlna/patches/010-genconfig-checks.patch

    r28031 r29081  
    11--- a/genconfig.sh 
    22+++ b/genconfig.sh 
    3 @@ -41,22 +41,22 @@ ${RM} ${CONFIGFILE} 
     3@@ -24,14 +24,18 @@ RM="rm -f" 
     4 CONFIGFILE="config.h" 
     5 CONFIGMACRO="__CONFIG_H__" 
     6  
     7+PREFIX="${PREFIX:-/usr}" 
     8+ICONV_PREFIX="${ICONV_PREFIX:-$PREFIX}" 
     9+INTL_PREFIX="${INTL_PREFIX:-$PREFIX}" 
     10+ 
     11 # Database path 
     12-DB_PATH="/tmp/minidlna" 
     13+DB_PATH="${DB_PATH:-/tmp/minidlna}" 
     14 # Log path 
     15-LOG_PATH="${DB_PATH}" 
     16+LOG_PATH="${LOG_PATH:-$DB_PATH}" 
     17  
     18 # detecting the OS name and version 
     19-OS_NAME=`uname -s` 
     20-OS_VERSION=`uname -r` 
     21+OS_NAME="${OS_NAME:-$(uname -s)}" 
     22+OS_VERSION="${OS_VERSION:-$(uname -r)}" 
     23 TIVO="/*#define TIVO_SUPPORT*/" 
     24 NETGEAR="/*#define NETGEAR*/" 
     25 READYNAS="/*#define READYNAS*/" 
     26@@ -41,22 +45,22 @@ ${RM} ${CONFIGFILE} 
    427  
    528 # Detect if there are missing headers 
     
    2144-  ! -e "/usr/include/libavcodec/avcodec.h" -a \ 
    2245-  ! -e "/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING" 
    23 +[ ! -e "${STAGING_DIR}/usr/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING" 
    24 +[ ! -e "${STAGING_DIR}/usr/include/jpeglib.h" ] && MISSING="libjpeg $MISSING" 
    25 +[ ! -e "${STAGING_DIR}/usr/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING" 
    26 +[ ! -e "${STAGING_DIR}/usr/include/id3tag.h" ] && MISSING="libid3tag $MISSING" 
    27 +[ ! -e "${STAGING_DIR}/usr/include/ogg/ogg.h" ] && MISSING="libogg $MISSING" 
    28 +[ ! -e "${STAGING_DIR}/usr/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING" 
    29 +[ ! -e "${STAGING_DIR}/usr/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING" 
    30 +[ ! -e "${STAGING_DIR}/usr/include/ffmpeg/avutil.h" -a \ 
    31 +  ! -e "${STAGING_DIR}/usr/include/libavutil/avutil.h" -a \ 
    32 +  ! -e "${STAGING_DIR}/usr/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING" 
    33 +[ ! -e "${STAGING_DIR}/usr/include/ffmpeg/avformat.h" -a \ 
    34 +  ! -e "${STAGING_DIR}/usr/include/libavformat/avformat.h" -a \ 
    35 +  ! -e "${STAGING_DIR}/usr/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING" 
    36 +[ ! -e "${STAGING_DIR}/usr/include/ffmpeg/avcodec.h" -a \ 
    37 +  ! -e "${STAGING_DIR}/usr/include/libavcodec/avcodec.h" -a \ 
    38 +  ! -e "${STAGING_DIR}/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING" 
     46+[ ! -e "${PREFIX}/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING" 
     47+[ ! -e "${PREFIX}/include/jpeglib.h" ] && MISSING="libjpeg $MISSING" 
     48+[ ! -e "${PREFIX}/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING" 
     49+[ ! -e "${PREFIX}/include/id3tag.h" ] && MISSING="libid3tag $MISSING" 
     50+[ ! -e "${PREFIX}/include/ogg/ogg.h" ] && MISSING="libogg $MISSING" 
     51+[ ! -e "${PREFIX}/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING" 
     52+[ ! -e "${PREFIX}/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING" 
     53+[ ! -e "${PREFIX}/include/ffmpeg/avutil.h" -a \ 
     54+  ! -e "${PREFIX}/include/libavutil/avutil.h" -a \ 
     55+  ! -e "${PREFIX}/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING" 
     56+[ ! -e "${PREFIX}/include/ffmpeg/avformat.h" -a \ 
     57+  ! -e "${PREFIX}/include/libavformat/avformat.h" -a \ 
     58+  ! -e "${PREFIX}/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING" 
     59+[ ! -e "${PREFIX}/include/ffmpeg/avcodec.h" -a \ 
     60+  ! -e "${PREFIX}/include/libavcodec/avcodec.h" -a \ 
     61+  ! -e "${PREFIX}/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING" 
    3962 if [ -n "$MISSING" ]; then 
    4063        echo -e "\nERROR!  Cannot continue." 
    4164        echo -e "The following required libraries are either missing, or are missing development headers:\n" 
    42 @@ -184,7 +184,7 @@ fi 
     65@@ -152,8 +156,7 @@ case $OS_NAME in 
     66                fi 
     67                ;; 
     68        *) 
     69-               echo "Unknown OS : $OS_NAME" 
     70-               exit 1 
     71+               echo "WARNING: Unknown OS : $OS_NAME" 1>&2 
     72                ;; 
     73 esac 
     74  
     75@@ -184,7 +187,7 @@ fi 
    4376 echo "" >> ${CONFIGFILE} 
    4477  
     
    4982 else 
    5083 echo -e "\nWARNING!!  Iconv support not found.  ID3 tag reading may not work." 
    51 @@ -193,7 +193,7 @@ fi 
     84@@ -193,7 +196,7 @@ fi 
    5285 echo "" >> ${CONFIGFILE} 
    5386  
  • packages/multimedia/minidlna/patches/020-makefile-tweaks.patch

    r26526 r29081  
    11--- a/Makefile 
    22+++ b/Makefile 
    3 @@ -13,9 +13,22 @@ 
     3@@ -10,19 +10,23 @@ 
     4 # or : 
     5 # $ make install 
     6 # 
     7+PREFIX ?= /usr 
     8+ICONV_PREFIX ?= $(PREFIX) 
     9+INTL_PREFIX ?= $(PREFIX) 
    410 #CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG 
    511 #CFLAGS = -Wall -g -Os -D_GNU_SOURCE 
     
    814-        -I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \ 
    915-        -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat 
    10 +        -I$(STAGING_DIR)/usr/include \ 
    11 +        -I$(STAGING_DIR)/usr/include/FLAC \ 
    12 +        -I$(STAGING_DIR)/usr/include/libavcodec \ 
    13 +        -I$(STAGING_DIR)/usr/include/libavformat \ 
    14 +        -I$(STAGING_DIR)/usr/include/libavutil \ 
    15 +        -I$(STAGING_DIR)/usr/include/libexif \ 
    16 +        -I$(STAGING_DIR)/usr/include/uuid \ 
    17 +        -I$(STAGING_DIR)/usr/include/vorbis \ 
    18 +        -I$(ICONV_PREFIX)/include \ 
    19 +        -I$(INTL_PREFIX)/include 
    20 +LDFLAGS = -L$(STAGING_DIR)/usr/lib \ 
    21 +        -L$(ICONV_PREFIX)/lib \ 
    22 +        -L$(INTL_PREFIX)/include \ 
    23 +        -Wl,-rpath=$(STAGING_DIR)/usr/lib \ 
    24 +        -Wl,-rpath-link=$(STAGING_DIR)/usr/lib 
     16+        -I$(PREFIX)/include/ffmpeg \ 
     17+        -I$(PREFIX)/include/libavutil -I$(PREFIX)/include/libavcodec -I$(PREFIX)/include/libavformat \ 
     18+        -I$(PREFIX)/include/ffmpeg/libavutil -I$(PREFIX)/include/ffmpeg/libavcodec -I$(PREFIX)/include/ffmpeg/libavformat 
    2519+ 
    2620 #STATIC_LINKING: CFLAGS += -DSTATIC 
    2721 #STATIC_LINKING: LDFLAGS = -static 
    2822 CC = gcc 
    29 @@ -37,7 +50,7 @@ BASEOBJS = minidlna.o upnphttp.o upnpdes 
     23 RM = rm -f 
     24 INSTALL = install 
     25  
     26-INSTALLPREFIX ?= $(DESTDIR)/usr 
     27+INSTALLPREFIX ?= $(DESTDIR)$(PREFIX) 
     28 SBININSTALLDIR = $(INSTALLPREFIX)/sbin 
     29 ETCINSTALLDIR = $(DESTDIR)/etc 
     30  
     31@@ -37,7 +41,7 @@ BASEOBJS = minidlna.o upnphttp.o upnpdes 
    3032  
    3133 ALLOBJS = $(BASEOBJS) $(LNXOBJS) 
    3234  
    3335-LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis 
    34 +LIBS = -liconv -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis -luuid 
     36+LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis -luuid $(ICONV_LIBS) 
    3537 #STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm 
    3638  
    3739 TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o 
    38 @@ -62,7 +75,7 @@ install:      minidlna 
     40@@ -62,7 +66,7 @@ install:      minidlna 
    3941        $(INSTALL) -d $(ETCINSTALLDIR) 
    4042        $(INSTALL) --mode=0644 minidlna.conf $(ETCINSTALLDIR) 
Note: See TracChangeset for help on using the changeset viewer.