]> Pileus Git - ~andy/sunrise/blob - media-sound/scala-bin/scala-bin-2.2.ebuild
media-sound/scala-bin: Changed the license to SCALA
[~andy/sunrise] / media-sound / scala-bin / scala-bin-2.2.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils fdo-mime gnome2-utils versionator
6
7 MY_PV=$(delete_all_version_separators ${PV})
8 MY_P="${PN/-bin}-${MY_PV}-pc-linux"
9
10 DESCRIPTION="Powerful software tool to experiment with musical tunings"
11 HOMEPAGE="http://www.huygens-fokker.org/scala/"
12 SRC_URI="http://www.huygens-fokker.org/software/${MY_P}.tar.bz2"
13
14 LICENSE="SCALA"
15 SLOT="0"
16 KEYWORDS="-* ~x86"
17 IUSE="midi"
18
19 RDEPEND="=virtual/gnat-4.1*
20         >=dev-ada/gtkada-2.8.0
21         midi? ( media-sound/playmidi )"
22
23 RESTRICT="mirror strip test"
24 S=${WORKDIR}/${MY_P}
25
26 src_unpack() {
27         unpack ${A}
28         cd "${S}"
29         rm -f libgtkada-2.8.so.0 || die "cannot delete bundled gtkada"
30 }
31
32 src_install() {
33         for i in html xpm ; do
34                 insinto /opt/${PN}/${i}
35                 doins ${i}/* || die "doins failed"
36         done
37
38         insinto /opt/${PN}
39         doins *.{clv,gif,htm,html,kbm,par,scl,seq} scala.{ini,ico} scalarc || die "doins failed"
40
41         exeinto /opt/${PN}/cmd
42         doexe cmd/* || die "doexe failed"
43         exeinto /opt/${PN}
44         doexe *.cmd || die "doexe failed"
45
46         doexe scala || die "failed to install main binary"
47         dosym /opt/${PN}/scala /opt/bin/scala
48         doicon "${FILESDIR}"/${PN}.png || die
49         make_desktop_entry scala Scala ${PN} \
50                 'AudioVideo;Audio;GNOME;GTK;Midi;Music' Path=/opt/${PN}
51
52         dodoc cmdlist.txt commands.txt dummies.txt first.txt readme.txt || die
53
54         echo 'SCALA_HOME="/opt/scala-bin"' > "${T}"/99${PN}
55         doenvd "${T}"/99${PN} || die
56 }
57
58 pkg_postinst() {
59         fdo-mime_desktop_database_update
60         gnome2_icon_cache_update
61
62         elog "A collection of over 3600 scales can be downloaded from"
63         elog "  http://www.huygens-fokker.org/docs/scales.zip"
64         elog "Unpack them to /opt/${PN}/scl directory using unzip -a scales.zip command."
65         elog
66         elog "NOTE: The -a option is important! The files cannot be opened if"
67         elog "NOTE: they are unzipped on Linux without this option!"
68 }
69
70 pkg_postrm() {
71         fdo-mime_desktop_database_update
72         gnome2_icon_cache_update
73
74         if [[ -d ${ROOT}/opt/${PN}/scl ]] ; then
75                 elog "Seems that you have installed custom scales to ${ROOT}/opt/${PN}/scl"
76                 elog "You will have to delete this directory manually."
77         fi
78 }