Browse Source

Merge pull request #440 from ejurgensen/master

forked-daapd and required libraries
lilik-openwrt-22.03
Ted Hess 10 years ago
parent
commit
0c0ab73037
10 changed files with 15283 additions and 0 deletions
  1. +55
    -0
      libs/libantlr3c/Makefile
  2. +55
    -0
      libs/libavl/Makefile
  3. +45
    -0
      libs/libavl/patches/010-update_GNUmakefile.patch
  4. +59
    -0
      libs/libunistring/Makefile
  5. +56
    -0
      libs/mxml/Makefile
  6. +11
    -0
      libs/mxml/patches/001-targets.patch
  7. +66
    -0
      sound/forked-daapd/Makefile
  8. +139
    -0
      sound/forked-daapd/files/forked-daapd.conf
  9. +15
    -0
      sound/forked-daapd/files/forked-daapd.init
  10. +14782
    -0
      sound/forked-daapd/patches/010-include_pregen.patch

+ 55
- 0
libs/libantlr3c/Makefile View File

@ -0,0 +1,55 @@
#
# Copyright (C) 2006-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:=libantlr3c
PKG_VERSION:=3.2
PKG_RELEASE:=1
PKG_MD5SUM:=674646e1d1bf5c6015435480cead725a
PKG_SOURCE_URL:=http://www.antlr3.org/download/C
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_INSTALL:=1
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/libantlr3c
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libantlr3c
URL:=http://www.antlr3.org/
endef
define Package/libantlr3c/description
ANother Tool for Language Recognition, is a language tool that provides a framework for constructing recognizers,
interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages.
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
--enable-static
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libantlr3c.{a,so} $(1)/usr/lib/
endef
define Package/libantlr3c/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libantlr3c.so $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libantlr3c))

+ 55
- 0
libs/libavl/Makefile View File

@ -0,0 +1,55 @@
#
# Copyright (C) 2006-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:=libavl
PKG_VERSION:=0.3.5
PKG_RELEASE:=1
PKG_MD5SUM:=882c68ea7f71876ca110f3b84d7ab12d
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/liba/libavl
PKG_BUILD_DIR:=$(BUILD_DIR)/avl-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
PKG_LICENSE:=LGPL-2.0+
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/libavl
SECTION:=libs
CATEGORY:=Libraries
TITLE:=AVLTree (this is not GNU libavl)
URL:=https://packages.debian.org/wheezy/libavl1
endef
define Package/libavl/description
AVLTree is a small implementation of AVL trees for the C programming language.
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
--enable-static
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/avl.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavl.so* $(1)/usr/lib/
endef
define Package/libavl/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavl.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libavl))

+ 45
- 0
libs/libavl/patches/010-update_GNUmakefile.patch View File

@ -0,0 +1,45 @@
--- a/GNUmakefile 2002-11-15 19:57:48.000000000 +0100
+++ a/GNUmakefile 2014-10-02 16:03:02.864803002 +0200
@@ -6,7 +6,7 @@
LDCONFIG ?= /sbin/ldconfig
# Some suggestions: (-mcpu= generates i386 compatible code)
-CFLAGS ?= -O2 -fomit-frame-pointer -pipe -mcpu=i686 -w
+CFLAGS ?= -O2 -pipe -Wall -Werror
#CFLAGS = -O2 -fomit-frame-pointer -pipe -march=i586 -Wall -g
#CFLAGS = -O6 -fomit-frame-pointer -pipe -march=i586 -Wall -ansi -pedantic
#CFLAGS = -O6 -fomit-frame-pointer -pipe -march=i686 -Wall -ansi -pedantic
@@ -15,10 +15,9 @@
#CFLAGS = -g -pg -a -pipe -march=i686 -Wall
#LDFLAGS = -s
-prefix ?= /usr/local
+prefix ?= /usr
libdir ?= $(prefix)/lib
includedir ?= $(prefix)/include
-includedir ?= /usr/include
PROGRAMS = avlsort setdiff
LIBRARY = libavl.so.1.5
@@ -34,16 +33,17 @@
$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
$(LIBRARY): avl.o
- $(CC) -nostdlib -shared -Wl,-soname,libavl.so.1 $^ -o $@ -lc
+ $(CC) -shared -Wl,-soname,libavl.so.1 $^ -o $@ -lc
clean:
$(RM) *.o $(PROGRAMS) libavl.*
install: all
$(INSTALL) -d $(DESTDIR)$(libdir)
- $(INSTALL) avl.h $(DESTDIR)$(includedir)
- $(INSTALL) $(LIBRARIES) $(DESTDIR)$(libdir)
- for i in $(LIBRARIES); do\
+ $(INSTALL) -d $(DESTDIR)$(includedir)
+ $(INSTALL) -m 644 avl.h $(DESTDIR)$(includedir)
+ $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
+ for i in $(LIBRARY); do\
$(LN) -sf $$i $(DESTDIR)$(libdir)/$${i%.*};\
$(LN) -sf $${i%.*} $(DESTDIR)$(libdir)/$${i%.*.*};\
done

