commit: fc94b7c5ee7672096abbfead15f956b887c6d5ba Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Fri Aug 7 05:08:38 2015 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Fri Aug 7 05:08:38 2015 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=fc94b7c5
variables: SRC_URI: document the -> syntax ebuild-writing/variables/text.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ebuild-writing/variables/text.xml b/ebuild-writing/variables/text.xml index a31baa2..fd749c0 100644 --- a/ebuild-writing/variables/text.xml +++ b/ebuild-writing/variables/text.xml @@ -323,6 +323,30 @@ SRC_URI="http://example.com/files/${P}-core.tar.bz2 </body> </subsection> + +<subsection> +<title>Renaming Sources</title> +<body> + +<p> +Sometimes the upstream URI uses generic names that can easily clash with other +packages when creating a single mirror. Using the <c>-></c> syntax allows +you to rename the file when it's fetched from upstream for storing on mirrors +and in the local distdir. +</p> + +<p> +Here we download a file from upstream which has a plain name like +<c>1.0.tar.gz</c> and save/mirror it with a better name like +<c>thepackage-1.0.tar.gz</c>. +</p> + +<codesample lang="ebuild"> +SRC_URI="http://example.com/files/${PV}.tar.gz -> ${P}.tar.gz" +</codesample> + +</body> +</subsection> </section> <section>
