From 6fb0cada6fd5f3c709a2b7c5fa7e724dad739362 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Mon, 29 Dec 2008 12:20:46 +0100 Subject: [PATCH] Add ushare package and libdlna --- config/rootfiles/packages/libdlna | 6 ++ config/rootfiles/packages/ushare | 14 +++ doc/packages-list.txt | 9 +- lfs/initscripts | 3 + lfs/libdlna | 85 ++++++++++++++++++ lfs/ushare | 87 +++++++++++++++++++ make.sh | 3 +- src/initscripts/init.d/ushare | 51 +++++++++++ .../libdlna-0.2.3-ffmpeg_not_found.patch | 65 ++++++++++++++ 9 files changed, 318 insertions(+), 5 deletions(-) create mode 100644 config/rootfiles/packages/libdlna create mode 100644 config/rootfiles/packages/ushare create mode 100644 lfs/libdlna create mode 100644 lfs/ushare create mode 100644 src/initscripts/init.d/ushare create mode 100644 src/patches/libdlna-0.2.3-ffmpeg_not_found.patch diff --git a/config/rootfiles/packages/libdlna b/config/rootfiles/packages/libdlna new file mode 100644 index 0000000000..7a606d8516 --- /dev/null +++ b/config/rootfiles/packages/libdlna @@ -0,0 +1,6 @@ +#usr/include/dlna.h +#usr/lib/libdlna.a +usr/lib/libdlna.so +usr/lib/libdlna.so.0 +usr/lib/libdlna.so.0.2.3 +#usr/lib/pkgconfig/libdlna.pc diff --git a/config/rootfiles/packages/ushare b/config/rootfiles/packages/ushare new file mode 100644 index 0000000000..0f8e1a0e3f --- /dev/null +++ b/config/rootfiles/packages/ushare @@ -0,0 +1,14 @@ +usr/bin/ushare +#usr/etc/init.d +#usr/etc/init.d/ushare +#usr/etc/ushare.conf +var/mp3/info +var/video/info +etc/rc.d/init.d/ushare +etc/rc.d/rc0.d/K02ushare +etc/rc.d/rc6.d/K02ushare +etc/rc.d/rc3.d/S98ushare +#usr/share/locale/de/LC_MESSAGES/ushare.mo +#usr/share/locale/fr/LC_MESSAGES/ushare.mo +#var/video + diff --git a/doc/packages-list.txt b/doc/packages-list.txt index 7c8f6b68f5..d58bd73ddf 100644 --- a/doc/packages-list.txt +++ b/doc/packages-list.txt @@ -126,7 +126,7 @@ * hostapd-0.5.11 * hplip-2.7.10 * htop-0.8.1 -* httpd-2.2.10 +* httpd-2.2.11 * hwdata * iana-etc-2.10 * icecast-2.3.1 @@ -153,6 +153,7 @@ * libaal-1.0.5 * libart_lgpl-2.3.17 * libcap-1.10 +* libdlna-0.2.3 * libdvbpsi5-0.1.6 * libid3tag-0.15.1b * libidn-0.6.14 @@ -167,7 +168,7 @@ * libsigc++-2.0.17 * libtool-1.5.22 * libtorrent-0.11.9 -* libupnp-1.3.1 +* libupnp-1.6.6 * libusb-0.1.12 * libvorbis-1.2.0 * libwww-perl-5.803 @@ -176,7 +177,6 @@ * linux-2.6.25.19 * linux-atm-2.4.1 * linux-libc-headers-2.6.12.0 -* linuxigd-0.95 * lm_sensors-3.0.3 * logrotate-3.7.1 * logwatch-7.3.6 @@ -271,7 +271,7 @@ * squashfs3.4 * squid-2.7.STABLE5 * squidGuard-1.3 -* squidclamav-3.8 +* squidclamav-3.9 * sshfs-fuse-2.2 * streamripper-1.63.5 * sudo-1.6.8p12 @@ -296,6 +296,7 @@ * unzip552 * urlgrabber-3.1.0 * usbutils-0.72 +* ushare-1.1a * util-linux-2.12r * v4l-dvb-e9a442d3b53a-kmod-2.6.25.19 * vdr-1.6.0 diff --git a/lfs/initscripts b/lfs/initscripts index 345a122e60..5d0f754061 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -132,6 +132,9 @@ $(TARGET) : ln -sf ../init.d/tmpfs /etc/rc.d/rc0.d/K85tmpfs ln -sf ../init.d/tmpfs /etc/rc.d/rc3.d/S01tmpfs ln -sf ../init.d/tmpfs /etc/rc.d/rc6.d/K85tmpfs + ln -sf ../init.d/ushare /etc/rc.d/rc3.d/S98ushare + ln -sf ../init.d/ushare /etc/rc.d/rc0.d/K02ushare + ln -sf ../init.d/ushare /etc/rc.d/rc6.d/K02ushare ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs ln -sf ../init.d/modules /etc/rc.d/rcsysinit.d/S05modules diff --git a/lfs/libdlna b/lfs/libdlna new file mode 100644 index 0000000000..5b17440806 --- /dev/null +++ b/lfs/libdlna @@ -0,0 +1,85 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 0.2.3 + +THISAPP = libdlna-$(VER) +DL_FILE = $(THISAPP).tar.bz2 +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = libdlna +PAK_VER = 1 + +DEPS = "libupnp ffmpeg" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 2c974f95b711e5fd07f78fc4ebfcca66 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libdlna-0.2.3-ffmpeg_not_found.patch + cd $(DIR_APP) && ./configure --prefix=/usr + cd $(DIR_APP) && make + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/lfs/ushare b/lfs/ushare new file mode 100644 index 0000000000..259ac5ea5c --- /dev/null +++ b/lfs/ushare @@ -0,0 +1,87 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 1.1a + +THISAPP = ushare-$(VER) +DL_FILE = $(THISAPP).tar.bz2 +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = ushare +PAK_VER = 1 + +DEPS = "libdlna libupnp" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 5bbcdbf1ff85a9710fa3d4e82ccaa251 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure --prefix='/usr' --enable-dlna + cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) + cd $(DIR_APP) && make install + -mkdir -p /var/mp3 /var/video + echo Folder for media files > /var/video/info + echo Folder for music files > /var/mp3/info + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index 36fd5a051a..d8327c3fbd 100755 --- a/make.sh +++ b/make.sh @@ -406,7 +406,6 @@ buildipfire() { ipfiremake whatmask ipfiremake iptables ipfiremake libupnp - ipfiremake linux-igd ipfiremake ipaddr ipfiremake iptstate ipfiremake iputils @@ -586,6 +585,8 @@ buildipfire() { ipfiremake splix ipfiremake streamripper ipfiremake sshfs + ipfiremake libdlna + ipfiremake ushare echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild echo >> $BASEDIR/build/var/ipfire/firebuild diff --git a/src/initscripts/init.d/ushare b/src/initscripts/init.d/ushare new file mode 100644 index 0000000000..487642702b --- /dev/null +++ b/src/initscripts/init.d/ushare @@ -0,0 +1,51 @@ +#!/bin/sh +######################################################################## +# Begin $rc_base/init.d/ +# +# Description : ushare initscript +# +# Authors : Arne Fitzenreiter +# +# Version : 01.00 +# +# Notes : for www.ipfire.org - GPLv3 +# +######################################################################## + +. /etc/sysconfig/rc +. ${rc_functions} + +case "$1" in + start) + boot_mesg "Starting uShare uPnP Mediaserver..." + route add -net 239.0.0.0 netmask 255.0.0.0 green0 + loadproc sudo -u nobody /usr/bin/ushare -n $(hostname -f) \ + -i green0 --no-web --no-telnet \ + -c /var/mp3 -c /var/video -D > /dev/null 2>&1 + evaluate_retval + ;; + + stop) + boot_mesg "Stopping uShare uPnP Mediaserver..." + killproc /usr/bin/ushare + evaluate_retval + route del -net 239.0.0.0 netmask 255.0.0.0 green0 + ;; + + restart) + ${0} stop + sleep 1 + ${0} start + + ;; + status) + statusproc + ;; + + *) + echo "Usage: ${0} {start|stop|reload|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/ diff --git a/src/patches/libdlna-0.2.3-ffmpeg_not_found.patch b/src/patches/libdlna-0.2.3-ffmpeg_not_found.patch new file mode 100644 index 0000000000..46c8301687 --- /dev/null +++ b/src/patches/libdlna-0.2.3-ffmpeg_not_found.patch @@ -0,0 +1,65 @@ +diff -Naur libdlna-0.2.3.org/configure libdlna-0.2.3/configure +--- libdlna-0.2.3.org/configure 2007-11-26 21:47:43.000000000 +0100 ++++ libdlna-0.2.3/configure 2008-12-27 22:22:18.000000000 +0100 +@@ -610,9 +610,9 @@ + fi + + echolog "Checking for libavformat ..." +-check_lib ffmpeg/avformat.h av_register_all -lavformat || die "Error, can't find libavformat !" ++check_lib libavformat/avformat.h av_register_all -lavformat || die "Error, can't find libavformat !" + echolog "Checking for libavcodec ..." +-check_lib ffmpeg/avcodec.h avcodec_register_all -lavcodec || die "Error, can't find libavcodec !" ++check_lib libavcodec/avcodec.h avcodec_register_all -lavcodec || die "Error, can't find libavcodec !" + + ################################################# + # version +diff -Naur libdlna-0.2.3.org/src/av_mpeg4_part10.c libdlna-0.2.3/src/av_mpeg4_part10.c +--- libdlna-0.2.3.org/src/av_mpeg4_part10.c 2007-11-26 21:47:43.000000000 +0100 ++++ libdlna-0.2.3/src/av_mpeg4_part10.c 2008-12-27 22:23:12.000000000 +0100 +@@ -26,7 +26,7 @@ + #include + #include + +-#include ++#include + + #include "dlna_internals.h" + #include "profiles.h" +diff -Naur libdlna-0.2.3.org/src/av_mpeg4_part2.c libdlna-0.2.3/src/av_mpeg4_part2.c +--- libdlna-0.2.3.org/src/av_mpeg4_part2.c 2007-11-26 21:47:43.000000000 +0100 ++++ libdlna-0.2.3/src/av_mpeg4_part2.c 2008-12-27 22:23:25.000000000 +0100 +@@ -26,7 +26,7 @@ + #include + #include + +-#include ++#include + + #include "dlna_internals.h" + #include "profiles.h" +diff -Naur libdlna-0.2.3.org/src/containers.c libdlna-0.2.3/src/containers.c +--- libdlna-0.2.3.org/src/containers.c 2007-11-26 21:47:43.000000000 +0100 ++++ libdlna-0.2.3/src/containers.c 2008-12-27 22:23:47.000000000 +0100 +@@ -4,7 +4,7 @@ + #include + #include + +-#include ++#include + + #include "containers.h" + #include "profiles.h" +diff -Naur libdlna-0.2.3.org/src/profiles.h libdlna-0.2.3/src/profiles.h +--- libdlna-0.2.3.org/src/profiles.h 2007-11-26 21:47:43.000000000 +0100 ++++ libdlna-0.2.3/src/profiles.h 2008-12-27 22:24:47.000000000 +0100 +@@ -22,8 +22,8 @@ + #ifndef _PROFILES_H_ + #define _PROFILES_H_ + +-#include +-#include ++#include ++#include + + #include "dlna_internals.h" + #include "containers.h" -- 2.39.2