From d6ac7d5744864940a23e5e6cba413e21a9aecdfc Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Mon, 17 Apr 2006 05:04:21 +0000 Subject: [PATCH] Add patrekur's bsd init script, move all init scripts to contrib/init.d --- CREDITS | 2 + configure.in | 2 +- contrib/Makefile.am | 6 +- contrib/{mt-daapd => init.d/mt-daapd-fedora} | 0 contrib/{ => init.d}/mt-daapd-gentoo | 0 contrib/init.d/mtdaapd-bsd | 21 +++ contrib/mt-daapd.playlist | 147 ------------------- 7 files changed, 28 insertions(+), 150 deletions(-) rename contrib/{mt-daapd => init.d/mt-daapd-fedora} (100%) rename contrib/{ => init.d}/mt-daapd-gentoo (100%) create mode 100755 contrib/init.d/mtdaapd-bsd delete mode 100644 contrib/mt-daapd.playlist diff --git a/CREDITS b/CREDITS index 1a242372..66b64bcc 100644 --- a/CREDITS +++ b/CREDITS @@ -119,3 +119,5 @@ Patrick Kolla slomo (from the forums) * Musepack tag parsing support. +dtln + * fix for newer mplayer diff --git a/configure.in b/configure.in index fc26c3b4..33e40340 100644 --- a/configure.in +++ b/configure.in @@ -374,4 +374,4 @@ AC_CHECK_LIB(socket,socket,V_NETLIBS="-lsocket $V_NETLIBS",,) AC_SUBST(V_NETLIBS) -AC_OUTPUT(src/Makefile admin-root/Makefile admin-root/lib-js/Makefile admin-root/lib-js/script.aculo.us/Makefile contrib/Makefile debian/Makefile Makefile) +AC_OUTPUT(src/Makefile admin-root/Makefile admin-root/lib-js/Makefile admin-root/lib-js/script.aculo.us/Makefile contrib/Makefile contrib/init.d/Makefile debian/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am index b0e46b91..f1fb85b0 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -1,10 +1,12 @@ # $Id$ # -EXTRA_DIST = README mt-daapd.spec mt-daapd.conf.templ mt-daapd.playlist mt-daapd mt-daapd-gentoo mt-daapd-ssc.sh mt-daapd-ssc.pl mt-daapd-ssc.pl mt-daapd-ssc.sh +SUBDIRS = init.d + +EXTRA_DIST = README mt-daapd.spec mt-daapd.conf.templ mt-daapd-ssc.sh mt-daapd-ssc.pl BUILT_SOURCES = mt-daapd.conf sysconf_DATA = mt-daapd.conf -bin_SCRIPTS=mt-daapd-ssc.sh +bin_SCRIPTS = mt-daapd-ssc.sh dbdir="/var/cache/mt-daapd" diff --git a/contrib/mt-daapd b/contrib/init.d/mt-daapd-fedora similarity index 100% rename from contrib/mt-daapd rename to contrib/init.d/mt-daapd-fedora diff --git a/contrib/mt-daapd-gentoo b/contrib/init.d/mt-daapd-gentoo similarity index 100% rename from contrib/mt-daapd-gentoo rename to contrib/init.d/mt-daapd-gentoo diff --git a/contrib/init.d/mtdaapd-bsd b/contrib/init.d/mtdaapd-bsd new file mode 100755 index 00000000..762481ce --- /dev/null +++ b/contrib/init.d/mtdaapd-bsd @@ -0,0 +1,21 @@ +#!/bin/sh +# +# PROVIDE: mtdaapd mt-daapd +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# mt-daapd daemon. +# +# Created by Patrick Lemmens for NetBSD and FreeBSD. + +. /etc/rc.subr + +name="mtdaapd" +realname="mt-daapd" +rcvar=$name +command="/usr/local/bin/${realname}" +pidfile="/var/run/${realname}.pid" +sig_stop="SIGINT" + +load_rc_config $name +run_rc_command "$1" \ No newline at end of file diff --git a/contrib/mt-daapd.playlist b/contrib/mt-daapd.playlist deleted file mode 100644 index 033bf97f..00000000 --- a/contrib/mt-daapd.playlist +++ /dev/null @@ -1,147 +0,0 @@ -# $Id$ -# -# This is the playlist file, for specifying iTunes-style -# "Smart Playlists". -# -# The syntax is as follows: -# -# "Playlist Name" { expression } -# -# An expression consists of: -# -# ID3-tag-name operator operand -# -# Where valid ID3-tag-names are: -# Artist (string) -# Album (string) -# Genre (string) -# Path (string) -- full path to song, including filename -# Composer (string) -# Orchestra (string) -# Conductor (string) -# Grouping (string) -- I don't even know what this is... -# Comment (string) -# Type (string) -- "mp3 audio file", "m4a audio file", etc. -# Year (int) -# BPM (int) -# Bitrate (int) -# Date (date) -# -# Valid operators include: -# is, includes (string), matches (string) -# >, <, <=, >=, = (int) -# after, before (date) -# -# the "is" operator must exactly match the tag, while -# the "includes" operator matches a substring and -# "matches" operator makes trivial wildcard match using -# "?" and "*" as wildcards for any character and any -# string accordingly. All matches are case-insensitive. -# -# Valid operands include: -# "string value" (string) -# integer (int) -# -# Multiple expressions can be anded or ored together, -# using the keywords OR and AND (or || and &&). -# The unary not operator is also supported using the -# keyword NOT (or !) -# -# Examples: -# -# "techno" { -# genre includes "techno" || -# artist includes "zombie" -# } -# -# This would match songs by "Rob Zombie" or "White Zombie", -# as well as those with a genre of "Techno-Industrial" or -# "Trance/Techno", for example. -# -# "AAC Files" { -# path includes ".m4a" || -# path includes ".m4p" -# } -# -# This would match all m4a and m4p files -- i.e. iTunes-ripped aac files -# or songs downloaded from iTMS. -# -# "Orchestral Music" { -# Orchestra !IS "" || -# Conductor !IS "" -# } -# -# This would match anything with *anything* entered as a -# orchestra or conductor... this would probably include any -# orchestral music. Kind of ugly, but works! -# -# -# DATES -# -# Dates are kind of funky. The "date" of a file is when it -# was created on the file system, or the date that it was first -# entered into the database, whichever is earlier. The date of -# a file can be matched with the terms "before" or "after". -# -# One example of a valid date is a date in yyyy-mm-dd format: -# -# "Files added after January 1, 2004" { -# date after 2004-01-01 -# } -# -# There are also some special date keywords: -# "today", "yesterday", "last week", "last month", "last year" -# -# A valid date can also be made by appling an interval to a -# date. As an example, a valid date might be: -# -# 3 weeks before today -# or -# 3 weeks ago -# -# You can combine these, of course. -# -# "3 weeks before today" is the same as "2 weeks before last week" -# or "1 week after last month" or "21 days before today" or -# "20 days before yesterday" or "7 days after last month". You get -# the idea. -# -# Note that the playlists are only generated at the time that mt-daapd -# starts... so while the dates will be accurate at start time, they -# may become inaccurate with time. Yes, I know... it's on my list. :) -# -# So, examples: -# -# "Recently Added MP3s" { -# date after last month AND file includes ".mp3" -# } -# -# This matches only mp3 files added in the last 30 days. -# -# -# SUMMARY -# -# I expect that this language will grow over time. If you want -# to hack on it, see src/lexer.l, src/parser.y, and src/playlist.c -# -# If there is something missing you particularly want, let me -# (rpedde@users.sourceforge.net) know! -# - -"60's Music" { - Year >= 1960 && Year < 1970 -} - -"Recently Added" { - Date after 2 weeks ago -} - -"Non-DRMed Music" { - path not includes ".m4p" -} - -"AAC Files" { - path includes ".m4p" || - path includes ".m4a" || - path includes ".aac" -}