From 2b98eda5c00887f80257ece62ef8cb6cbfa190f6 Mon Sep 17 00:00:00 2001 From: jolan Date: Fri, 21 Jan 2005 06:49:11 +0000 Subject: [PATCH] daapd-0.2.4a, server for the DAA protocol (itunes sharing stuff) --- audio/daapd/Makefile | 44 +++++++++ audio/daapd/distinfo | 4 + audio/daapd/patches/patch-README | 12 +++ audio/daapd/patches/patch-daapd-example_conf | 17 ++++ audio/daapd/patches/patch-daapd_8 | 12 +++ audio/daapd/patches/patch-daapd_cc | 21 +++++ .../daapd/patches/patch-daaplib_src_makefile | 22 +++++ audio/daapd/patches/patch-libhttpd_Site_mm_in | 11 +++ .../patch-libhttpd_makegen_library_unix_mm | 12 +++ audio/daapd/patches/patch-makefile | 91 +++++++++++++++++++ audio/daapd/pkg/DESCR | 4 + audio/daapd/pkg/PLIST | 9 ++ 12 files changed, 259 insertions(+) create mode 100644 audio/daapd/Makefile create mode 100644 audio/daapd/distinfo create mode 100644 audio/daapd/patches/patch-README create mode 100644 audio/daapd/patches/patch-daapd-example_conf create mode 100644 audio/daapd/patches/patch-daapd_8 create mode 100644 audio/daapd/patches/patch-daapd_cc create mode 100644 audio/daapd/patches/patch-daaplib_src_makefile create mode 100644 audio/daapd/patches/patch-libhttpd_Site_mm_in create mode 100644 audio/daapd/patches/patch-libhttpd_makegen_library_unix_mm create mode 100644 audio/daapd/patches/patch-makefile create mode 100644 audio/daapd/pkg/DESCR create mode 100644 audio/daapd/pkg/PLIST diff --git a/audio/daapd/Makefile b/audio/daapd/Makefile new file mode 100644 index 00000000000..ba64ed62892 --- /dev/null +++ b/audio/daapd/Makefile @@ -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 diff --git a/audio/daapd/distinfo b/audio/daapd/distinfo new file mode 100644 index 00000000000..6e33829de69 --- /dev/null +++ b/audio/daapd/distinfo @@ -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 diff --git a/audio/daapd/patches/patch-README b/audio/daapd/patches/patch-README new file mode 100644 index 00000000000..b35e3a2b53b --- /dev/null +++ b/audio/daapd/patches/patch-README @@ -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) diff --git a/audio/daapd/patches/patch-daapd-example_conf b/audio/daapd/patches/patch-daapd-example_conf new file mode 100644 index 00000000000..546bab3cb30 --- /dev/null +++ b/audio/daapd/patches/patch-daapd-example_conf @@ -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 diff --git a/audio/daapd/patches/patch-daapd_8 b/audio/daapd/patches/patch-daapd_8 new file mode 100644 index 00000000000..fd22b1e0d20 --- /dev/null +++ b/audio/daapd/patches/patch-daapd_8 @@ -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 . diff --git a/audio/daapd/patches/patch-daapd_cc b/audio/daapd/patches/patch-daapd_cc new file mode 100644 index 00000000000..092b131f631 --- /dev/null +++ b/audio/daapd/patches/patch-daapd_cc @@ -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) diff --git a/audio/daapd/patches/patch-daaplib_src_makefile b/audio/daapd/patches/patch-daaplib_src_makefile new file mode 100644 index 00000000000..da5ec278d6a --- /dev/null +++ b/audio/daapd/patches/patch-daaplib_src_makefile @@ -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) diff --git a/audio/daapd/patches/patch-libhttpd_Site_mm_in b/audio/daapd/patches/patch-libhttpd_Site_mm_in new file mode 100644 index 00000000000..2c26d72802a --- /dev/null +++ b/audio/daapd/patches/patch-libhttpd_Site_mm_in @@ -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) diff --git a/audio/daapd/patches/patch-libhttpd_makegen_library_unix_mm b/audio/daapd/patches/patch-libhttpd_makegen_library_unix_mm new file mode 100644 index 00000000000..e5863d2a008 --- /dev/null +++ b/audio/daapd/patches/patch-libhttpd_makegen_library_unix_mm @@ -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" diff --git a/audio/daapd/patches/patch-makefile b/audio/daapd/patches/patch-makefile new file mode 100644 index 00000000000..b477d40823a --- /dev/null +++ b/audio/daapd/patches/patch-makefile @@ -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 diff --git a/audio/daapd/pkg/DESCR b/audio/daapd/pkg/DESCR new file mode 100644 index 00000000000..9dbf93056d7 --- /dev/null +++ b/audio/daapd/pkg/DESCR @@ -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. diff --git a/audio/daapd/pkg/PLIST b/audio/daapd/pkg/PLIST new file mode 100644 index 00000000000..367ad59fcfa --- /dev/null +++ b/audio/daapd/pkg/PLIST @@ -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