Loading Build-tools/mysql-copyright +26 −5 Original line number Diff line number Diff line Loading @@ -116,6 +116,9 @@ sub main &fix_usage_copyright(); &add_copyright(); # fix LICENSE tag in include/mysql_version.h &fix_mysql_version(); # rename the directory with new distribution name chdir("$WD/$dir"); print "renaming $destdir $newdistname\n" if $opt_verbose; Loading @@ -141,6 +144,28 @@ sub main exit(0); } #### #### This function will s/GPL/Commercial/ in include/mysql_version.h for the #### LICENSE tag. #### sub fix_mysql_version { chdir("$destdir"); my $header_file= (-f 'include/mysql_version.h.in')? 'include/mysql_version.h.in' : 'include/mysql_version.h'; open(MYSQL_VERSION,"<$header_file") or die "Unable to open include/mysql_version.h for read: $!\n"; undef $/; my $mysql_version= <MYSQL_VERSION>; close(MYSQL_VERSION); $mysql_version=~ s/\#define LICENSE[\s\t]+GPL/#define LICENSE Commercial/; open(MYSQL_VERSION,">$header_file") or die "Unable to open include/mysql_version.h for write: $!\n"; print MYSQL_VERSION $mysql_version; close(MYSQL_VERSION); chdir("$cwd"); } #### #### This function will remove unwanted parts of a src tree for the mysqlcom #### distributions. Loading @@ -151,11 +176,7 @@ sub trim_the_fat my $cwd= getcwd(); system("rm -rf $destdir/${the_fat}"); if ($win_flag) { chdir("$destdir") or die "Unable to change directory to $destdir!: $!\n"; } else if (!$win_flag) { chdir("$destdir"); unlink ("configure") or die "Can't delete $destdir/configure: $!\n"; Loading Loading
Build-tools/mysql-copyright +26 −5 Original line number Diff line number Diff line Loading @@ -116,6 +116,9 @@ sub main &fix_usage_copyright(); &add_copyright(); # fix LICENSE tag in include/mysql_version.h &fix_mysql_version(); # rename the directory with new distribution name chdir("$WD/$dir"); print "renaming $destdir $newdistname\n" if $opt_verbose; Loading @@ -141,6 +144,28 @@ sub main exit(0); } #### #### This function will s/GPL/Commercial/ in include/mysql_version.h for the #### LICENSE tag. #### sub fix_mysql_version { chdir("$destdir"); my $header_file= (-f 'include/mysql_version.h.in')? 'include/mysql_version.h.in' : 'include/mysql_version.h'; open(MYSQL_VERSION,"<$header_file") or die "Unable to open include/mysql_version.h for read: $!\n"; undef $/; my $mysql_version= <MYSQL_VERSION>; close(MYSQL_VERSION); $mysql_version=~ s/\#define LICENSE[\s\t]+GPL/#define LICENSE Commercial/; open(MYSQL_VERSION,">$header_file") or die "Unable to open include/mysql_version.h for write: $!\n"; print MYSQL_VERSION $mysql_version; close(MYSQL_VERSION); chdir("$cwd"); } #### #### This function will remove unwanted parts of a src tree for the mysqlcom #### distributions. Loading @@ -151,11 +176,7 @@ sub trim_the_fat my $cwd= getcwd(); system("rm -rf $destdir/${the_fat}"); if ($win_flag) { chdir("$destdir") or die "Unable to change directory to $destdir!: $!\n"; } else if (!$win_flag) { chdir("$destdir"); unlink ("configure") or die "Can't delete $destdir/configure: $!\n"; Loading