Blob Blame Raw
Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which
breaks at least two packaging commandments, so we put them into $libdir
instead.  That means we have to hack the file_contents regression test
to know about this.

Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425


diff -up mariadb-10.0.12/mysql-test/t/file_contents.test.file_contents mariadb-10.0.12/mysql-test/t/file_contents.test.
diff -up mariadb-10.0.12/mysql-test/t/file_contents.test.file_contents mariadb-10.0.12/mysql-test/t/file_contents.test
--- mariadb-10.0.12/mysql-test/t/file_contents.test.file_contents	2014-06-12 11:26:03.000000000 +0200
+++ mariadb-10.0.12/mysql-test/t/file_contents.test	2014-07-24 23:53:49.833176793 +0200
@@ -11,7 +11,7 @@
 --perl
 print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n";
 $dir_bin = $ENV{'MYSQL_BINDIR'};
-if ($dir_bin eq '/usr/') {
+if ($dir_bin =~ '.*/usr/$') {
   # RPM package
   $dir_docs = $dir_bin;
   $dir_docs =~ s|/lib|/share/doc|;
@@ -22,7 +22,7 @@ if ($dir_bin eq '/usr/') {
     # RedHat: version number in directory name
     $dir_docs = glob "$dir_docs/MySQL-server*";
   }
-} elsif ($dir_bin eq '/usr') {
+} elsif ($dir_bin  =~ '.*/usr$') {
   # RPM build during development
   $dir_docs = "$dir_bin/share/doc";
   if(-d "$dir_docs/packages") {
@@ -32,6 +32,15 @@ if ($dir_bin eq '/usr/') {
     # RedHat/Debian: version number in directory name
     $dir_docs = glob "$dir_docs/mariadb-server-*";
     $dir_docs = glob "$dir_docs/MySQL-server*" unless -d $dir_docs;
+
+    # All the above is entirely wacko, because these files are not docs;
+    # they should be kept in libdir instead.  mtr does not provide a nice
+    # way to find libdir though, so we have to kluge it like this:
+    if (-d "$dir_bin/lib64/mysql") {
+       $dir_docs = "$dir_bin/lib64/mysql";
+    } else {
+       $dir_docs = "$dir_bin/lib/mysql";
+    }
   }
   # Slackware
   $dir_docs = glob "$dir_bin/doc/mariadb-[0-9]*" unless -d $dir_docs;