Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pol Vinogradov (ca9c24cba55d8393c361333a0bae6710e9b67b90)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pol Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pol Vinogradov (ca9c24cba55d8393c361333a0bae6710e9b67b90)
  • Date: Thu, 12 Jul 2007 15:22:00 -0500

GIT changes to master grimoire by Pol Vinogradov <vin.public AT gmail.com>:

audio-players/mpd/FINAL | 2
audio-players/mpd/HISTORY | 9 +
audio-players/mpd/INSTALL | 9 -
audio-players/mpd/PRE_BUILD | 7 +
audio-players/mpd/init.d/mpd | 3
audio-players/mpd/init.d/mpd.conf | 245
++++++++++++++++++++++++++++++++++++++
audio-players/mpd/mpd.conf | 245
--------------------------------------
7 files changed, 268 insertions(+), 252 deletions(-)

New commits:
commit 39d82fb999c9ab19cae089afb49035af8ba200ea
Author: Pol Vinogradov <vin.public AT gmail.com>
Commit: Pol Vinogradov <vin.public AT gmail.com>

audio-players/mpd:

INSTALL: made config install to /etc/sysconfig/ for init script,
removed tabs
FINAL: removed account creating code
PRE_BUILD: added, creates musicdaemon account and does sedit for
config file path in source code for init script
init.d/mpd: now uses mpd.db from config file
mpd.conf -> init.d/mpd.conf

diff --git a/audio-players/mpd/FINAL b/audio-players/mpd/FINAL
index 0ba4967..a1541a7 100755
--- a/audio-players/mpd/FINAL
+++ b/audio-players/mpd/FINAL
@@ -1,11 +1,9 @@
# If the user chose to install init script
# we do what mpd need to run as a service correctly
if [[ $INIT_INSTALLED ]]; then
- source ${GRIMOIRE}/libaccount
&&
local MPD_LIB="${INSTALL_ROOT}/var/lib/mpd"
&&
local MPD_DIRS="${MPD_LIB}/music ${MPD_LIB}/playlists"
&&
local MPD_FILES="${INSTALL_ROOT}/var/log/mpd.log
${INSTALL_ROOT}/var/log/mpd.error" &&
- create_account musicdaemon
&&
for dir in "${MPD_LIB} ${MPD_DIRS}";
do
if [[ ! -r ${dir} ]]; then
diff --git a/audio-players/mpd/HISTORY b/audio-players/mpd/HISTORY
index 4a5368a..efcc5bf 100644
--- a/audio-players/mpd/HISTORY
+++ b/audio-players/mpd/HISTORY
@@ -1,3 +1,12 @@
+2007-07-12 Pol Vinogradov <vin.public AT gmail.com>
+ * INSTALL: made config install to /etc/sysconfig/ for init script,
+ removed tabs
+ * FINAL: removed account creating code
+ * PRE_BUILD: added, creates musicdaemon account and does sedit for
+ config file path in source code for init script
+ * init.d/mpd: now uses mpd.db from config file
+ * mpd.conf -> init.d/mpd.conf
+
2007-06-26 Philippe "Puppet_Master" Caseiro <puppetmaster AT sourcemage.org>
* FINAL : using local vars
* INSTALL : fixing installation of config file (SM-COMMIT thread)
diff --git a/audio-players/mpd/INSTALL b/audio-players/mpd/INSTALL
index 79c56d7..380106b 100755
--- a/audio-players/mpd/INSTALL
+++ b/audio-players/mpd/INSTALL
@@ -1,7 +1,8 @@
default_install &&
if [[ $INIT_INSTALLED ]]; then
- cp ${SPELL_DIRECTORY}/mpd.conf ${INSTALL_ROOT}/etc
+ install_config_file ${SCRIPT_DIRECTORY}/init.d/mpd.conf \
+ ${INSTALL_ROOT}/etc/sysconfig/mpd
else
- install_config_file doc/mpdconf.example \
- $INSTALL_ROOT/etc/mpd.conf
-fi
+ install_config_file doc/mpdconf.example \
+ $INSTALL_ROOT/etc/mpd.conf
+fi
diff --git a/audio-players/mpd/PRE_BUILD b/audio-players/mpd/PRE_BUILD
new file mode 100755
index 0000000..3cb03fe
--- /dev/null
+++ b/audio-players/mpd/PRE_BUILD
@@ -0,0 +1,7 @@
+default_pre_build &&
+cd ${SOURCE_DIRECTORY} &&
+
+if [[ $INIT_INSTALLED ]]; then
+ create_account musicdaemon &&
+ sedit "s:/etc/mpd.conf:/etc/sysconfig/mpd:g" src/main.c
+fi
diff --git a/audio-players/mpd/init.d/mpd b/audio-players/mpd/init.d/mpd
index 6bab39a..55030b5 100644
--- a/audio-players/mpd/init.d/mpd
+++ b/audio-players/mpd/init.d/mpd
@@ -4,7 +4,8 @@ PROGRAM=/usr/bin/mpd
ARGS=""
RUNLEVEL=3
NEEDS=""
+MPD_DB="$(grep music_directory /etc/sysconfig/mpd | cut -d \" -f 2)/mpd.db"

