linamh/media-tv/otrdecoder-bin/otrdecoder-bin-0.4.1133.ebuild
2021-08-20 15:58:48 +02:00

45 lines
1.3 KiB
Bash

# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=2
DESCRIPTION="Decoder for onlinetvrecorder.com (German)"
HOMEPAGE="http://www.onlinetvrecorder.com/"
SRC_URI="amd64? ( http://www.onlinetvrecorder.com/downloads/otrdecoder-bin-x86_64-unknown-linux-gnu-0.4.1133.tar.bz2 )
x86? ( http://www.onlinetvrecorder.com/downloads/otrdecoder-bin-linux-Ubuntu_8.04-i686-0.4.1133.tar.bz2 )"
LICENSE="as-is"
SLOT="0"
KEYWORDS="~amd64 ~x86 -*"
IUSE="X"
RDEPEND="X? ( gnome-base/libglade
dev-python/pygtk )"
BDEPEND="dev-util/patchelf"
RESTRICT="strip"
src_unpack() {
default
mv ${PN}-* "${S}" || die
}
src_prepare() {
sed -i -e "/xml/s:decoderpath:'/usr/share/${PN}':" "${S}"/otrdecoder-gui || die "sed failed"
patchelf --replace-needed libavcodec.so.52 libavcodec.so.58 "${S}"/otrdecoder || die "Unable to patch elf"
patchelf --replace-needed libavformat.so.52 libavformat.so.58 "${S}"/otrdecoder || die "Unable to patch elf"
patchelf --replace-needed libavutil.so.49 libavutil.so.56 "${S}"/otrdecoder || die "Unable to patch elf"
}
src_install() {
dobin otrdecoder || die "dobin failed"
if use X; then
insinto /usr/share/${PN}
doins decoder.glade || die "doins failed"
dobin otrdecoder-gui || die "dobin failed"
fi
dodoc README.OTR || die "dodoc failed"
}