# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/import/cpan/cpan.conf # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. A copy of the GNU General Public # License can be found at Documentation/COPYING. # # Many people helped and are helping developing ROCK Linux. Please # have a look at https://www.rocklinux.org/ and the Documentation/TEAM # file for details. # # --- ROCK-COPYRIGHT-NOTE-END --- cpanmod="" configexec="" # see if this is a hosted package . $confdir/hosted_cpan.sel if [ -z "$cpanmod" -a "$ROCK_BUILD_TARGET" != 1 ] then cpan_getsrc() { echo_status "Fetching $cpanbase/$cpanloc." mkdir -p $builddir/archdir if ! wget -q -O $builddir/archdir/cpansrc.tar.gz $cpanbase/$cpanloc; then echo_error "Downloading $cpanbase/$cpanloc failed!" exit 1 fi } srctar=cpansrc.tar.gz taropt="--use-compress-program=gzip -xf" hook_add prepare 2 cpan_getsrc pdetails=$base/download/mirror/c/cpan_packages_20041221.txt.bz2 cpanbase=https://www.cpan.org/modules/by-authors/id read cpanmod cpanver cpanloc < <( bzip2 -d < $pdetails | perl -le ' my $xpkg = "'"$xpkg"'"; $xpkg =~ s/^cpan-//; while (<>) { chomp; last if $_ =~ /^\s*$/; } while (<>) { my ($mod, $ver, $loc) = split /\s+/; my $xmod = $mod; $xmod =~ y/A-Z/a-z/; $xmod =~ s/::/-/g; next unless $xmod eq $xpkg; print "$mod $ver $loc"; } ') echo_status "MOD=$cpanmod VER=$cpanver LOC=$cpanloc" fi if [ -z "$cpanmod" ]; then echo_error "Can't resolve cpan module name for $xpkg!" exit 2 fi cpan_getdesc() { desc_I= desc_T= desc_A= if [ -n "$cpanbase" ]; then desc_D="X $cpanbase/$cpanloc" fi parse_desc <( bash $confdir/getdesc.sh $1 ) } hook_add postinstall 8 "cpan_getdesc $cpanmod" if [ -f $confdir/$xpkg.diff ]; then hook_add preconf 4 "patch -p1 < $confdir/$xpkg.diff"; fi if [ -f $confdir/$xpkg.conf ]; then source $confdir/$xpkg.conf; fi