[csw-devel] SF.net SVN: gar:[5238] csw/mgar/pkg/mpd/trunk

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Jun 13 16:54:18 CEST 2009


Revision: 5238
          http://gar.svn.sourceforge.net/gar/?rev=5238&view=rev
Author:   wahwah
Date:     2009-06-13 14:54:18 +0000 (Sat, 13 Jun 2009)

Log Message:
-----------
mpd: ported from v1 to v2, upped version to 0.14.2; unfortunately, mpd segfaults.

Modified Paths:
--------------
    csw/mgar/pkg/mpd/trunk/Makefile
    csw/mgar/pkg/mpd/trunk/checksums
    csw/mgar/pkg/mpd/trunk/files/mpd.conf
    csw/mgar/pkg/mpd/trunk/files/svc-cswmpd

Added Paths:
-----------
    csw/mgar/pkg/mpd/trunk/files/cswmpd.init
    csw/mgar/pkg/mpd/trunk/files/cswusergroup

Removed Paths:
-------------
    csw/mgar/pkg/mpd/trunk/files/CSWmpd.csw_usrgrp_config
    csw/mgar/pkg/mpd/trunk/files/CSWmpd.depend
    csw/mgar/pkg/mpd/trunk/files/CSWmpd.gspec
    csw/mgar/pkg/mpd/trunk/files/CSWmpd.prototype
    csw/mgar/pkg/mpd/trunk/files/cswmpd.xml

Property Changed:
----------------
    csw/mgar/pkg/mpd/trunk/


Property changes on: csw/mgar/pkg/mpd/trunk
___________________________________________________________________
Modified: svn:externals
   - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v1

   + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2


Modified: csw/mgar/pkg/mpd/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mpd/trunk/Makefile	2009-06-12 09:54:46 UTC (rev 5237)
+++ csw/mgar/pkg/mpd/trunk/Makefile	2009-06-13 14:54:18 UTC (rev 5238)
@@ -1,5 +1,5 @@
 GARNAME = mpd
-GARVERSION = 0.13.0
+GARVERSION = 0.14.2
 CATEGORIES = server
 
 DESCRIPTION = The Music Player Daemon
@@ -12,41 +12,61 @@
 like frontend options, or restart X often.
 endef
 
-MASTER_SITES = http://musicpd.org/uploads/files/
-DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
-DISTFILES += $(call admfiles,CSWmpd,prototype)
-DISTFILES += cswmpd.xml svc-cswmpd cswmpd
-DISTFILES += CSWmpd.csw_usrgrp_config
+# A problem:
+#
+# The build, ported from gar v1 to v2 by Maciej Bliziński is pretty much done,
+# but unfortunately, mpd segfaults when testing. More debugging is needed; this
+# build is being submitted to separate segfault fixes from v1-v2 port.
 
+SF_PROJ = musicpd
+MASTER_SITES = $(SF_MIRROR)
+DISTFILES  = $(GARNAME)-$(GARVERSION).tar.bz2
+DISTFILES += cswmpd.init
+DISTFILES += cswusergroup
+DISTFILES += mpd.conf
+
 # We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
+UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2
 
 TEST_TARGET = check
 
-include gar/category.mk
+SPKG_CLASSES = none cswcpsampleconf cswusergroup ugfiles cswinitsmf
+PROTOTYPE_FILTER  = awk ' \
+    $$$$3 ~ /\/init.d\/cswmpd$$$$/ { $$$$2 = "cswinitsmf" } \
+    $$$$3 ~ /\/mpd\.conf\.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } \
+    $$$$3 ~ /\/CSWmpd\/cswusergroup$$$$/ { $$$$2 = "cswusergroup" } \
+    $$$$3 ~ /\/var\/opt\/csw\/mpd/ { $$$$5 = "mpd" } \
+    $$$$3 ~ /\/var\/opt\/csw\/mpd/ { $$$$2 = "ugfiles" } \
+    $$$$3 ~ /\/sbin\/mpd$$$$/ { $$$$4 = "0755" } \
+    { print }'
+GARCOMPILER = SOS12
 
 CONFIGURE_ARGS = $(DIRPATHS)
 CONFIGURE_ARGS += --enable-ao
 CONFIGURE_ARGS += --bindir=/opt/csw/sbin
 
-$(DOWNLOADDIR)/cswmpd: files/svc-cswmpd
-	@echo "Copying svc-cswmpd to cswmpd"
-	@cp files/svc-cswmpd download/cswmpd
+sysconfdir = /etc/opt/csw
+localstatedir = /var/opt/csw
 
