Annotation of /branches/R11-stable/include/cpan.sminc
Parent Directory | Revision Log
Revision 9863 -
(hide annotations)
(download)
Fri Jan 13 19:22:05 2012 UTC (12 years, 9 months ago) by niro
Original Path: branches/magellan-next/include/cpan.sminc
File size: 1042 byte(s)
Fri Jan 13 19:22:05 2012 UTC (12 years, 9 months ago) by niro
Original Path: branches/magellan-next/include/cpan.sminc
File size: 1042 byte(s)
- PCATEGORIE -> PCAT transition
1 | niro | 1971 | # $ID$ |
2 | # CPAN functions | ||
3 | |||
4 | # needs perl | ||
5 | sminclude perl | ||
6 | |||
7 | # needed extra vars: | ||
8 | # ${CPAN_AUTHOR}: needed, author of the CPAN-module | ||
9 | [[ -z ${CPAN_AUTHOR} ]] && die "cpan.sminc: \$CPAN_AUTHOR not given!" | ||
10 | |||
11 | niro | 1974 | CPAN_AUTHOR_UPPER=$(echo ${CPAN_AUTHOR} | tr [a-z] [A-Z]) |
12 | CPAN_AUTHOR_LOWER=$(echo ${CPAN_AUTHOR} | tr [A-Z] [a-z]) | ||
13 | niro | 1971 | |
14 | niro | 7291 | : ${CPAN_MODULE="${PNAME}"} |
15 | |||
16 | niro | 1971 | # some sane defaults |
17 | niro | 9863 | : ${PCAT="dev-perl"} |
18 | niro | 1971 | # always lower letters |
19 | : ${HOMEPAGE="http://search.cpan.org/~${CPAN_AUTHOR_LOWER}/"} | ||
20 | niro | 7291 | : ${SRCFILE="${CPAN_MODULE}-${PVER}.tar.gz"} |
21 | : ${SRCDIR="${BUILDDIR}/${CPAN_MODULE}-${PVER}"} | ||
22 | niro | 1971 | |
23 | DEPEND="${DEPEND} | ||
24 | niro | 8129 | >= dev-lang/perl-5.14" |
25 | niro | 1971 | |
26 | SRC_URI=( | ||
27 | ${SRC_URI[*]} | ||
28 | http://search.cpan.org/CPAN/authors/id/${CPAN_AUTHOR_UPPER:0:1}/${CPAN_AUTHOR_UPPER:0:2}/${CPAN_AUTHOR_UPPER}/${SRCFILE} | ||
29 | mirror://${PNAME}/${SRCFILE} | ||
30 | ) | ||
31 | |||
32 | cpan_src_prepare() | ||
33 | { | ||
34 | niro | 1981 | perl_src_prepare || die |
35 | niro | 1971 | } |
36 | |||
37 | cpan_src_compile() | ||
38 | { | ||
39 | niro | 1972 | local configure_opts="$@" |
40 | niro | 1981 | perl_src_compile ${configure_opts} || die |
41 | niro | 1971 | } |
42 | |||
43 | niro | 1980 | cpan_src_install() |
44 | niro | 1971 | { |
45 | niro | 1981 | perl_src_install || die |
46 | niro | 1971 | } |
47 | |||
48 | export_inherits cpan src_prepare src_compile src_install |