# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: Exp $ #inherit versionator eutils inherit eutils MY_PN="HTCFlasher" MY_PV="${PV/_p/-}" DESCRIPTION="ROM Update Utility (RUU) suite for HTC devices" HOMEPAGE="http://code.google.com/p/${PN}/" SRC_URI="http://${PN}.googlecode.com/files/${MY_PN}-${MY_PV}.tar.gz http://www.eslack.org/pof/LRK/LRK-tools.tgz" RESTRICT="nomirror" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="lrk yang" #S="${WORKDIR}/${MY_PN}-$(get_version_component_range 1 ${MY_PV})" S="${WORKDIR}/${MY_PN}-${MY_PV/-*}" DEPEND="" RDEPEND=" gnome-extra/zenity lrk? ( =x11-misc/gtkdialog-0.7* app-emulation/wine app-arch/cabextract app-text/dos2unix app-arch/lcab ) yang? ( =x11-misc/gtkdialog-0.7* ) " src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${MY_PN}_desktop-paths.diff } src_install() { dobin src/${MY_PN} doman man/${MY_PN}.1 dobin gui/${MY_PN}GUI doman man/${MY_PN}GUI.1 domenu gui/${PN/-/}.desktop doicon gui/${PN/-/}.png dodoc AUTHORS COPYING FAQ README* if use yang ; then dobin src/yang doman man/yang.1 dobin gui/yangGUI domenu gui/yang.desktop doicon gui/yang.png fi if use lrk ; then dobin RomKitchen/lrk-build dobin RomKitchen/lrk-extract dobin RomKitchen/lrk-packages dobin RomKitchen/lrk-scripts dodoc RomKitchen/README.lrk dobin RomKitchen/lrk domenu RomKitchen/lrk.desktop doicon RomKitchen/lrk.svg insinto /usr/share/LinuxRomKitchen doins RomKitchen/lrk-preload doins ${WORKDIR}/LRK-tools/*.exe doins ${WORKDIR}/LRK-tools/*.dll if [[ -x $(which winetricks) ]] ; then dosym $(which winetricks) /usr/share/LinuxRomKitchen/winetricks else exeinto /usr/share/LinuxRomKitchen doexe ${WORKDIR}/LRK-tools/winetricks fi fi } pkg_setup() { if use lrk; then info_winetricks einfo "You can stop emerging '${P}' now to take care" einfo "of the 'winetricks' script first..." epause 10 fi } pkg_postinst() { if use lrk; then info_winetricks fi } info_winetricks() { einfo "" einfo "The Linux ROM Kitchen (lrk) uses Wine." einfo "You might want to use a newer version of the 'winetricks' script" einfo "than the one provided with this package..." einfo "If that is the case, please download the script from" einfo "" einfo " http://www.kegel.com/wine/winetricks" einfo "" einfo "Make it executable and copy it somewhere in your binary path," einfo "then re-emerge '${P}' to make use of the newer script!!" einfo "Please make sure you only have the 'winetricks' script only once" einfo "in your executable path!" einfo "" einfo "If you already emerged '${P}' after having 'winetricks'" einfo "in the executable path, you may update it without having" einfo "to re-emerge '${P}'" einfo "" einfo "You might even want to write a simple ebuild for winetricks," einfo "which won't make it into official portage as often as it gets updated..." einfo "" }