-pre-fetch: $(DOWNLOADDIR)/cswmpd
+post-install-modulated:
+	ginstall -d $(DESTDIR)/var/opt/csw/mpd
+	ginstall -d $(DESTDIR)/var/opt/csw/mpd/playlists
+	ginstall -d $(DESTDIR)/var/opt/csw/mpd/music
+	ginstall -d $(DESTDIR)/etc/opt/csw/init.d
+	ginstall -m 0644 $(FILEDIR)/mpd.conf $(DESTDIR)/etc/opt/csw/mpd.conf.CSW
+	ginstall $(FILEDIR)/cswmpd.init $(DESTDIR)/etc/opt/csw/init.d/cswmpd
+	ginstall -D $(FILEDIR)/cswusergroup $(DESTDIR)/opt/csw/etc/pkg/CSWmpd/cswusergroup
 
-post-install:
-	ginstall -d $(DESTDIR)/opt/csw/var/mpd
-	ginstall -d $(DESTDIR)/opt/csw/var/mpd/playlists
-	ginstall -d $(DESTDIR)/opt/csw/var/mpd/music
-	ginstall -D files/mpd.conf $(DESTDIR)/opt/csw/etc/mpd.conf
+REQUIRED_PKGS  = CSWaudiofile
+REQUIRED_PKGS += CSWcswclassutils
+REQUIRED_PKGS += CSWflac
+REQUIRED_PKGS += CSWggettextrt
+REQUIRED_PKGS += CSWglib2
+REQUIRED_PKGS += CSWlibao
+REQUIRED_PKGS += CSWlibid3tag
+REQUIRED_PKGS += CSWlibmad
+REQUIRED_PKGS += CSWzlib
 
-# pkg-get -i libao libid3tag libogg libflac libmikmod
+PREREQUISITE_PKGS  = $(REQUIRED_PKGS)
 
-# Special goal to generate a proper prototype file 
-proto:
-	../../bin/cswproto -s $(TIMESTAMP) -r $(DESTDIR) $(DESTDIR)/opt/csw/ | \
-		sed "s,\(.*var.mpd.* 0755\).*,\1 mpd other," > files/CSWmpd.prototype
-
-get-packages:
-	@echo Run this: pkg-get -i libao id3lib
+include gar/category.mk

Modified: csw/mgar/pkg/mpd/trunk/checksums
===================================================================
--- csw/mgar/pkg/mpd/trunk/checksums	2009-06-12 09:54:46 UTC (rev 5237)
+++ csw/mgar/pkg/mpd/trunk/checksums	2009-06-13 14:54:18 UTC (rev 5238)
@@ -1,7 +1,4 @@
-0b33bdb9d706439949344073e90f812a  download/mpd-0.13.0.tar.gz
-39015e8c4e557ab440f832c260d38002  download/CSWmpd.gspec
-e0d888543964e43c1dd03b40c65acf5d  download/CSWmpd.prototype
-90aa960c06cd212d963eab90926d6548  download/cswmpd.xml
-56a5c775ff069a3cbb422734dd8b3a64  download/svc-cswmpd
-56a5c775ff069a3cbb422734dd8b3a64  download/cswmpd
-03408785bcbba1da83f80e6ccb8ff5d3  download/CSWmpd.csw_usrgrp_config
+e02f090a3592231ce20683f3b9d8f965  download/cswmpd.init
+6fee19ad604cfb80c5a13106df6c8925  download/cswusergroup
+66817a4b4c05454e6488f6b821f2a6a3  download/mpd-0.14.2.tar.bz2
+cbfadc495881963071465341cbb6b411  download/mpd.conf

Deleted: csw/mgar/pkg/mpd/trunk/files/CSWmpd.csw_usrgrp_config
===================================================================
--- csw/mgar/pkg/mpd/trunk/files/CSWmpd.csw_usrgrp_config	2009-06-12 09:54:46 UTC (rev 5237)
+++ csw/mgar/pkg/mpd/trunk/files/CSWmpd.csw_usrgrp_config	2009-06-13 14:54:18 UTC (rev 5238)
@@ -1,2 +0,0 @@
-version=1
-user=mpd:other:/opt/csw/var/mpd:/bin/sh:Music Playing Daemon

