daapd-0.2.4a, server for the DAA protocol (itunes sharing stuff)

This commit is contained in:
jolan 2005-01-21 06:49:11 +00:00
parent 805c5fbee5
commit 2b98eda5c0
12 changed files with 259 additions and 0 deletions

44
audio/daapd/Makefile Normal file
View File

@ -0,0 +1,44 @@
# $OpenBSD: Makefile,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
COMMENT= "server for the DAA protocol"
DISTNAME= daapd-0.2.4a
EXTRACT_SUFX= .tgz
CATEGORIES= audio net
MASTER_SITES= ${HOMEPAGE}
HOMEPAGE= http://www.deleet.de/projekte/daap/daapd/
# GPL
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
LIB_DEPENDS= mp4v2.0.0::audio/faad \
id3tag.3.0::audio/libid3tag \
howl.0.0::net/howl
WANTLIB= c m pthread stdc++ z
NO_REGRESS= Yes
USE_GMAKE= Yes
MAKE_FILE= makefile
MAKE_ENV+= CC="${CC}" \
CXX="${CXX}" \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}"
post-patch:
@perl -pi -e 's,_SYSCONFDIR_,${SYSCONFDIR},g' \
${WRKSRC}/README ${WRKSRC}/daapd.8 ${WRKSRC}/daapd.cc
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/daapd
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/daapd
${INSTALL_PROGRAM} ${WRKSRC}/daapd ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/daapd.8 ${PREFIX}/man/man8
${INSTALL_DATA} ${WRKSRC}/FAQ ${WRKSRC}/README \
${PREFIX}/share/doc/daapd
${INSTALL_DATA} ${WRKSRC}/daapd-example.conf ${PREFIX}/share/examples/daapd
.include <bsd.port.mk>

4
audio/daapd/distinfo Normal file
View File

@ -0,0 +1,4 @@
MD5 (daapd-0.2.4a.tgz) = 330e2a89d77b086a64bbe8cdf24a00f2
RMD160 (daapd-0.2.4a.tgz) = ca3bf641693779af359cfe1c1b91c7b06cfaaa10
SHA1 (daapd-0.2.4a.tgz) = 175130c8b709fcac124857fe5a9eacdfbe00153c
SIZE (daapd-0.2.4a.tgz) = 205231

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-README,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
--- README.orig Tue Jan 4 17:18:48 2005
+++ README Thu Jan 20 21:10:04 2005
@@ -65,7 +65,7 @@ daapd has the following invocation synta
daapd [-dhqvz] [-c config-file] [-C cache-file] [-n name] [-p port] [-t vbr-limit] [file/directory]...
-When called without command line arguments, daapd looks for a configuration file called /etc/daapd.conf. Failing that, it runs with the following default options:
+When called without command line arguments, daapd looks for a configuration file called _SYSCONFDIR_/daapd.conf. Failing that, it runs with the following default options:
- current directory is scanned for music files
- port is 3689 (port registered for DAAP with IANA)

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-daapd-example_conf,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
--- daapd-example.conf.orig Tue Jan 4 17:18:48 2005
+++ daapd-example.conf Fri Jan 21 00:20:23 2005
@@ -1,8 +1,7 @@
Port 3689
-ServerName daapd server
-DBName daapd music
-Password
-Root .
-Cache
+ServerName mpthras
+DBName mpthras
+Password omgwtfbbq
+Root /export/mp3
+Cache /var/db/daapd.cache
Timescan 2
-RescanInterval 60

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-daapd_8,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
--- daapd.8.orig Tue Jan 4 17:18:48 2005
+++ daapd.8 Thu Jan 20 21:10:41 2005
@@ -53,7 +53,7 @@ relies on the howl mDNS library for this
.It Fl c Ar config-file
Read configuration options from
.Ar config-file .
-If this option is not given, the default location of the configuration file is /etc/daapd.conf.
+If this option is not given, the default location of the configuration file is _SYSCONFDIR_/daapd.conf.
.It Fl C Ar cache-file
Save and recover database of audio files to/from
.Ar cache-file .

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-daapd_cc,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
--- daapd.cc.orig Tue Jan 4 17:18:48 2005
+++ daapd.cc Thu Jan 20 21:11:10 2005
@@ -829,7 +829,7 @@ InitParams *readConfig( InitParams& init
}
}
- conf = fopen( "/etc/daapd.conf", "r" );
+ conf = fopen( "_SYSCONFDIR_/daapd.conf", "r" );
if( conf != NULL ) {
return( parseConfig( conf, initParams ) );
}
@@ -989,7 +989,7 @@ void startScanThread ( Database *db, con
/* get the default attributes */
pthread_attr_init( &attr );
-#if defined( _POSIX_THREAD_PRIORITY_SCHEDULING)
+#if defined( _POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(__OpenBSD__)
/* set the scheduling algorithm PROCESS or SYSTEM */
if (pthread_attr_setscope( &attr, PTHREAD_SCOPE_PROCESS ) != 0)

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-daaplib_src_makefile,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
--- daaplib/src/makefile.orig Tue Jan 4 17:18:48 2005
+++ daaplib/src/makefile Thu Jan 20 22:45:53 2005
@@ -1,4 +1,4 @@
-CC = g++
+#CC = g++
AR = ar
CP = cp
RM = rm
@@ -11,10 +11,10 @@ LIBPATH =
LIBDEPLOY = /usr/local/lib
INCDEPLOY = /usr/local/include
INCPATH = ../include
-CFLAGS = -Wall -Wno-multichar
+CFLAGS+= -Wall -Wno-multichar
.cpp.o:
- $(CC) $(CFLAGS) -I$(INCPATH) -c $<
+ $(CXX) $(CFLAGS) -I$(INCPATH) -c $<
$(TARGET): $(OBJS)
$(AR) rs $(TARGET) $(OBJS)

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-libhttpd_Site_mm_in,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
--- libhttpd/Site.mm.in.orig Tue Jan 4 17:18:47 2005
+++ libhttpd/Site.mm.in Thu Jan 20 23:12:35 2005
@@ -37,5 +37,5 @@ EXTRA_LIBS=
# Any other CFlags required
EXTRA_CFLAGS=
-CFLAGS= -g -I$(TOP)/ -I/usr/local/include $(EXTRA_CFLAGS) -D$(OS_TYPE)
-LDLIBS= -L/usr/local/lib -L$(TOP)/lib @LIBS@ $(EXTRA_LIBS)
+CFLAGS+=-I$(TOP)/ $(EXTRA_CFLAGS) -D$(OS_TYPE)
+LDLIBS= @LIBS@ $(EXTRA_LIBS)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libhttpd_makegen_library_unix_mm,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
--- libhttpd/makegen/library_unix.mm.orig Tue Jan 4 17:18:47 2005
+++ libhttpd/makegen/library_unix.mm Thu Jan 20 23:17:42 2005
@@ -32,7 +32,7 @@ do
obj=`echo $src | sed "s/\.c\$/.o/"`
libobj="$libobj $obj"
echo "$obj : $src Makefile.full"
- echo ' $(CC) $(CC_FLAGS) -c '"$src"
+ echo ' $(CXX) $(CC_FLAGS) -c '"$src"
echo
echo "clean ::"
echo " rm -f $obj"

View File

@ -0,0 +1,91 @@
$OpenBSD: patch-makefile,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
--- makefile.orig Tue Jan 4 17:18:48 2005
+++ makefile Thu Jan 20 21:21:01 2005
@@ -1,35 +1,35 @@
# configure daapd here
-HOWL_ENABLE = 0
+HOWL_ENABLE = 1
ZLIB_ENABLE = 1
-MPEG4_ENABLE = 0
+MPEG4_ENABLE = 1
# no need to touch anything below this line
# -----------------------------------------
-CC = g++
+#CC = g++
MAKE = $(MAKE_COMMAND)
TARGET = daapd
DEPS = daaplib_ libhttpd_
OBJS = daapd.o db.o dboutput.o songcache.o parsemp3.o util.o
LIBS = -ldaaplib -lhttpd-persistent -lid3tag -lz
-LIBPATH = -L. -L./daaplib/src -L./libhttpd/src -L/usr/local/lib
-INCPATH = -I. -I./daaplib/include -I./libhttpd/src -I/usr/local/include
+LIBPATH = -L. -L./daaplib/src -L./libhttpd/src -L$(LOCALBASE)/lib
+INCPATH = -I. -I./daaplib/include -I./libhttpd/src -I$(LOCALBASE)/include
DEPLOY = /usr/local
-CFLAGS = -Wall -Wno-multichar
+CFLAGS+= -Wall -Wno-multichar
# HOWL
ifeq ($(HOWL_ENABLE),1)
- HOWLDIRS := $(sort $(wildcard /usr/local/include/howl*) )
+ HOWLDIRS := $(sort $(wildcard $(LOCALBASE)/include/howl*) )
ifeq ($(words $(HOWLDIRS) ), 0)
-$(error howl not found in /usr/local/include. Install howl or disable it in the makefile)
+$(error howl not found in $(LOCALBASE)/include. Install howl or disable it in the makefile)
endif
HOWLRECENT := $(word $(words $(HOWLDIRS)),$(HOWLDIRS) )
INCPATH := $(INCPATH) -I$(HOWLRECENT)
LIBS := $(LIBS) -lhowl
CFLAGS := $(CFLAGS) -DHOWL_ENABLE
- ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __APPLE__),)
+ ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep __APPLE__),)
LIBS := $(LIBS) -framework CoreFoundation
endif
endif
@@ -42,28 +42,28 @@ ifeq ($(MPEG4_ENABLE),1)
endif
# platform specific stuff
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __sun__),)
+ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep __sun__),)
LIBS := $(LIBS) -lsocket -lnsl
endif
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __FreeBSD__),)
+ifneq ($(shell $(CXX) -E -dM - < /dev/null | egrep '__FreeBSD__|__OpenBSD__'),)
LIBS := $(LIBS) -pthread
else
LIBS := $(LIBS) -lpthread
endif
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __sgi__),)
+ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep __sgi__),)
LIBS := $(LIBS) /usr/lib/snprintf.o
endif
.cc.o:
- $(CC) $(CFLAGS) $(INCPATH) -c $<
+ $(CXX) $(CFLAGS) $(INCPATH) -c $<
all: $(DEPS) $(TARGET)
$(TARGET): $(OBJS)
- $(CC) $(CFLAGS) $(LIBPATH) -o $(TARGET) $(OBJS) $(LIBS)
+ $(CXX) $(CFLAGS) $(LIBPATH) -o $(TARGET) $(OBJS) $(LIBS)
$(OBJS): types.h dboutput.h songcache.h parsemp3.h
@@ -80,8 +80,6 @@ clean:
rm $(OBJS) $(TARGET)
install: $(DEPS) $(TARGET)
- cd libhttpd && $(MAKE) install
- cd daaplib/src && $(MAKE) install
cp $(TARGET) $(DEPLOY)/bin
chmod a+rx $(DEPLOY)/bin/$(TARGET)
cp $(TARGET).8 $(DEPLOY)/man/man8

4
audio/daapd/pkg/DESCR Normal file
View File

@ -0,0 +1,4 @@
daapd scans a directory for music files (mp3, aac, uncompressed) and
makes them available via the Apple proprietary protocol DAAP. DAAP
clients can browse the directory and retrieve individual files, either
by streaming or by downloading them.

9
audio/daapd/pkg/PLIST Normal file
View File

@ -0,0 +1,9 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
bin/daapd
@man man/man8/daapd.8
share/doc/daapd/
share/doc/daapd/FAQ
share/doc/daapd/README
share/examples/daapd/
share/examples/daapd/daapd-example.conf
@sample ${SYSCONFDIR}/daapd.conf