8 |
# ${CPAN_AUTHOR}: needed, author of the CPAN-module |
# ${CPAN_AUTHOR}: needed, author of the CPAN-module |
9 |
[[ -z ${CPAN_AUTHOR} ]] && die "cpan.sminc: \$CPAN_AUTHOR not given!" |
[[ -z ${CPAN_AUTHOR} ]] && die "cpan.sminc: \$CPAN_AUTHOR not given!" |
10 |
|
|
11 |
CPAN_AUTOR_UPPER=$(echo ${CPAN_AUTHOR} | tr [a-z] [A-Z]) |
CPAN_AUTHOR_UPPER=$(echo ${CPAN_AUTHOR} | tr [a-z] [A-Z]) |
12 |
CPAN_AUTOR_LOWER=$(echo ${CPAN_AUTHOR} | tr [A-Z] [a-z]) |
CPAN_AUTHOR_LOWER=$(echo ${CPAN_AUTHOR} | tr [A-Z] [a-z]) |
13 |
|
|
14 |
# some sane defaults |
# some sane defaults |
15 |
: ${PCATEGORIE="dev-perl"} |
: ${PCATEGORIE="dev-perl"} |
16 |
# always lower letters |
# always lower letters |
17 |
: ${HOMEPAGE="http://search.cpan.org/~${CPAN_AUTHOR_LOWER}/"} |
: ${HOMEPAGE="http://search.cpan.org/~${CPAN_AUTHOR_LOWER}/"} |
18 |
: ${SRCFILE="${PNAME}.pm-${PVER}.tar.gz"} |
: ${SRCFILE="${PNAME}-${PVER}.tar.gz"} |
19 |
: ${SRCDIR="${BUILDDIR}/${PNAME}.pm-${PVER}"} |
: ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"} |
20 |
|
|
21 |
DEPEND="${DEPEND} |
DEPEND="${DEPEND} |
22 |
>= dev-lang/perl-5.10" |
>= dev-lang/perl-5.10" |
29 |
|
|
30 |
cpan_src_prepare() |
cpan_src_prepare() |
31 |
{ |
{ |
32 |
perl_src_prepare |
perl_src_prepare || die |
33 |
} |
} |
34 |
|
|
35 |
cpan_src_compile() |
cpan_src_compile() |
36 |
{ |
{ |
37 |
perl_src_compile |
local configure_opts="$@" |
38 |
|
perl_src_compile ${configure_opts} || die |
39 |
} |
} |
40 |
|
|
41 |
src_install() |
cpan_src_install() |
42 |
{ |
{ |
43 |
perl_src_compile |
perl_src_install || die |
44 |
} |
} |
45 |
|
|
46 |
export_inherits cpan src_prepare src_compile src_install |
export_inherits cpan src_prepare src_compile src_install |