+ 59
- 0
libs/libunistring/Makefile View File

@ -0,0 +1,59 @@
#
# Copyright (C) 2006-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:=libunistring
PKG_VERSION:=0.9.4
PKG_RELEASE:=1
PKG_MD5SUM:=c24a6a3838d9ad4a41a62549312c4226
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/libunistring
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/libunistring
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libunistring
URL:=http://www.gnu.org/software/libunistring/
endef
define Package/libunistring/description
This library provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--without-libiconv-prefix \
--without-libpth-prefix
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/include/unistring
$(CP) $(PKG_INSTALL_DIR)/usr/include/unistring/*.h $(1)/usr/include/unistring/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libunistring.{a,so*} $(1)/usr/lib/
endef
define Package/libunistring/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libunistring.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libunistring))

+ 56
- 0
libs/mxml/Makefile View File

@ -0,0 +1,56 @@
#
# Copyright (C) 2006-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:=mxml
PKG_VERSION:=2.8
PKG_RELEASE:=1
PKG_MD5SUM:=d85ee6d30de053581242c4a86e79a5d2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.msweet.org/files/project3/
PKG_FIXUP:=autoreconf
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/mxml
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Mini-XML
URL:=http://www.minixml.org/
endef
define Package/mxml/description
A small xml library.
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
--enable-static
define Build/InstallDev
mkdir -p $(1)/usr/include
$(CP) $(PKG_BUILD_DIR)/mxml.h $(1)/usr/include/
mkdir -p $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libmxml.so* $(1)/usr/lib/
mkdir -p $(1)/usr/lib/pkgconfig
$(CP) $(PKG_BUILD_DIR)/mxml.pc $(1)/usr/lib/pkgconfig/
endef
define Package/mxml/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libmxml.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,mxml))

+ 11
- 0
libs/mxml/patches/001-targets.patch View File

@ -0,0 +1,11 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -88,7 +88,7 @@ PUBLIBOBJS = mxml-attr.o mxml-entity.o m
mxml-index.o mxml-node.o mxml-search.o mxml-set.o
LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o
OBJS = mxmldoc.o testmxml.o $(LIBOBJS)
-TARGETS = $(LIBMXML) mxmldoc testmxml mxml.xml doc/mxml.man
+TARGETS = $(LIBMXML)
#

+ 66
- 0
sound/forked-daapd/Makefile View File

@ -0,0 +1,66 @@
#
# Copyright (C) 2006-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:=forked-daapd
PKG_VERSION:=22.0
PKG_RELEASE:=20141016
PKG_REV:=61a4da215c05b621951aa3903d7d390fd1839537
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/ejurgensen/forked-daapd.git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_INSTALL:=1
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/forked-daapd
SECTION:=sound
CATEGORY:=Sound
TITLE:=Improved iTunes (DAAP) server. Support for Apple Remote and AirPlay.
URL:=https://github.com/ejurgensen/forked-daapd
DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \
+libevent +libdaemon +libantlr3c +confuse +glib2 +alsa-lib +libffmpeg-full \
+mxml +libavl +avahi-daemon +libavahi-client +sqlite3-cli +libplist
endef
define Package/forked-daapd/conffiles
/etc/forked-daapd.conf
endef
CONFIGURE_ARGS += \
--enable-itunes
# Fix for libevent
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libevent
TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/libevent
TARGET_CFLAGS += $(FPIC)
TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
define Package/forked-daapd/install
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) ./files/forked-daapd.conf $(1)/etc/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/forked-daapd
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/forked-daapd/* $(1)/usr/lib/forked-daapd/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/forked-daapd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/forked-daapd.init $(1)/etc/init.d/forked-daapd
endef
$(eval $(call BuildPackage,forked-daapd))

+ 139
- 0
sound/forked-daapd/files/forked-daapd.conf View File

@ -0,0 +1,139 @@
# A quick guide to configuring forked-daapd:
#
# For regular use, the most important setting to configure is "directories",
# which should be the location of your media. Whatever user you have set as
# "uid" must have read access to this location. Also make sure to add the user.
# If the location is a network mount, please see the README.
#
# In all likelihood, that's all you need to do!
general {
# Username
uid = "daapd"
logfile = "/var/log/forked-daapd.log"
# Database location
db_path = "/var/run/forked-daapd.db"
# Available levels: fatal, log, warning, info, debug, spam
loglevel = log
# Admin password for the non-existent web interface
admin_password = "unused"
# Enable/disable IPv6
ipv6 = no
# Location of DAAP cache
daapcache_path = "/var/run/daapcache.db"
# DAAP requests that take longer than this threshold (in msec) get their
# replies cached for next time. Set to 0 to disable caching.
# daapcache_threshold = 1000
}
# Library configuration
library {
# Name of the library as displayed by the clients
# %h: hostname, %v: version
name = "My Music on %h"
# TCP port to listen on. Default port is 3689 (daap)
port = 3689
# Password for the library. Optional.
# password = ""
# Directories to index
directories = { "/srv/music" }
# Directories containing podcasts
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# podcasts. Eg. if you index /srv/music, and your podcasts are in
# /srv/music/Podcasts, you can set this to "/Podcasts".
# (changing this setting only takes effect after rescan, see the README)
podcasts = { "/Podcasts" }
# Directories containing audiobooks
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# audiobooks.
# (changing this setting only takes effect after rescan, see the README)
audiobooks = { "/Audiobooks" }
# Directories containing compilations (eg soundtracks)
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# compilations.
# (changing this setting only takes effect after rescan, see the README)
compilations = { "/Compilations" }
# Compilations usually have many artists, and if you don't want every
# artist to be listed when artist browsing in Remote, you can set
# a single name which will be used for all music in the compilation dir
# (changing this setting only takes effect after rescan, see the README)
compilation_artist = "Various artists"
# There are 5 default playlists: "Library", "Music", "Movies", "TV Shows"
# and "Podcasts". Here you can change the names of these playlists.
# name_library = "Library"
# name_music = "Music"
# name_movies = "Movies"
# name_tvshows = "TV Shows"
# name_podcasts = "Podcasts"
# name_audiobooks = "Audiobooks"
# Artwork file names (without file type extension)
# forked-daapd will look for jpg and png files with these base names
# artwork_basenames = { "artwork", "cover", "Folder" }
# File types the scanner should ignore
# Non-audio files will never be added to the database, but here you
# can prevent the scanner from even probing them. This might improve
# scan time. By default .db and .ini are ignored.
# filetypes_ignore = { ".db", ".ini" }
# Disable startup file scanning
# When forked-daapd starts it will do an initial file scan of your
# library (and then watch it for changes). If you are sure your library
# never changes while forked-daapd is not running, you can disable the
# initial file scan and save some system ressources. Disabling this scan
# may lead to forked-daapd's database coming out of sync with the
# library. If that happens read the instructions in the README on how
# to trigger a full rescan.
# filescan_disable = false
# Should iTunes metadata override ours?
# itunes_overrides = false
# Formats: mp4a, mp4v, mpeg, alac, flac, mpc, ogg, wma, wmal, wmav, aif, wav
# Formats that should never be transcoded
# no_transcode = { "alac", "mp4a" }
# Formats that should always be transcoded
# force_transcode = { "ogg", "flac" }
}
# Local audio output
audio {
# Name - used in the speaker list in Remote
nickname = "OpenWrt"
# Audio device name for local audio output
# card = "default"
# Mixer channel to use for volume control - ALSA/Linux only
# If not set, PCM will be used if available, otherwise Master.
# mixer = ""
}
# AirPlay/Airport Express device settings
# (make sure you get the capitalization of the device name right)
#airplay "My AirPlay device" {
# forked-daapd's volume goes to 11! If that's more than you can handle
# you can set a lower value here
# max_volume = 11
# AirPlay password
# password = "s1kr3t"
#}
# Spotify settings (only have effect if Spotify enabled - see README/INSTALL)
spotify {
# Directory where user settings should be stored (credentials)
# settings_dir = "/var/cache/forked-daapd/libspotify"
# Cache directory
# cache_dir = "/tmp"
# Set preferred bitrate for music streaming
# 0: No preference (default), 1: 96kbps, 2: 160kbps, 3: 320kbps
# bitrate = 0
}

+ 15
- 0
sound/forked-daapd/files/forked-daapd.init View File

@ -0,0 +1,15 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2014 OpenWrt.org
START=99
BIN=/usr/sbin/forked-daapd
PID=/var/run/forked-daapd.pid
SSD=start-stop-daemon
start() {
$SSD -p $PID -S -x $BIN -- -P $PID
}
stop() {
$SSD -p $PID -K -s SIGINT
}

+ 14782
- 0
sound/forked-daapd/patches/010-include_pregen.patch
File diff suppressed because it is too large
View File


Loading…
Cancel
Save