From 7b0c8fc00d7aa892bb15cd7f454cba583a6cb0e3 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 9 Apr 2009 13:36:16 +0000 Subject: [PATCH] [package] add kissdx (#4732) SVN-Revision: 15168 --- multimedia/kissdx/Makefile | 55 +++++++++ multimedia/kissdx/files/kissdx.config | 32 ++++++ multimedia/kissdx/files/kissdx.init | 106 ++++++++++++++++++ .../kissdx/patches/001-cross_compile.patch | 15 +++ 4 files changed, 208 insertions(+) create mode 100644 multimedia/kissdx/Makefile create mode 100644 multimedia/kissdx/files/kissdx.config create mode 100755 multimedia/kissdx/files/kissdx.init create mode 100644 multimedia/kissdx/patches/001-cross_compile.patch diff --git a/multimedia/kissdx/Makefile b/multimedia/kissdx/Makefile new file mode 100644 index 0000000000..30652df298 --- /dev/null +++ b/multimedia/kissdx/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kissdx +PKG_VERSION:=0.14.0.b1a +PKG_RELEASE:=7 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip +PKG_SOURCE_URL:=http://kissdx.vidartysse.net +PKG_MD5SUM:=ef213d2748f5a63b1c97ac7bfa942b2f + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/kissdx + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libjpeg +libiconv +libdvdread + TITLE:=PC-Link clone for KiSS media players + URL:=http://kissdx.vidartysse.net +endef + +define Package/kissdx/description + kissdx is a PC-Link clone for KiSS media players, based for + the most part on kissd (which it now replaces), with added + features for media playback, management, flexibility and more. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CFLAGS="$(TARGET_CFLAGS) -DLinux -DUSE_INTERNAL_SENDFILE -std=gnu99 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DFILE_OFFSET_BITS=64 -D_GNU_SOURCE -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/lib/libiconv/include -I$(STAGING_DIR)/usr/include/dvdread -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib" \ + STRIP=$(STRIP) \ + CC="$(TARGET_CROSS)gcc" all +endef + +define Package/kissdx/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kissdx $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/kissdx.config $(1)/etc/config/kissdx + $(INSTALL_BIN) ./files/kissdx.init $(1)/etc/init.d/kissdx +endef + +$(eval $(call BuildPackage,kissdx)) diff --git a/multimedia/kissdx/files/kissdx.config b/multimedia/kissdx/files/kissdx.config new file mode 100644 index 0000000000..5cce4267f5 --- /dev/null +++ b/multimedia/kissdx/files/kissdx.config @@ -0,0 +1,32 @@ +config 'kissdx' 'server' + option 'signature' 'kissdx {Version} ({VersionDate}) @ {ShortHostName} {ConfigReloadStatus}' + option 'pidfile' '/var/run/kissdx.pid' + option 'characterset' 'ISO-8859-1' + option 'picturetargetwidth' '1280' + option 'picturetargetheight' '720' + option 'picturemaxzoompercent' '20' + option 'enablehiddenfilestext' 'Show it all' + option 'enablehiddenfilesminutes' '5' + option 'listhiddenentries' 'no' + option 'displaysequencenumbers' 'no' + +config 'kissdx' 'paths' + option 'audio' '/mnt/music' + option 'video' '/mnt/movies' + option 'picture' '/mnt/photos' + +config 'kissdx' 'files' + option 'audio' 'mp3,ogg,wma,wav' + option 'video' 'mpg,mpeg,vob,avi,wmv,ts,mp4,divx' + option 'picture' 'jpg,jpeg,png,bmp' + option 'iso' 'iso,img' + +config 'kissdx' 'subtitles' + option 'filemapping' '*:{name}*.*' + +config 'kissdx' 'recentfiles' + option 'foldername' '[Recently played]' + option 'max' '30' + +config 'kissdx' 'kml' + option 'forwardurl' 'http://tinystocks.com/k/kiss.php' diff --git a/multimedia/kissdx/files/kissdx.init b/multimedia/kissdx/files/kissdx.init new file mode 100755 index 0000000000..c3b5dcb145 --- /dev/null +++ b/multimedia/kissdx/files/kissdx.init @@ -0,0 +1,106 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org + +START=65 +CFGFILE=/tmp/kissdx.conf + +create_configfile() { + local signature pidfile characterset \ + picturetargetwidth picturetargetheight picturemaxzoompercent \ + enablehiddenfilestext enablehiddenfilesminutes \ + listhiddenentries displaysequencenumbers + local path_audio path_video path_picture + local files_audio files_video files_picture files_iso + local subtitles_filemapping + local recentfiles_foldername recentfiles_max + local kml_forwardurl + + echo '### AUTOGENERATED CONFIGURATION FILE - DO NOT EDIT ###' > $CFGFILE + echo '### Edit /etc/config/kissdx to make changes to setup ###' >> $CFGFILE + echo '' >> $CFGFILE + + config_get signature server signature + config_get pidfile server pidfile + config_get characterset server characterset + config_get picturetargetwidth server picturetargetwidth + config_get picturetargetheight server picturetargetheight + config_get picturemaxzoompercent server picturemaxzoompercent + config_get enablehiddenfilestext server enablehiddenfilestext + config_get enablehiddenfilesminutes server enablehiddenfilesminutes + config_get listhiddenentries server listhiddenentries + config_get displaysequencenumbers server displaysequencenumbers + + config_get path_audio paths audio + config_get path_video paths video + config_get path_picture paths picture + + config_get files_audio files audio + config_get files_video files video + config_get files_picture files picture + config_get files_iso files iso + + config_get subtitles_filemapping subtitles filemapping + + config_get recentfiles_foldername recentfiles foldername + config_get recentfiles_max recentfiles max + + config_get kml_forwardurl kml forwardurl + + echo 'serversignature = ' $signature >> $CFGFILE + echo '#listenaddress = 192.168.1.2' >> $CFGFILE + echo '#networktimeoutinterval = 3600' >> $CFGFILE + echo '#adminserver_port = 8003' >> $CFGFILE + echo 'configautoload = no' >> $CFGFILE + echo '#dvdaccessmethod = libdvdnav' >> $CFGFILE + echo '#renamefiletypes = ts:mpg,wav:mp3' >> $CFGFILE + echo 'pidfilepath = ' $pidfile >> $CFGFILE + echo '#persistentstoragepath = /tmp/kissdx' >> $CFGFILE + echo '#server_character_set = CP850' >> $CFGFILE + echo '#client_character_set = ISO-8859-1' >> $CFGFILE + echo 'config_character_set = ' $characterset >> $CFGFILE + echo 'playlist_character_set = ' $characterset >> $CFGFILE + echo 'displaysequencenumbers = ' $displaysequencenumbers >> $CFGFILE + echo '' >> $CFGFILE + echo '# 0 = caching disabled, -1 = no limit or amount of pictures in cache' >> $CFGFILE + echo 'picturecachesize = 0' >> $CFGFILE + echo '#picturecachetrimminginterval = 10' >> $CFGFILE + echo '' >> $CFGFILE + echo 'audiopath = ' $path_audio >> $CFGFILE + echo 'videopath = ' $path_video >> $CFGFILE + echo 'picturepath = ' $path_picture >> $CFGFILE + echo '' >> $CFGFILE + echo 'audiofileextensions = ' $files_audio >> $CFGFILE + echo 'videofileextensions = ' $files_video >> $CFGFILE + echo 'picturefileextensions = ' $files_picture >> $CFGFILE + echo 'isofileextensions = ' $files_iso >> $CFGFILE + echo '' >> $CFGFILE + echo 'listhiddenentries = ' $listhiddenentries >> $CFGFILE + echo 'enablehiddenfilestext = ' $enablehiddenfilestext >> $CFGFILE + echo 'enablehiddenfilesminutes = ' $enablehiddenfilesminutes >> $CFGFILE + echo '' >> $CFGFILE + echo 'picturetargetwidth = ' $picturetargetwidth >> $CFGFILE + echo 'picturetargetheight = ' $picturetargetheight >> $CFGFILE + echo 'picturemaxzoompercent = ' $picturemaxzoompercent >> $CFGFILE + echo '' >> $CFGFILE + echo 'subtitlefilemapping = ' $subtitles_filemapping >> $CFGFILE + echo '' >> $CFGFILE + echo 'recentlyusedfoldername = ' $recentfiles_foldername >> $CFGFILE + echo 'max_recent_files = ' $recentfiles_max >> $CFGFILE + echo '' >> $CFGFILE + echo 'kmlforwardurl = ' $kml_forwardurl >> $CFGFILE + echo '' >> $CFGFILE + echo '#pretrigger = /usr/bin/kissd-pretrigger' >> $CFGFILE + echo '#posttrigger = /usr/bin/kissd-posttrigger' >> $CFGFILE + echo '#directorypretrigger = /usr/bin/kissddirpretrigger' >> $CFGFILE + echo '#directoryposttrigger = /usr/bin/kisdddirposttrigger' >> $CFGFILE +} + +start () { + config_load kissdx + create_configfile + /usr/bin/kissdx -c $CFGFILE -d +} + +stop() { + killall -9 kissdx +} diff --git a/multimedia/kissdx/patches/001-cross_compile.patch b/multimedia/kissdx/patches/001-cross_compile.patch new file mode 100644 index 0000000000..55db9fc133 --- /dev/null +++ b/multimedia/kissdx/patches/001-cross_compile.patch @@ -0,0 +1,15 @@ +diff -Naur kissdx-0.14.0.b1a.orig/Makefile kissdx-0.14.0.b1a/Makefile +--- kissdx-0.14.0.b1a.orig/Makefile 2007-10-24 00:13:33.000000000 +0300 ++++ kissdx-0.14.0.b1a/Makefile 2009-03-05 22:53:51.000000000 +0200 +@@ -27,9 +27,9 @@ + + kissdx: $(OBJS) + # remove -liconv below if your system has libiconv built in +- $(CC) -o $@ $(OBJS) -ldvdread -liconv -ljpeg -lm $(EXTRA_LIBS) ++ $(CC) -o $@ $(OBJS) -ldvdread -liconv -ljpeg -lm $(LDFLAGS) $(EXTRA_LIBS) + # $(CC) -o $@ $(OBJS) -ldvdread -ljpeg -lm $(EXTRA_LIBS) +- strip kissdx.exe ++ $(STRIP) kissdx + + all: kissdx + -- 2.30.2