diff options
author | Cristian Moldovan <cristian@crismblog.ro> | 2015-07-02 23:19:38 +0300 |
---|---|---|
committer | Cristian Moldovan <cristian@crismblog.ro> | 2015-07-02 23:19:38 +0300 |
commit | cd2b66138df7abfa3690b205f6b1ede2658893a3 (patch) | |
tree | ed89e91120f26513326f08dd9d3383aa5758f319 /eclass | |
parent | 0d0a2f9e17338ad6f24a285707a5beaa738ead76 (diff) | |
parent | 5029ecadba3e5ee5ec1eac9820997a282410b9e9 (diff) |
Merge pull request #54 from crismblog/master
add eclass deadbeef
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/deadbeef-plugins.eclass | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/eclass/deadbeef-plugins.eclass b/eclass/deadbeef-plugins.eclass new file mode 100644 index 00000000..68c77ccf --- /dev/null +++ b/eclass/deadbeef-plugins.eclass @@ -0,0 +1,44 @@ +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: deadbeef-plugins.eclass +# @MAINTAINER: +# Roman Kuzmitsky <damex.pp@gmail.com> +# @BLURB: Eclass for automating deadbeef player plugins installation. +# @DESCRIPTION: +# This eclass makes trivial deadbeef plugin ebuilds possible. +# Many things that would normally be done manually is automated. + +if [[ "${EAPI}" -lt 5 ]] ; then + die "EAPI="${EAPI}" is not supported" +fi + +inherit eutils + +: ${SLOT:=0} + +RDEPEND+=" media-sound/deadbeef:0" +DEPEND+=" media-sound/deadbeef:0" + +RESTRICT+=" mirror" + +if [[ "${DEADBEEF_GUI}" == "yes" ]] ; then + IUSE+=" +gtk2 gtk3" + REQUIRED_USE="|| ( gtk2 gtk3 )" + GUI_DEPEND="gtk2? ( media-sound/deadbeef:0[gtk2] ) + gtk3? ( media-sound/deadbeef:0[gtk3] )" + RDEPEND+=" ${GUI_DEPEND}" + DEPEND+=" ${GUI_DEPEND}" +fi + +EXPORT_FUNCTIONS "src_install" + +# @FUNCTION: deadbeef-plugins_src_install +# @DESCRIPTION: +# Looking for a *.so deadbeef plugins and installs found plugins to corresponding deadbeef directory. +deadbeef-plugins_src_install() { + local plugins=`find "${WORKDIR}" -name "*.so" -type f` + for plugin in ${plugins} ; do + insinto "/usr/$(get_libdir)/deadbeef" + doins "${plugin}" + done +} |