audio/linux-f10-alsa-plugins-oss

Andriy Gapon avg at FreeBSD.org
Fri Apr 29 05:41:22 UTC 2011


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


More information about the freebsd-multimedia mailing list