Magellan Linux

Contents of /trunk/core/include/cpan.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1971 - (show annotations) (download)
Thu Jun 11 12:07:53 2009 UTC (14 years, 11 months ago) by niro
File size: 940 byte(s)
-added cpan module include
1 # $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 CPAN_AUTOR_UPPER=$(echo ${CPAN_AUTHOR} | tr [a-z] [A-Z])
12 CPAN_AUTOR_LOWER=$(echo ${CPAN_AUTHOR} | tr [A-Z] [a-z])
13
14 # some sane defaults
15 : ${PCATEGORIE="dev-perl"}
16 # always lower letters
17 : ${HOMEPAGE="http://search.cpan.org/~${CPAN_AUTHOR_LOWER}/"}
18 : ${SRCFILE="${PNAME}.pm-${PVER}.tar.gz"}
19 : ${SRCDIR="${BUILDDIR}/${PNAME}.pm-${PVER}"}
20
21 DEPEND="${DEPEND}
22 >= dev-lang/perl-5.10"
23
24 SRC_URI=(
25 ${SRC_URI[*]}
26 http://search.cpan.org/CPAN/authors/id/${CPAN_AUTHOR_UPPER:0:1}/${CPAN_AUTHOR_UPPER:0:2}/${CPAN_AUTHOR_UPPER}/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 )
29
30 cpan_src_prepare()
31 {
32 perl_src_prepare
33 }
34
35 cpan_src_compile()
36 {
37 perl_src_compile
38 }
39
40 src_install()
41 {
42 perl_src_compile
43 }
44
45 export_inherits cpan src_prepare src_compile src_install