# 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" #S="${WORKDIR}/${MY_PN}-$(get_version_component_range 1 ${MY_PV})" S="${WORKDIR}/${MY_PN}-${MY_PV/-*}" DEPEND="" RDEPEND=" gnome-extra/zenity =x11-misc/gtkdialog-0.7* lrk? ( app-emulation/wine app-arch/cabextract app-text/dos2unix app-arch/lcab ) " src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${MY_PN}_desktop-paths.diff epatch ${FILESDIR}/${MY_PN}_Makefiles.diff } src_compile() { cd ${S} if use lrk ; then emake || die else emake basetools || die fi } src_install() { dodir /usr/bin dodir /usr/share/man/man1 dodir /usr/share/icons dodir /usr/share/applications if use lrk ; then emake DESTDIR="${D}usr" install || die dodoc RomKitchen/README.lrk insinto /usr/share/LinuxRomKitchen 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 else emake DESTDIR="${D}usr" install-basetools || die fi dodoc AUTHORS COPYING FAQ README* } pkg_setup() { if use lrk; then info_winetricks einfo "You can stop emerging '${P}' now to take care" einfo "of the 'winetricks' script first, or read the" einfo "above message after emerging '${P}'..." epause 5 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 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 "" }