Deleted: csw/mgar/pkg/mpd/trunk/files/CSWmpd.depend
===================================================================
--- csw/mgar/pkg/mpd/trunk/files/CSWmpd.depend	2009-06-12 09:54:46 UTC (rev 5237)
+++ csw/mgar/pkg/mpd/trunk/files/CSWmpd.depend	2009-06-13 14:54:18 UTC (rev 5238)
@@ -1,13 +0,0 @@
-P CSWaudiofile   audiofile - Silicon Graphics Audio File Library
-P CSWlibsamplerate libsamplerate - Secret Rabbit Code (aka libsamplerate) is a Sample Rate Converter for audio
-P CSWfaad2       faad2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
-P CSWflac        libflac - FLAC audio codec support library
-P CSWiconv       libiconv - GNU iconv library
-P CSWlibao       libao - Cross-platform audio library
-P CSWlibid3tag   libid3tag - a library for reading and (eventually) writing ID3 tags
-P CSWlibmad      libmad - MPEG Audio Decoder
-P CSWlibogg      libogg - Ogg bitstream format support library
-P CSWmikmod      libmikmod - library and player for MOD audio files and other types
-P CSWsunmath     libsunmath - Sun maths library
-P CSWvorbis      libvorbis - Vorbis audio codec support library
-P CSWzlib        zlib - Zlib Data Compression Library

Deleted: csw/mgar/pkg/mpd/trunk/files/CSWmpd.gspec
===================================================================
--- csw/mgar/pkg/mpd/trunk/files/CSWmpd.gspec	2009-06-12 09:54:46 UTC (rev 5237)
+++ csw/mgar/pkg/mpd/trunk/files/CSWmpd.gspec	2009-06-13 14:54:18 UTC (rev 5238)
@@ -1,7 +0,0 @@
-%var            bitname mpd
-%var            pkgname CSWmpd
-%include        url file://%{PKGLIB}/csw_dyndepend.gspec
-%copyright      url file://%{WORKSRC}/COPYING
-
-%include        url file://%{PKGLIB}/smf_enabled.gspec
-%include        url file://%{PKGLIB}/csw_usrgrp.gspec

Deleted: csw/mgar/pkg/mpd/trunk/files/CSWmpd.prototype
===================================================================
--- csw/mgar/pkg/mpd/trunk/files/CSWmpd.prototype	2009-06-12 09:54:46 UTC (rev 5237)
+++ csw/mgar/pkg/mpd/trunk/files/CSWmpd.prototype	2009-06-13 14:54:18 UTC (rev 5238)
@@ -1,24 +0,0 @@
-d none /opt/csw/bin 0755 root bin
-d none /opt/csw/etc 0755 root bin
-f none /opt/csw/etc/mpd.conf 0755 root bin
-d none /opt/csw/include 0755 root bin
-d none /opt/csw/lib 0755 root bin
-d none /opt/csw/lib/pkgconfig 0755 root bin
-d none /opt/csw/sbin 0755 root bin
-f none /opt/csw/sbin/mpd 0755 root bin
-d none /opt/csw/share 0755 root bin
-d none /opt/csw/share/doc 0755 root bin
-d none /opt/csw/share/doc/mpd 0755 root bin
-f none /opt/csw/share/doc/mpd/COMMANDS 0644 root bin
-f none /opt/csw/share/doc/mpd/README 0644 root bin
-f none /opt/csw/share/doc/mpd/UPGRADING 0644 root bin
-f none /opt/csw/share/doc/mpd/mpdconf.example 0644 root bin
-d none /opt/csw/share/man 0755 root bin
-d none /opt/csw/share/man/man1 0755 root bin
-f none /opt/csw/share/man/man1/mpd.1 0644 root bin
-d none /opt/csw/share/man/man5 0755 root bin
-f none /opt/csw/share/man/man5/mpd.conf.5 0644 root bin
-d none /opt/csw/var 0755 root bin
-d none /opt/csw/var/mpd 0755 mpd other
-d none /opt/csw/var/mpd/playlists 0755 mpd other
-d none /opt/csw/var/mpd/music 0755 mpd other

