now we bundle a perl script to serve as the install script for Solaris. now ngx_openresty 1.0.4.2rc13 builds successfully on Solaris 11 with LuaJIT enabled!

This commit is contained in:
agentzh (章亦春) 2011-08-08 15:56:33 +08:00
parent 1276fbdf48
commit 843cb73393
4 changed files with 86 additions and 1 deletions

5
util/configure vendored
View File

@ -446,6 +446,11 @@ _END_
$extra_opts .= ' CFLAGS=-I..';
}
if ($on_solaris) {
$extra_opts .= " INSTALL_X='$root_dir/build/install -m 0755' " .
"INSTALL_F='$root_dir/build/install -m 0644'";
}
if (defined $cc) {
$extra_opts .= " CC=$cc";
}

79
util/install Executable file
View File

@ -0,0 +1,79 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Std qw(getopts);
my %opts;
getopts("m:", \%opts) or usage();
my $mode = $opts{m};
if (!defined $mode) {
die "No -m option specified.\n";
}
my $mod = $opts{m};
if (@ARGV < 2) {
usage();
}
my $dst = pop;
my @src = @ARGV;
my $target_dir;
if (@src > 1 || $dst =~ m{/$}) {
$target_dir = $dst;
} elsif (-d $dst) {
$target_dir = $dst;
} elsif ($dst =~ m{(.+)/}) {
$target_dir = $1;
} else {
$target_dir = '.';
}
if (!-d $target_dir) {
shell("mkdir -p $target_dir");
}
shell("cp @src $dst");
if (-f $dst) {
chmod oct($mode), $dst or
die "failed to change mode of $dst to $mode.\n";
exit;
}
for my $src (@src) {
my $name;
if ($src =~ m{/([^/]+)$}) {
$name = $1;
} else {
$name = $src;
}
my $target = "$target_dir/$name";
chmod oct($mode), $target or
die "failed to change mode of $target to $mode.\n";
}
sub usage {
die "Usage: install -m <attrs> <src>... <dst>\n";
}
sub shell {
my $cmd = shift;
system($cmd) == 0 or
die "failed to run command $cmd\n";
}

View File

@ -208,6 +208,7 @@ rm *.tar.gz
cd ..
cp $root/util/configure ./
cp $root/README ./
cp $root/util/install bundle/
cd $root

View File

@ -1,7 +1,7 @@
#!/bin/bash
main_ver=1.0.4
minor_ver=2rc12
minor_ver=2rc13
version=$main_ver.$minor_ver
echo $version