* Re: [gentoo-dev] mimetype question
@ 2002-06-02 20:50 99% ` Martin Schlemmer
0 siblings, 0 replies; 1+ results
From: Martin Schlemmer @ 2002-06-02 20:50 UTC (permalink / raw
To: Gentoo-Dev
On Sun, 2002-06-02 at 15:22, Per Wigren wrote:
> I'm making an ebuild for BitTorrent which is a P2P "download-helper".. If
> clicking a link in a browser that has "content-type:
> application/x-bittorrent", the download will be handled by BitTorrent
> instead, and the download will be distributed among everyone who is
> downloading the same file at the time, so it doesn't load the server...
>
> The problem is that I have to make the ebuild add a line to /etc/mailcap.. Is
> there a standard way to do this?
>
Havent really done this, but try something like:
src_install() {
# if the user have a mailcap, and it do not
# have the entry added, put his copy into ${D}/etc
if [ -f ${ROOT}/etc/mailcap ]
then
insinto /etc
# install the users real mailcap into ${D}
doins ${ROOT}/etc/mailcap
else
touch ${D}/etc/mailcap
fi
# now add the entry if not already there
if [ -z "$(grep x-bittorrent ${D}/etc/mailcap)" ]
then
# add the needed line
echo "application/x-bittorrent...." >> \
${D}/etc/mailcap
fi
}
Greetings,
--
Martin Schlemmer
Gentoo Linux Developer, Desktop Team Developer
Cape Town, South Africa
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2002-06-02 13:22 [gentoo-dev] mimetype question Per Wigren
2002-06-02 20:50 99% ` Martin Schlemmer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox