|
花了点时间写了一个ebuild。。我刚开始看教程。。参照着别的ebuild写的。。感觉写的很拙劣。。。希望大家能不吝赐教,谢谢!
flashget-1.0.3-r0.ebuild:- # Copyright 1999-2010 Gentoo Foundation
- # Distributed under the terms of the GNU General Public License v2
- # $Header: Exp $
- inherit versionator eutils
- MY_PF="${PN}-${PV}"
- DESCRIPTION="A popular multi-thread downloader"
- HOMEPAGE="http://www.flashget.com/cn/product_Linux.html"
- SRC_URI="http://bbs.flashget.com/download/${MY_PF}-0_cn.tar.gz"
- LICENSE="EULA"
- SLOT="0"
- KEYWORDS="~amd64 ~x86"
- #IUSE="firefox-embedded"
- RDEPEND="amd64? (
- app-emulation/emul-linux-x86-compat
- app-emulation/emul-linux-x86-baselibs
- app-emulation/emul-linux-x86-gtklibs
- )"
- S="${WORKDIR}/${PN}-${PV}"
- SLIB="`whereis libexpat.so.|awk {'print $2'}`"
- src_install() {
- exeinto "/opt/${PN}/bin/"
- doexe "${S}/${PN}" || die "Failed to install flashget"
- insinto "/opt/${PN}/share/"
- doins "${S}/flashget.desktop"
- doins "${S}/flashget.png"
- doins "${S}/README"
- }
- pkg_postinst()
- {
- einfo "Fixing libexpat problem"
- if [ "$ARCH" = "amd64" ]; then
- ln -s /usr/lib32/libexpat.so /usr/lib32/libexpat.so.0 2>/dev/null
- else
- ln -s ${SLIB} /usr/lib/libexpat.so.0 2>/dev/null
- fi
- einfo "Fixed"
- einfo "Linking /opt/${PN}/bin/${PN} to /usr/bin/${PN}"
- ln -sf /opt/${PN}/bin/${PN} /usr/bin/${PN}
- ewarn "This is beta-version of FlashGet 1.0. It may fail to run on amd64 systems!"
- einfo "To start flashget type: /opt/${PN}/bin/flashget or just flashget"
- einfo "Enjoy and have fun!"
- }
- pkg_postrm()
- {
- einfo "Unlinking /usr/bin/${PN}"
- unlink /usr/bin/${PN}
- }
复制代码 |
|