Changeset 2659 in MondoRescue for devel/mr/Makefile.PL


Ignore:
Timestamp:
Jun 23, 2010, 4:26:59 PM (14 years ago)
Author:
Bruno Cornec
Message:

r3911@wsip-70-165-196-181: bruno | 2010-06-22 03:34:20 +0200

  • First packaged version of a mrmin version begining to work (but doing nothing interesting yet ;-)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/mr/Makefile.PL

    r2650 r2659  
    99    VERSION   => 'PBVER',
    1010    INST_SCRIPT  => 'blib/bin',
    11     INSTALLDIRS  => 'perl',
     11    INSTALLDIRS  => 'vendor',
    1212    PREREQ_PM   => {
    1313            #HTTP::Headers                  => 1.59,
     
    6161            $target = "/usr/local";
    6262            if (not defined $confdir) {
    63                 $confdir = "/usr/local/etc";
     63                $confdir = "$target/etc";
     64            }
     65            if (not defined $cachedir) {
     66                $cachedir = "$target/var/cache";
    6467            }
    6568        } else {
    66             $sharedir = $sharedir || "$target/share";
    67             $mandir = $mandir || "$sharedir/man";
    6869            $cachedir = $cachedir || "$target/var/cache";
    6970            if (not defined $confdir) {
    7071                die "CONFDIR should be defined if PREFIX is defined";
    7172            }
     73            if (not defined $cachedir) {
     74                die "CACHEDIR should be defined if PREFIX is defined";
     75            }
    7276        }
     77        $sharedir = $sharedir || "$target/share";
     78        $mandir = $mandir || "$sharedir/man";
    7379
    7480        my $conff = "etc/PBPROJ.conf";
     
    8389mr_install_dir default = $target
    8490#
    85 #
    8691# conf dir
    8792#
     
    95100#
    96101mr_share_dir default = $sharedir/PBPROJ
     102#
     103# version
     104#
     105mr_version default = PBVER-rPBREV
    97106EOF
    98107        close(CONF);
     
    102111
    103112        $text .= "install ::\n";
    104         $text .= "\t".'@echo PBPKG PBVER-PBREV will be installed under $(DESTDIR)'."\n";
     113        $text .= "\t".'@echo PBPKG PBVER-rPBREV will be installed under $(DESTDIR)'."\n";
    105114        $text .= "\t".'install -m 755 -d $(DESTDIR)'."$confdir/PBPROJ".' $(DESTDIR)'."$cachedir/PBPROJ".' $(DESTDIR)'."$sharedir/PBPROJ\n";
    106115        $text .= "\t".'cp etc/PBPROJ.conf $(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf.dist ; install -m 755 -d ".' $(DESTDIR)'."$mandir/man5 ; pod2man etc/PBPROJ.conf > ".'$(DESTDIR)'."$mandir/man5/PBPROJ.conf.5\n";
    107116        $text .= "\t".'md5sum $(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf.dist > ".'$(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf.dist.md5\n";
    108         $text .= "\t".'cp lib/MondoRescue/DynConf.pm $(DESTDIR)/$(INST_LIBDIR)/'."\n";
    109         $text .= "\t".'md5sum $(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf.dist > ".'$(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf.dist.md5\n";
    110         #$text .= "\t".'if [ -f etc/PBKG.conf ]; then cp etc/PBPKG.conf $(DESTDIR)'."$confdir/PBPROJ/PBKG.conf.dist ; install -m 755 -d ".' $(DESTDIR)'."$mandir/man5 ; pod2man etc/PBPKG.conf > ".'$(DESTDIR)'."$mandir/man5/PBPKG.conf.5 ; fi\n";
    111         #$text .= "\t".'md5sum $(DESTDIR)'."$confdir/PBPROJ/PBPKG.conf.dist > ".'$(DESTDIR)'."$confdir/PBPROJ/PBPKG.conf.dist.md5\n";
     117        $text .= "\t".'cp lib/MondoRescue/DynConf.pm $(DESTDIR)/$(VENDORLIBEXP)/MondoRescue/'."\n";
    112118
    113119        # Now generate a perl module used by every other one in the project
     
    152158
    153159This function returns all the installation PATH info needed by the project
    154 It takes no parameter and returns 3 values
     160It takes no parameter and returns 2 values
    155161First value is the conf dir
    156162Second value is the project name
     
    159165
    160166sub mr_dynconf_init {
    161     return($confdir,PBPROJ);
     167    return("$confdir/PBPROJ","PBPROJ");
    162168}
    1631691;
Note: See TracChangeset for help on using the changeset viewer.