Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Apr 2011 08:41:11 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Juergen Lock <nox@jelal.kn-bremen.de>
Cc:        netchild@FreeBSD.org, emulation@FreeBSD.org, multimedia@FreeBSD.org, Alexander Leidinger <Alexander@Leidinger.net>, Ion-Mihai Tetcu <itetcu@FreeBSD.org>, fluffy@FreeBSD.org
Subject:   Re: audio/linux-f10-alsa-plugins-oss
Message-ID:  <4DBA4F77.1000409@FreeBSD.org>
In-Reply-To: <20110428201939.GA16556@triton8.kn-bremen.de>
References:  <20110426174449.GA4437@triton8.kn-bremen.de> <20110426185132.GA8111@triton8.kn-bremen.de> <4DB72341.7060201@FreeBSD.org> <20110426202349.GA14855@triton8.kn-bremen.de> <4DB7BC6A.7060207@FreeBSD.org> <20110427163047.GA47520@triton8.kn-bremen.de> <7d7a2fab-7c4e-44ce-bdf2-93811c40a4fe@email.android.com> <20110428193351.GA8814@triton8.kn-bremen.de> <68864477@h30.sp.ipt.ru> <20110428220114.00004b22@unknown> <20110428201939.GA16556@triton8.kn-bremen.de>

next in thread | previous in thread | raw e-mail | index | archive | help

There is another thing that I've just noticed - wouldn't the port overwrite a
custom pcm-oss.conf (if any)?

I think it would be nice to do the usual .conf-dist vs .conf dance here.
E.g. something like:
CONF_FILE=      etc/alsa/pcm/pcm-oss.conf

post-patch:
	@${RM} ${WRKDIR}/${CONF_FILE}.orig
	@${MV} ${WRKDIR}/${CONF_FILE} ${WRKDIR}/${CONF_FILE}-dist

post-install:
	@if [ ! -f ${PREFIX}/${CONF_FILE} ]; then \
		${CP} -p ${PREFIX}/${CONF_FILE}-dist ${PREFIX}/${CONF_FILE} ; \
	fi
	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL


And in pkg-plist:
@unexec if cmp -s %D/etc/alsa/pcm/pcm-oss.conf-dist
%D/etc/alsa/pcm/pcm-oss.conf; then rm -f %D/etc/alsa/pcm/pcm-oss.conf; fi
etc/alsa/pcm/pcm-oss.conf-dist
@exec if [ ! -f %D/etc/alsa/pcm/pcm-oss.conf ] ; then cp -p %D/%F %B/client.conf; fi


What do you think?

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DBA4F77.1000409>