Commit 962cedf2 authored by unknown's avatar unknown

- Updated to Marcs latest version from entropy.ch


support-files/make_mysql_pkg.pl:
  make_mysql_pkg.pl
  
   - Updated to Marcs latest version from entropy.ch
parent 7d2d7e3f
...@@ -17,16 +17,30 @@ ...@@ -17,16 +17,30 @@
# History: # History:
# #
# When Who What # When Who What
# ------------------------------------------------------------- # ------------------------------------------------------------------
# 2001-09-16 Marc Liyanage First version # 2001-09-16 Marc Liyanage First version
# 2001-11-18 Marc Liyanage Improved configure directory options
#
use strict; use strict;
use DirHandle; use DirHandle;
my $data = {}; my $data = {};
$data->{PREFIX_DIR} = "/usr/local"; $data->{PREFIX_DIR} = "/usr/local/mysql";
$data->{CONFIG} = "--prefix=$data->{PREFIX_DIR} --with-innodb"; $data->{CONFIG} = join(" ",
"--prefix=$data->{PREFIX_DIR}",
"--localstatedir=$data->{PREFIX_DIR}/data",
"--libdir=$data->{PREFIX_DIR}/lib",
"--includedir=$data->{PREFIX_DIR}/include",
"--with-named-z-libs=/usr/local/libz.a",
"--with-innodb",
"--with-server-suffix='-entropy.ch'",
"--with-comment='http://www.entropy.ch/software/macosx/mysql/'",
"--with-mysqld-user=mysql",
"--enable-assembler",
"CFLAGS=\"-DHAVE_BROKEN_REALPATH -lncurses\"",
);
...@@ -177,8 +191,7 @@ sub make_binary_distribution { ...@@ -177,8 +191,7 @@ sub make_binary_distribution {
# Now we build a fake /usr/local directory hierarchy. # Now we build a fake /usr/local directory hierarchy.
# This will be fed to the pax tool to create # This will be fed to the pax tool to create the archive.
# the archive.
# #
sub create_pax_root { sub create_pax_root {
...@@ -190,7 +203,7 @@ sub create_pax_root { ...@@ -190,7 +203,7 @@ sub create_pax_root {
chdir($data->{PAXROOT_DIR}); chdir($data->{PAXROOT_DIR});
my $tarfile = "$data->{OLDWD}/$data->{BINARY_TARBALL_FILENAME}"; my $tarfile = "$data->{OLDWD}/$data->{BINARY_TARBALL_FILENAME}";
if(system("tar -xzf $tarfile")) { if (system("tar -xzf $tarfile")) {
abort($data, "Unable to extract $tarfile inside $data->{PAXROOT_DIR}"); abort($data, "Unable to extract $tarfile inside $data->{PAXROOT_DIR}");
} }
...@@ -213,14 +226,35 @@ sub create_pax_root { ...@@ -213,14 +226,35 @@ sub create_pax_root {
# First create the symlinks in the bin directory # First create the symlinks in the bin directory
# #
# 2001-02-13: we no longer use symlinks for the binaries, we
# use small dummy scripts instead because the
# mysql scripts do a lot of guesswork with their
# own path and that will not work when called via the symlink
#
# symlink("../mysql/bin/$_", "$_") foreach (grep {$_ !~ /^\.+$/} DirHandle->new("../mysql/bin")->read());
chdir("bin"); chdir("bin");
symlink("../mysql/bin/$_", "$_") foreach (grep {$_ !~ /^\.+$/} DirHandle->new("../mysql/bin")->read());
foreach my $command (grep {$_ !~ /^\.+$/} DirHandle->new("../mysql/bin")->read()) {
my $scriptcode = qq+#!/bin/sh\n# Part of the entropy.ch mysql package\ncd /usr/local/mysql/\nexec ./bin/$command "\$\@"\n+;
open(SCRIPTFILE, ">$command") or die "Unable to write open $command\n";
print SCRIPTFILE $scriptcode;
close(SCRIPTFILE);
chmod(0755, $command);
}
# Now include the man pages. Two problems here: # Now include the man pages. Two problems here:
# 1.) the make_binary_distribution script does not seem # 1.) the make_binary_distribution script does not seem
# to include the man pages, so we have to copy them over # to include the man pages, so we have to copy them over
# now. # now. [outdated, was fixed by MySQL!]
# 2.) The man pages could be in different sections, so # 2.) The man pages could be in different sections, so
# we have to recursively copy *and* symlink them. # we have to recursively copy *and* symlink them.
# #
...@@ -230,7 +264,7 @@ sub create_pax_root { ...@@ -230,7 +264,7 @@ sub create_pax_root {
# arrays which in turn will be stored in a hash, using # arrays which in turn will be stored in a hash, using
# the section numbers as hash keys. # the section numbers as hash keys.
# #
chdir($data->{OLDWD}); chdir("$data->{PAXROOT_DIR}/mysql");
my %man_sections; my %man_sections;
foreach my $manpage (grep {$_ =~ /^.+\.(\d+)$/} DirHandle->new("man")->read()) { foreach my $manpage (grep {$_ =~ /^.+\.(\d+)$/} DirHandle->new("man")->read()) {
...@@ -249,14 +283,12 @@ sub create_pax_root { ...@@ -249,14 +283,12 @@ sub create_pax_root {
foreach my $section (keys(%man_sections)) { foreach my $section (keys(%man_sections)) {
system("mkdir -p $data->{PAXROOT_DIR}/mysql/man/man$section/");
system("mkdir -p man$section"); system("mkdir -p man$section");
chdir("man$section"); chdir("man$section");
foreach my $manpage (@{$man_sections{$section}}) { foreach my $manpage (@{$man_sections{$section}}) {
system("cp $data->{OLDWD}/man/$manpage $data->{PAXROOT_DIR}/mysql/man/man$section/"); symlink("../../../mysql/man/$manpage", $manpage)
symlink("../../../mysql/man/man$section/$manpage", $manpage)
} }
...@@ -265,6 +297,35 @@ sub create_pax_root { ...@@ -265,6 +297,35 @@ sub create_pax_root {
} }
# Fix up the library and lib directories. They are packed up wrong in the
# binary distribution tarball.
#
# (no longer needed as of 3.23.47)
# (oops, still needed because 3.23.47 is broken...)
#
# if (-d "$data->{PAXROOT_DIR}/mysql/lib/mysql") {
# abort($data, "$data->{PAXROOT_DIR}/mysql/lib/mysql exists, layout has changed!");
# }
# chdir("$data->{PAXROOT_DIR}/mysql/lib/");
# system("mkdir -p mysql");
# system("mv * mysql");
# if (-d "$data->{PAXROOT_DIR}/mysql/include/mysql") {
# abort($data, "$data->{PAXROOT_DIR}/mysql/include/mysql exists, layout has changed!");
# }
# chdir("$data->{PAXROOT_DIR}/mysql/include/");
# system("mkdir -p mysql");
# system("mv * mysql");
} }
...@@ -310,7 +371,7 @@ sub create_package { ...@@ -310,7 +371,7 @@ sub create_package {
my $size_compressed = `du -sk $data->{PACKAGE_DIR} | cut -f 1`; my $size_compressed = `du -sk $data->{PACKAGE_DIR} | cut -f 1`;
chomp($size_compressed); chomp($size_compressed);
my $numfiles = `find /tmp/mysql-3.23.42-paxroot/ | wc -l`; my $numfiles = `find /tmp/mysql-$data->{VERSION}-paxroot | wc -l`;
$numfiles--; $numfiles--;
open(SIZESFILE, ">$data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.sizes") or abort("Unable to write open sizes file $data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.sizes"); open(SIZESFILE, ">$data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.sizes") or abort("Unable to write open sizes file $data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.sizes");
...@@ -411,4 +472,4 @@ Relocatable NO ...@@ -411,4 +472,4 @@ Relocatable NO
Required NO Required NO
InstallOnly NO InstallOnly NO
RequiresReboot NO RequiresReboot NO
InstallFat NO InstallFat NO
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment