|
|
发表于 2008-4-27 10:58:44
|
显示全部楼层
Post by zhou3345;1842899
qsopcast在gentoo bugzilla有ebuild,我在老帖子中提过:
http://bugs.gentoo.org/show_bug.cgi?id=181134
- # Copyright 1999-2007 Gentoo Foundation
- # Distributed under the terms of the GNU General Public License v2
- # $Header: $
- inherit eutils kde-functions
- DESCRIPTION="A QT front-end for SopCast P2P Internet TV"
- HOMEPAGE="http://qsopcast.googlecode.com/"
- SRC_URI="http://qsopcast.googlecode.com/files/${P}.tar.bz2"
- LICENSE="GPL-2"
- SLOT="0"
- KEYWORDS="~amd64 ~x86"
- IUSE=""
- DEPEND=">=media-tv/sopcast-1.0.2
- media-libs/alsa-lib
- net-misc/curl"
- RDEPEND="${DEPEND}"
- # append suitable QT libs to dependencies via automagic kde-functions
- need-qt 3
- S=${WORKDIR}/${P}/src/
- MY_ICON=sopcast-logo.gif
- MY_TEMP_ICON=${S}/../${MY_ICON}
- MY_ICON_TARGET=/usr/share/pixmaps
- src_unpack() {
- unpack ${A} || die "Failed to unpack ${A}"
- # patch some QT and other file locations to more Gentooish ones
- sed -e s+/usr/local+/usr+ -i ${S}/${PN}.pro
- # get the icon file (TODO: maybe the icon could be distributed in files/ or maybe wget could be used?)
- einfo "Downloading the icon ..."
- curl http://www.sopcast.org/images/sopcast-log.gif > ${MY_TEMP_ICON}
- }
- src_compile() {
- eqmake3 || die "qmake failed"
- emake || die "emake failed"
- }
- src_install() {
- INSTALL_ROOT=${D} emake install || die "emake install failed"
- # the manual labour part: the SopCast icon which isn't packaged with qsopcast
- insinto ${MY_ICON_TARGET}
- doins ${MY_TEMP_ICON}
- make_desktop_entry qsopcast "QSopCast - P2P Internet TV Viewer" ${MY_ICON_TARGET}/${MY_ICON}
- }
复制代码
对比一下
建议:写ebuild之前先去bugzilla找一找,如果确实没有(有些ebuild藏得较深,不容易搜出来)可以直接在那里提交。
个人觉得,将
- MY_ICON=sopcast-logo.gif
- MY_TEMP_ICON=${S}/../${MY_ICON}
- MY_ICON_TARGET=/usr/share/pixmaps
复制代码
放到preinst里是不是能更清晰一些呢? |
|