Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
MiniVend 4.01
  • Loading branch information
perusionmike authored and jonjensen committed Jan 2, 2009
1 parent c4de110 commit 52c57ce
Show file tree
Hide file tree
Showing 57 changed files with 1,115 additions and 665 deletions.
2 changes: 2 additions & 0 deletions MANIFEST
Expand Up @@ -105,6 +105,8 @@ dist/basic/special_pages/security.html
dist/basic/special_pages/violation.html
dist/basic/tmp/.empty
dist/basic/upload/.empty
dist/build/makecat.redhat
dist/build/makedirs.redhat
dist/compat/body
dist/compat/buttonbar
dist/compat/form_mail.cfg
Expand Down
68 changes: 50 additions & 18 deletions Makefile.PL
Expand Up @@ -26,7 +26,7 @@ my $Prompt_sub;
my @mods_to_get;
my $Lock_troubles;

$VERSION = '4.00';
$VERSION = '4.01';

# See if we have the CPAN module
my $Cpan = 0;
Expand Down Expand Up @@ -264,6 +264,10 @@ sub initialize {
$MV::Default{PREFIX} = "$ENV{HOME}/mvend";
}
}
if($MV::Default{rpmbuilddir} or $MV::Default{RPMBUILDDIR}) {
$X{RPMBUILDDIR} = $MV::Default{rpmbuilddir} || $MV::Default{RPMBUILDDIR};
$MV::Default{RPMBUILDDIR} = $X{RPMBUILDDIR};
}
my $uid;
if($> == 0 and ! $MV::Default{MINIVEND_USER}) {
$uid = my_prompt(
Expand Down Expand Up @@ -323,8 +327,12 @@ sub initialize {
$X{INSTALLBIN} = "$realdir/bin";
$X{INSTALLARCHLIB} = "$realdir";
$X{INSTALLPRIVLIB} = "$realdir/lib";
$X{INSTALLMAN1DIR} = "$realdir/doc";
$X{INSTALLMAN3DIR} = "$realdir/doc";
if(! $MV::Default{final}) {
$X{INSTALLMAN1DIR} = "$realdir/doc"
if ! $MV::Default{INSTALLMAN1DIR};
$X{INSTALLMAN3DIR} = "$realdir/doc"
if ! $MV::Default{INSTALLMAN3DIR};
}

my @re_dir = qw( simple/download );
my @re_copy = qw(
Expand Down Expand Up @@ -372,6 +380,15 @@ sub initialize {
"$realdir/$_";
}
}
chdir '..';
my (@minimate) = sort grep -d $_, glob '../MiniMate-4*';
if(my $minimate = pop @minimate) {
my $dir = $realdir;
$dir = "$X{RPMBUILDDIR}/$dir"
if $X{RPMBUILDDIR};
chdir $minimate;
system "$^X install $dir 1"
}
exit;
}

Expand Down Expand Up @@ -522,6 +539,7 @@ EOF
print INITP Dumper(\%X);
print INITP ";\n1;";
close INITP;
delete $X{RPMBUILDDIR};
return \%X;
}

Expand All @@ -544,33 +562,47 @@ sub MY::install {

my $new = <<'EOF';
mv_install ::
$(PERL) Makefile.PL force=1 final=$(INSTALLARCHLIB)
$(PERL) Makefile.PL force final=$(INSTALLARCHLIB)
install :: all pure_install doc_install mv_install
EOF
$new .= <<EOF;
rpm_move ::
\$(PERL) Makefile.PL force=1 rpmbuilddir=$MV::Default{RPMBUILDDIR} final=\$(INSTALLARCHLIB)
rpm_build :: all pure_install doc_install rpm_move
EOF
$_ = $self->MM::install;
s/\ninstall :.*/$new/;
$_;
}

my %mv_specific = qw/
PREFIX 1 FORCE 1 FINAL 1 RPMBUILDDIR 1 MINIVEND_USER 1
/;
my %delete;
use Getopt::Long;
my @saveargs = @ARGV;
my %optctl = (
'junk' => sub { 1 },
'<>' => sub {
my ($arg) = @_;
#warn "checking option $arg\n";
my ($opt, $val);
if($arg !~ /=/) {
$opt = $arg;
$val = 1;
}
else {
($opt, $val) = split /=/, $arg, 2;
}
$MV::Default{$opt} = $val;
return;
my ($arg) = @_;
#warn "checking option $arg\n";
my ($opt, $val);
if($arg !~ /=/) {
$opt = $arg;
$val = 1;
}
else {
($opt, $val) = split /=/, $arg, 2;
}

$delete{$arg} = 1 if $mv_specific{uc $opt};

$MV::Default{$opt} = $val;
return;
},
);

Expand All @@ -586,14 +618,14 @@ EOF
# $Data::Dumper::Terse = $Data::Dumper::Indent = 2;
# print "ARGV: " . Dumper(\@ARGV);
# print "OPT: " . Dumper(\%MV::Default);
# @ARGV = @saveargs;
@ARGV = grep ! $delete{$_}, @saveargs;

WriteMakefile(
NAME => "MiniVend",
MAN3PODS => { 'pod/mvdocs.pod' => 'blib/man3/mvdocs.8' },
DISTNAME => "minivend",
clean => {
FILES=> "lib/IniConf.pm _db_storable _session_storable lib/File/CounterFile.pm scripts/initp.pl scripts/compile_link scripts/config_prog scripts/configdump scripts/dump scripts/expire scripts/localize scripts/expireall scripts/makecat scripts/minivend scripts/offline scripts/restart scripts/update",
FILES=> "lib/IniConf.pm _uid _db_storable _session_storable lib/File/CounterFile.pm scripts/initp.pl scripts/compile_link scripts/config_prog scripts/configdump scripts/dump scripts/expire scripts/localize scripts/expireall scripts/makecat scripts/minivend scripts/offline scripts/restart scripts/update dist/simple/download/mvdocs.pod dist/simple/download/mvfaq.pod",
},

dist => {
Expand Down
56 changes: 28 additions & 28 deletions README
Expand Up @@ -54,19 +54,19 @@ Major files/directories in the distribution:
minivend.cfg.dist Distribution minivend.cfg
checkout/ Checkout-only demo application.
simple/ The not so aptly named "simple" demo
application.
application.
src/ C and Perl code for CGI links
compat/ Some Minivend-3 compatibility tags
usertag/ Some fairly-standard usertags
compat/ Some Minivend-3 compatibility tags
usertag/ Some fairly-standard usertags

extra/ Some not-always-needed Perl libraries.
extra/ Some not-always-needed Perl libraries.

lib/ The library modules needed to run Minivend.

scripts/ The executable files, relocated to bin in the run
directory.
scripts/ The executable files, relocated to bin in the run
directory.

test.pl The installation test script.
test.pl The installation test script.

win/ Windows-specific files

Expand Down Expand Up @@ -97,17 +97,17 @@ Major files/directories in the distribution:
sufficient memory
* Cookie support allows browsers to leave catalog and come
back without losing session state
* Minimate web administration interface (separate package)
* Complete user authentication and database with address
books and stored shopping carts
* Minimate web administration interface (separate package)
* Complete user authentication and database with address
books and stored shopping carts
* Many, many, other features

Powerful search capability

* One-click scan and search -- build a whole search in a single HREF
* Pageable results, configurable in many ways
* Pageable results, configurable in many ways
* Versatile built-in text search
* Complete Glimpse support
* Complete Glimpse support
* Fast binary search
* Independent field search selection and return
* Range searching, numeric and alphanumeric
Expand All @@ -116,13 +116,13 @@ Major files/directories in the distribution:

Complete control of appearance

* Over 90 predefined tag functions
* Powerful user-definable tags
* Catalog pages automatically selected -- either built
"on the fly" from the database or pre-made for popular items
* Embedded Perl and conditional HTML allow complex and
flexible catalog pages to be completely built from the database
* ASP-like syntax available
* Over 90 predefined tag functions
* Powerful user-definable tags
* Catalog pages automatically selected -- either built
"on the fly" from the database or pre-made for popular items
* Embedded Perl and conditional HTML allow complex and
flexible catalog pages to be completely built from the database
* ASP-like syntax available

Flexible Ordering Process

Expand All @@ -134,7 +134,7 @@ Major files/directories in the distribution:
* Sales tax calculation, with fully independent non-taxable
item and taxed shipping
* Route orders to multiple fulfillment houses with
complete configurability
complete configurability
* PGP encryption of credit card information or
the entire emailed order
* Fully-configurable discounts with coupons or
Expand Down Expand Up @@ -173,7 +173,7 @@ Here is the short version:
gzip -dc minivend-4.xxx.tar.gz | tar xvf -
cd minivend-4*
perl Makefile.PL
make test && make install
make test && make install

-- WHEN IN DOUBT, RE-START THE SERVER. It won't take but a few
seconds, and changes in configurable options don't take effect
Expand All @@ -183,10 +183,10 @@ Here is the short version:
WINDOWS INSTALLATION
--------------------

Not yet. You can manually create a software directory and
get things going if you know your way around Perl. But I
don't recommend trying unless you are prepared for some
serious work.
Not yet. You can manually create a software directory and
get things going if you know your way around Perl. But I
don't recommend trying unless you are prepared for some
serious work.

-------------------------------------------------------------------

Expand All @@ -202,9 +202,9 @@ for root installations) and run:

bin/makecat basic

or
or

bin/makecat simple
bin/makecat simple

Follow the prompts and after restarting the Minivend server you
should be able to access the demo catalog.
Expand All @@ -226,7 +226,7 @@ at www.minivend.com.
BSDI, FreeBSD:
If installing as root, you should use this procedure:

perl Makefile.PL PREFIX=/usr/local/minivend
perl Makefile.PL PREFIX=/usr/local/minivend

Windows:
Just a few things don't work the same as UNIX. See the
Expand Down

0 comments on commit 52c57ce

Please sign in to comment.