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