# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" UBUNTU_PV="0ubuntu1~ppa1k" OPENSHOT_A="${PN}_${PV}-${UBUNTU_PV}.tar.gz" inherit eutils python fdo-mime DESCRIPTION="OpenShot Video Editor is a free, open-source, non-linear video editor, based on Python, GTK, and MLT." HOMEPAGE="http://www.openshotvideo.com" #MAIN_URI="http://launchpad.net/openshot/build-wizard/create-a-build-wizard/+download" MAIN_URI="http://launchpad.net/~openshot.developers/+archive/ppa/+files" SRC_URI="${MAIN_URI}/${OPENSHOT_A}" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="dvgrab faac faad ieee1394 jack jack-rack kino ladspa quicktime" # Notes on depends: # FIXME several of these should be DEPEND and NOT RDEPEND # app-arch/deb2targz is for converting the OpenShot program's .deb package # dev-lang/swig is for compiling the MLT Python bindings # media-libs/mlt is so we don't have to depend on OpenShot's rather # large (~22M) .deb dependencies package (we only use 1 file from it) # Everything else is required by OpenShot or is an optional/USE feature DEPEND="app-arch/deb2targz dev-lang/swig dev-libs/libxml2 dev-python/pygoocanvas dev-python/pyxdg gnome-base/librsvg media-libs/celt[-ogg] media-libs/mlt[dv,ffmpeg,frei0r,libsamplerate,melt,sdl,python] media-video/ffmpeg[encode,sdl,theora] media-plugins/frei0r-plugins media-libs/libdv[sdl] media-libs/libsamplerate media-libs/libtheora[encode] media-libs/libvorbis media-sound/sox[encode,ffmpeg,libsamplerate] media-libs/libsdl ieee1394? ( sys-libs/libavc1394 media-libs/libdc1394 sys-libs/libraw1394 ) quicktime? ( media-libs/libquicktime ) dvgrab? ( media-video/dvgrab ) faac? ( media-libs/faac ) faad? ( media-libs/faad2 ) jack? ( media-sound/jack-audio-connection-kit ) jack-rack? ( media-sound/jack-rack ) kino? ( media-video/kino ) ladspa? ( media-libs/ladspa-sdk ) lame? ( media-sound/lame ) x264? ( media-libs/x264 )" RDEPEND="${DEPEND}" S="${WORKDIR}/${PN}" src_install() { # Install the main executable and melt dobin bin/openshot # Install OpenShot links and images insinto /usr/share/applications doins xdg/openshot.desktop insinto /usr/share/pixmaps doins xdg/openshot.png insinto /usr/share/mime/packages doins xdg/openshot.xml insinto /usr/lib/mime/packages doins xdg/openshot # Install documentation doman docs/openshot.1 # Copy over the rest of OpenShot's files # FIXME: use fperms here and avoid the chmod mess insinto /usr/share/openshot doins -r openshot/* } pkg_postinst() { # Recreate permissions for executables # Now this is really ugly... but sadly there's no way to avoid it yet local INSTDIR=/usr/share/openshot # Fix file permissions chmod +x ${INSTDIR}/titles/* chmod +x ${INSTDIR}/windows/*.py chmod +x ${INSTDIR}/windows/glade/*.glade chmod +x ${INSTDIR}/classes/*.py # Refresh shared libraries ldconfig # FIXME: verboten, and probably unneeded. # Update our mime database to relect new changes fdo-mime_mime_database_update fdo-mime_desktop_database_update elog elog "The import and export features of this program rely" elog "heavily on its dependencies' USE flags such as" elog "media-libs/mlt and media-video/ffmpeg. If you find you" elog "can't export or import a certain media format, consider" elog "reviewing and modifying these USE flags accordingly." elog elog elog " Please report any bugs with the ebuild to" elog " http://bugs.gentoo.org/283673" elog } pkg_postrm() { # Update our mime database to reflect new changes fdo-mime_mime_database_update fdo-mime_desktop_database_update }