Added: csw/mgar/pkg/mpd/trunk/files/cswmpd.init
===================================================================
--- csw/mgar/pkg/mpd/trunk/files/cswmpd.init	                        (rev 0)
+++ csw/mgar/pkg/mpd/trunk/files/cswmpd.init	2009-06-13 14:54:18 UTC (rev 5238)
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+set -e
+
+##########################################################
+# Get configuration values and set defaults
+##########################################################
+
+PREFIX=/opt/csw
+
+if [ -z "$CONF" ]
+then
+  CONF=/etc/opt/csw/mpd.conf
+fi
+
+##########################################################
+# Validate
+##########################################################
+
+if [ "$VERBOSE" = "true" ]
+then
+  VERBOSE="--verbose"
+else
+  VERBOSE=""
+fi
+
+##########################################################
+# Main
+##########################################################
+
+start() {
+  $PREFIX/sbin/mpd $VERBOSE $CONF
+}
+
+stop() {
+  $PREFIX/sbin/mpd $VERBOSE --kill $CONF
+}
+
+case "$1" in
+  start)
+    start
+  ;;
+
+  stop)
+    stop
+  ;;
+
+  refresh)
+    stop
+    start
+  ;;
+
+  *)
+    echo "Usage: $0 {start|stop|refresh}"
+    exit 1
+  ;;
+esac

Deleted: csw/mgar/pkg/mpd/trunk/files/cswmpd.xml
===================================================================
--- csw/mgar/pkg/mpd/trunk/files/cswmpd.xml	2009-06-12 09:54:46 UTC (rev 5237)
+++ csw/mgar/pkg/mpd/trunk/files/cswmpd.xml	2009-06-13 14:54:18 UTC (rev 5238)
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
-
-<service_bundle type="manifest" name="cswmpd">
-
-<service name="application/cswmpd" type="service" version="1">
-
-  <dependency name="loopback" grouping="require_all" restart_on="error" type="service">
-    <service_fmri value="svc:/network/loopback:default"/>
-  </dependency>
-
-  <dependency name="physical" grouping="optional_all" restart_on="error" type="service">
-    <service_fmri value="svc:/network/physical:default"/>
-  </dependency>
-
-  <dependency name="filesystem" grouping="require_all" restart_on="none" type="service">
-    <service_fmri value="svc:/system/filesystem/local"/>
-  </dependency>
-
-  <method_context>
-    <method_credential user="mpd" group="other"/>
-  </method_context>
-
-  <exec_method type="method" name="start" exec="/opt/csw/lib/svc/method/svc-cswmpd start" timeout_seconds="10"/>
-
-  <exec_method type="method" name="stop" exec="/opt/csw/lib/svc/method/svc-cswmpd stop" timeout_seconds="10"/>
-
-  <exec_method type="method" name="refresh" exec="/opt/csw/lib/svc/method/svc-cswmpd refresh" timeout_seconds="10"/>
-
-  <instance name="default" enabled="false">
-    <property_group name='mpd' type='application'>
-      <propval name='config'          type='astring' value='/opt/csw/etc/mpd.conf'/>
-      <propval name='verbose'         type='astring' value='false'/>
-    </property_group>
-  </instance>
-
-  <template>
-    <common_name>
-      <loctext xml:lang="C">Music Player Daemon</loctext>
-    </common_name>
-  </template>
-
-</service>
-</service_bundle>

Added: csw/mgar/pkg/mpd/trunk/files/cswusergroup
===================================================================
--- csw/mgar/pkg/mpd/trunk/files/cswusergroup	                        (rev 0)
+++ csw/mgar/pkg/mpd/trunk/files/cswusergroup	2009-06-13 14:54:18 UTC (rev 5238)
@@ -0,0 +1 @@
+mpd:bin:Music Player Daemon:/var/opt/csw/mpd:/bin/false:m:

Modified: csw/mgar/pkg/mpd/trunk/files/mpd.conf
===================================================================
--- csw/mgar/pkg/mpd/trunk/files/mpd.conf	2009-06-12 09:54:46 UTC (rev 5237)
+++ csw/mgar/pkg/mpd/trunk/files/mpd.conf	2009-06-13 14:54:18 UTC (rev 5238)
@@ -33,7 +33,7 @@
 # started by.  If left unspecified, MPD will not drop root
 # privileges at all (not recommended).
 #
-#user                            "nobody"
+user                            "mpd"
 #
 # The address and port to listen on.
 #

Modified: csw/mgar/pkg/mpd/trunk/files/svc-cswmpd
===================================================================
--- csw/mgar/pkg/mpd/trunk/files/svc-cswmpd	2009-06-12 09:54:46 UTC (rev 5237)
+++ csw/mgar/pkg/mpd/trunk/files/svc-cswmpd	2009-06-13 14:54:18 UTC (rev 5238)
@@ -23,7 +23,7 @@
 
 if [ -z "$CONF" ]
 then
-  CONF=/opt/csw/etc/mpd.conf
+  CONF=/etc/opt/csw/mpd.conf
 fi
 
 ##########################################################


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list