-[[ -z "/var/lib/mpd/mpd.db" ]] && ARGS="$ARGS --create-db"
+[[ -z $MPD_DB ]] && ARGS="$ARGS --create-db"

. /etc/init.d/smgl_init
diff --git a/audio-players/mpd/init.d/mpd.conf
b/audio-players/mpd/init.d/mpd.conf
new file mode 100644
index 0000000..2f6d22a
--- /dev/null
+++ b/audio-players/mpd/init.d/mpd.conf
@@ -0,0 +1,245 @@
+# An example configuration file for MPD
+# See the mpd.conf man page for a more detailed description of each
parameter.
+
+######################## REQUIRED PATHS ########################
+music_directory "/var/lib/mpd/music"
+playlist_directory "/var/lib/mpd/playlists"
+db_file "/var/lib/mpd/mpd.db"
+log_file "/var/log/mpd.log"
+error_file "/var/log/mpd.error"
+################################################################
+
+
+######################## OPTIONAL PATHS ########################
+#
+# If you wish to use mpd --kill to stop MPD, then you must
+# specify a file here in which to store MPD's process ID.
+#
+#pid_file "~/.mpd/mpd.pid"
+#
+# If specified, MPD will save its current state (playlist,
+# current song, playing/paused, etc.) at exit. This will be
+# used to restore the session the next time it is run.
+#
+#state_file "~/.mpd/mpdstate"
+#
+################################################################
+
+
+######################## DAEMON OPTIONS ########################
+#
+# If started as root, MPD will drop root privileges and run as
+# this user instead. Otherwise, MPD will run as the user it was
+# started by. If left unspecified, MPD will not drop root
+# privileges at all (not recommended).
+#
+user "musicdaemon"
+#
+# The address and port to listen on.
+#
+bind_to_address "any"
+port "6600"
+#
+# Controls the amount of information that is logged. Can be
+# "default", "secure", or "verbose".
+#
+log_level "default"
+#
+################################################################
+
+
+########################## PERMISSIONS #########################
+#
+# MPD can require that users specify a password before using it.
+# You may specify one ore more here, along with what users who
+# log in with that password are allowed to do.
+#
+#password "password@read,add,control,admin"
+#
+# Specifies what permissions a user who has not logged in with a
+# password has. By default, all users have full access to MPD
+# if no password is specified above, or no access if one or
+# more passwords are specified.
+#
+#default_permissions "read,add,control,admin"
+#
+################################################################
+
+
+########################## AUDIO OUTPUT ########################
+#
+# MPD supports many audio output types, as well as playing
+# through multiple audio outputs at the same time. You can
+# specify one or more here. If you don't specify any, MPD will
+# automatically scan for a usable audio output.
+#
+# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs>
+# for examples of other audio outputs.
+#
+# An example of an ALSA output:
+#
+#audio_output {
+# type "alsa"
+# name "My ALSA Device"
+# device "hw:0,0" # optional
+# format "44100:16:2" # optional
+#}
+#
+# An example of an OSS output:
+#
+#audio_output {
+# type "oss"
+# name "My OSS Device"
+# device "/dev/dsp" # optional
+# format "44100:16:2" # optional
+#}
+#
+# An example of a shout output (for streaming to Icecast):
+#
+#audio_output {
+# type "shout"
+# name "My Shout Stream"
+# host "localhost"
+# port "8000"
+# mount "/mpd.ogg"
+# password "hackme"
+# quality "5.0"
+# bitrate "128"
+# format "44100:16:1"
+# user "source" # optional
+# description "My Stream Description" # optional
+# genre "jazz" # optional
+# public "no" # optional
+#}
+#
+# Force all decoded audio to be converted to this format before
+# being passed to the audio outputs.
+#
+#audio_output_format "44100:16:2"
+#
+################################################################
+
+
+############################# MIXER ############################
+#
+# MPD needs to know what mixer settings to change when you
+# adjust the volume. If you don't specify one here, MPD will
+# pick one based on which ones it was compiled with support for.
+#
+# An example for controlling an ALSA mixer:
+#
+#mixer_type "alsa"
+#mixer_device "default"
+#mixer_control "PCM"
+#
+# An example for controlling an OSS mixer:
+#
+#mixer_type "oss"
+#mixer_device "/dev/mixer"
+#mixer_control "PCM"
+#
+# If you want MPD to adjust the volume of audio sent to the
+# audio outputs, you can tell it to use the software mixer:
+#
+#mixer_type "software"
+#
+################################################################
+
+
+######################### NORMALIZATION ########################
+#
+# Specifies the type of ReplayGain to use. Can be "album" or
+# "track". ReplayGain will not be used if not specified. See
+# <http://www.replaygain.org> for more details.
+#
+#replaygain "album"
+#
+# Sets the pre-amp used for files that have ReplayGain tags.
+#
+#replaygain_preamp "0"
+#
+# Enable on the fly volume normalization. This will cause the
+# volume of all songs played to be adjusted so that they sound
+# as though they are of equal loudness.
+#
+#volume_normalization "no"
+#
+################################################################
+
+
+########################### BUFFERING ##########################
+#
+# The size of the buffer containing decoded audio. You probably
+# shouldn't change this.
+#
+#audio_buffer_size "2048"
+#
+# How much of the buffer to fill before beginning to play.
+#
+#buffer_before_play "0%"
+#
+# Similar options for the HTTP stream buffer. If you hear
+# skipping while playing HTTP streams, you may wish to increase
+# these.
+#
+#http_buffer_size "128"
+#http_prebuffer_size "25%"
+#
+################################################################
+
+
+########################### HTTP PROXY #########################
+#
+# Specifies the HTTP proxy to use for playing HTTP streams.
+#
+#http_proxy_host "proxy.isp.com"
+#http_proxy_port "8080"
+#http_proxy_user "user"
+#http_proxy_password "password"
+#
+################################################################
+
+
+############################# LIMITS ###########################
+#
+# These are various limits to prevent MPD from using too many
+# resources. You should only change them if they start
+# restricting your usage of MPD.
+#
+#connection_timeout "60"
+#max_connections "5"
+#max_playlist_length "16384"
+#max_command_list_size "2048"
+#max_output_buffer_size "8192"
+#
+################################################################
+
+
+###################### CHARACTER ENCODINGS #####################
+#
+# If file or directory names do not display correctly, then you
+# may need to change this. In most cases it should be either
+# "ISO-8859-1" or "UTF-8". You must recreate your database
+# after changing this (use mpd --create-db).
+#
+#filesystem_charset "ISO-8859-1"
+#
+# The encoding that ID3v1 tags should be converted from.
+#
+#id3v1_encoding "ISO-8859-1"
+#
+################################################################
+
+
+######################### OTHER OPTIONS ########################
+#
+# The metadata types MPD will recognize.
+#
+#metadata_to_use
"artist,album,title,track,name,genre,date,composer,performer,disc"
+#
+# Enable this if you wish to use your MPD created playlists in
+# other music players.
+#
+#save_absolute_paths_in_playlists "no"
+#
+################################################################
diff --git a/audio-players/mpd/mpd.conf b/audio-players/mpd/mpd.conf
deleted file mode 100644
index 2f6d22a..0000000
--- a/audio-players/mpd/mpd.conf
+++ /dev/null
@@ -1,245 +0,0 @@
-# An example configuration file for MPD
-# See the mpd.conf man page for a more detailed description of each
parameter.
-
-######################## REQUIRED PATHS ########################
-music_directory "/var/lib/mpd/music"
-playlist_directory "/var/lib/mpd/playlists"
-db_file "/var/lib/mpd/mpd.db"
-log_file "/var/log/mpd.log"
-error_file "/var/log/mpd.error"
-################################################################
-
-
-######################## OPTIONAL PATHS ########################
-#
-# If you wish to use mpd --kill to stop MPD, then you must
-# specify a file here in which to store MPD's process ID.
-#
-#pid_file "~/.mpd/mpd.pid"
-#
-# If specified, MPD will save its current state (playlist,
-# current song, playing/paused, etc.) at exit. This will be
-# used to restore the session the next time it is run.
-#
-#state_file "~/.mpd/mpdstate"
-#
-################################################################
-
-
-######################## DAEMON OPTIONS ########################
-#
-# If started as root, MPD will drop root privileges and run as
-# this user instead. Otherwise, MPD will run as the user it was
-# started by. If left unspecified, MPD will not drop root
-# privileges at all (not recommended).
-#
-user "musicdaemon"
-#
-# The address and port to listen on.
-#
-bind_to_address "any"
-port "6600"
-#
-# Controls the amount of information that is logged. Can be
-# "default", "secure", or "verbose".
-#
-log_level "default"
-#
-################################################################
-
-
-########################## PERMISSIONS #########################
-#
-# MPD can require that users specify a password before using it.
-# You may specify one ore more here, along with what users who
-# log in with that password are allowed to do.
-#
-#password "password@read,add,control,admin"
-#
-# Specifies what permissions a user who has not logged in with a
-# password has. By default, all users have full access to MPD
-# if no password is specified above, or no access if one or
-# more passwords are specified.
-#
-#default_permissions "read,add,control,admin"
-#
-################################################################
-
-
-########################## AUDIO OUTPUT ########################
-#
-# MPD supports many audio output types, as well as playing
-# through multiple audio outputs at the same time. You can
-# specify one or more here. If you don't specify any, MPD will
-# automatically scan for a usable audio output.
-#
-# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs>
-# for examples of other audio outputs.
-#
-# An example of an ALSA output:
-#
-#audio_output {
-# type "alsa"
-# name "My ALSA Device"
-# device "hw:0,0" # optional
-# format "44100:16:2" # optional
-#}
-#
-# An example of an OSS output:
-#
-#audio_output {
-# type "oss"
-# name "My OSS Device"
-# device "/dev/dsp" # optional
-# format "44100:16:2" # optional
-#}
-#
-# An example of a shout output (for streaming to Icecast):
-#
-#audio_output {
-# type "shout"
-# name "My Shout Stream"
-# host "localhost"
-# port "8000"
-# mount "/mpd.ogg"
-# password "hackme"
-# quality "5.0"
-# bitrate "128"
-# format "44100:16:1"
-# user "source" # optional
-# description "My Stream Description" # optional
-# genre "jazz" # optional
-# public "no" # optional
-#}
-#
-# Force all decoded audio to be converted to this format before
-# being passed to the audio outputs.
-#
-#audio_output_format "44100:16:2"
-#
-################################################################
-
-
-############################# MIXER ############################
-#
-# MPD needs to know what mixer settings to change when you
-# adjust the volume. If you don't specify one here, MPD will
-# pick one based on which ones it was compiled with support for.
-#
-# An example for controlling an ALSA mixer:
-#
-#mixer_type "alsa"
-#mixer_device "default"
-#mixer_control "PCM"
-#
-# An example for controlling an OSS mixer:
-#
-#mixer_type "oss"
-#mixer_device "/dev/mixer"
-#mixer_control "PCM"
-#
-# If you want MPD to adjust the volume of audio sent to the
-# audio outputs, you can tell it to use the software mixer:
-#
-#mixer_type "software"
-#
-################################################################
-
-
-######################### NORMALIZATION ########################
-#
-# Specifies the type of ReplayGain to use. Can be "album" or
-# "track". ReplayGain will not be used if not specified. See
-# <http://www.replaygain.org> for more details.
-#
-#replaygain "album"
-#
-# Sets the pre-amp used for files that have ReplayGain tags.
-#
-#replaygain_preamp "0"
-#
-# Enable on the fly volume normalization. This will cause the
-# volume of all songs played to be adjusted so that they sound
-# as though they are of equal loudness.
-#
-#volume_normalization "no"
-#
-################################################################
-
-
-########################### BUFFERING ##########################
-#
-# The size of the buffer containing decoded audio. You probably
-# shouldn't change this.
-#
-#audio_buffer_size "2048"
-#
-# How much of the buffer to fill before beginning to play.
-#
-#buffer_before_play "0%"
-#
-# Similar options for the HTTP stream buffer. If you hear
-# skipping while playing HTTP streams, you may wish to increase
-# these.
-#
-#http_buffer_size "128"
-#http_prebuffer_size "25%"
-#
-################################################################
-
-
-########################### HTTP PROXY #########################
-#
-# Specifies the HTTP proxy to use for playing HTTP streams.
-#
-#http_proxy_host "proxy.isp.com"
-#http_proxy_port "8080"
-#http_proxy_user "user"
-#http_proxy_password "password"
-#
-################################################################
-
-
-############################# LIMITS ###########################
-#
-# These are various limits to prevent MPD from using too many
-# resources. You should only change them if they start
-# restricting your usage of MPD.
-#
-#connection_timeout "60"
-#max_connections "5"
-#max_playlist_length "16384"
-#max_command_list_size "2048"
-#max_output_buffer_size "8192"
-#
-################################################################
-
-
-###################### CHARACTER ENCODINGS #####################
-#
-# If file or directory names do not display correctly, then you
-# may need to change this. In most cases it should be either
-# "ISO-8859-1" or "UTF-8". You must recreate your database
-# after changing this (use mpd --create-db).
-#
-#filesystem_charset "ISO-8859-1"
-#
-# The encoding that ID3v1 tags should be converted from.
-#
-#id3v1_encoding "ISO-8859-1"
-#
-################################################################
-
-
-######################### OTHER OPTIONS ########################
-#
-# The metadata types MPD will recognize.
-#
-#metadata_to_use
"artist,album,title,track,name,genre,date,composer,performer,disc"
-#
-# Enable this if you wish to use your MPD created playlists in
-# other music players.
-#
-#save_absolute_paths_in_playlists "no"
-#
-################################################################



  • [SM-Commit] GIT changes to master grimoire by Pol Vinogradov (ca9c24cba55d8393c361333a0bae6710e9b67b90), Pol Vinogradov, 07/12/2007

Archive powered by MHonArc 2.6.24.

Top of Page