summaryrefslogtreecommitdiff
path: root/support-files/SCO
diff options
context:
space:
mode:
authorunknown <lenz@mysql.com>2003-02-03 20:39:48 +0100
committerunknown <lenz@mysql.com>2003-02-03 20:39:48 +0100
commit46318870b042cfcd2449eef58c3a9519c00d409d (patch)
tree91b8500ad29cd9ee0cd23ebf67de2c56b7c16f39 /support-files/SCO
parent39f46988e80efa85731b1127f20cac60cf17b4a3 (diff)
downloadmariadb-git-46318870b042cfcd2449eef58c3a9519c00d409d.tar.gz
- added support-files/MacOSX to include files specific for building
MacOSX packages using PackageMaker - renamed support-files/PKG -> support-files/SCO (PKG is used in MacOS X terminology as well) support-files/SCO/INSTALL.sh: mvdir support-files/SCO/compile.sh: mvdir support-files/SCO/doc.sh: mvdir support-files/SCO/mkpkg.sh: mvdir support-files/SCO/patch: mvdir support-files/SCO/pkginfo.ini: mvdir support-files/SCO/postinstall: mvdir support-files/SCO/preinstall: mvdir support-files/SCO/preremove: mvdir support-files/SCO/prototype.ini: mvdir support-files/SCO/version: mvdir support-files/MacOSX/make_mysql_pkg.pl: Rename: support-files/make_mysql_pkg.pl -> support-files/MacOSX/make_mysql_pkg.pl configure.in: - added support-files/MacOSX support-files/Makefile.am: - added MacOSX subdirectory
Diffstat (limited to 'support-files/SCO')
-rwxr-xr-xsupport-files/SCO/INSTALL.sh29
-rw-r--r--support-files/SCO/compile.sh102
-rw-r--r--support-files/SCO/doc.sh17
-rw-r--r--support-files/SCO/mkpkg.sh47
-rw-r--r--support-files/SCO/patch96
-rw-r--r--support-files/SCO/pkginfo.ini8
-rw-r--r--support-files/SCO/postinstall30
-rw-r--r--support-files/SCO/preinstall21
-rw-r--r--support-files/SCO/preremove25
-rw-r--r--support-files/SCO/prototype.ini4
-rw-r--r--support-files/SCO/version1
11 files changed, 380 insertions, 0 deletions
diff --git a/support-files/SCO/INSTALL.sh b/support-files/SCO/INSTALL.sh
new file mode 100755
index 00000000000..979f33f3f06
--- /dev/null
+++ b/support-files/SCO/INSTALL.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# search & check GNU patch
+PATCH="gpatch"
+$PATCH --version || PATCH="patch"
+$PATCH --version || exit
+
+
+if /usr/bin/test ! -e PKG/stamp-pre ; then
+ grep VERSION configure | head -1 | sed 's/VERSION=//' > ./PKG/version
+ touch PKG/stamp-pre
+fi
+
+if /usr/bin/test ! -e PKG/stamp-patch ; then
+ ${PATCH} -p0 < ./PKG/patch
+ touch PKG/stamp-patch
+fi
+
+if /usr/bin/test ! -e PKG/stamp-compile ; then
+sh ./PKG/compile.sh ujis
+touch PKG/stamp-compile
+
+sh ./PKG/doc.sh ujis
+
+fi
+
+
+cd PKG
+sh mkpkg.sh ujis
diff --git a/support-files/SCO/compile.sh b/support-files/SCO/compile.sh
new file mode 100644
index 00000000000..5281ccde02d
--- /dev/null
+++ b/support-files/SCO/compile.sh
@@ -0,0 +1,102 @@
+#!/bin/sh
+# GNU ncurses
+
+# search & check GNU make
+GMAKE="gmake"
+$GMAKE --version || GMAKE="make"
+$GMAKE --version || exit
+
+MAKE=$GMAKE
+export MAKE
+
+CC=gcc
+CFLAGS="-O6 -fomit-frame-pointer"
+CXX=gcc
+CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
+# LDFLAGS="-static"
+LD=gcc
+
+export CC
+export CXX
+export LD
+export CFLAGS
+export CXXFLAGS
+# export LDFLAGS
+# Solaris don't have libpthread.a.
+
+if [ "x$1" = "x" ]; then
+ echo " please set character set"
+ exit
+fi
+
+CHAR="$1"
+case "$1" in
+ [uU]*)
+ CHAR=ujis
+ ;;
+ [sS]*)
+ CHAR=sjis
+ ;;
+esac
+
+#---------------
+P=`pwd`
+
+if [ -f Makefile ] ; then
+ ${GMAKE} distclean
+fi
+
+for i in bin sbin include man share/doc/mysql mysql-data
+do
+ /usr/bin/mkdir -p PKG/tmp-${CHAR}/usr/local/${i}
+done
+/usr/bin/mkdir -p PKG/tmp-${CHAR}/etc/init.d
+
+#----------------------------
+./configure \
+ --prefix=/usr/local \
+ --libexecdir=/usr/local/sbin \
+ --sbindir=/usr/local/sbin \
+ --localstatedir=/usr/local/mysql-data \
+ --with-charset=${CHAR} \
+ --with-extra-charsets=all \
+ --with-raid \
+ --without-docs \
+ --without-bench \
+ --without-perl \
+ --with-gcc \
+ --with-mysqld-ldflags="-static" \
+ --with-client-ldflags="-static" \
+ --with-named-curses-libs=/usr/local/lib/libncurses.a \
+ --with-mysqld-user=mysql
+
+# --with-berkeley-db-includes=/usr/local/include/db3 \
+# --with-berkeley-db-libs=/usr/local/lib/libdb3.a \
+# --with-low-memory
+
+${GMAKE}
+${GMAKE} install DESTDIR=${P}/PKG/tmp-${CHAR}
+
+v=`grep '^SHARED_LIB_VERSION' configure.in | sed 's@SHARED_LIB_VERSION@@' | sed -e 's@=@@' -e 's@:@ @g' | awk '{print $1}'`
+km="libmysqlclient.so.$v"
+export km
+
+(cd ${P}/PKG/tmp-${CHAR}/usr/local/lib/mysql/ ; \
+ for i in libmysqlclient* ; do \
+ if /usr/bin/test ! -L $i ; then \
+ mv $i ../ ; ln -sf ../$i ; \
+ fi ; \
+ done ; \
+ k=`ls libmysqlclient.so.*.*.*` ; \
+ cd .. ; \
+ if /usr/bin/test ! -z libmysqlclient.so ; then \
+ ln -sf $k libmysqlclient.so ;
+ fi ; \
+ if /usr/bin/test ! -z $km ; then \
+ ln -sf $k $km ;
+ fi ; \
+)
+
+#
+(cd ${P}/PKG/tmp-${CHAR}/usr/local/bin ; strip * )
+(cd ${P}/PKG/tmp-${CHAR}/usr/local/sbin ; strip * )
diff --git a/support-files/SCO/doc.sh b/support-files/SCO/doc.sh
new file mode 100644
index 00000000000..9ef17166a6f
--- /dev/null
+++ b/support-files/SCO/doc.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+CHAR="$1"
+case "$1" in
+ [uU]*)
+ CHAR=ujis
+ ;;
+ [sS]*)
+ CHAR=sjis
+ ;;
+esac
+
+cp -r Docs/* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/
+cp INSTALL-SOURCE* COPYING* MIRRORS README* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/
+
+cd PKG/tmp-${CHAR}/usr/local/share/doc/mysql/
+gzip *.txt *.texi *.info *.pdf
diff --git a/support-files/SCO/mkpkg.sh b/support-files/SCO/mkpkg.sh
new file mode 100644
index 00000000000..5a38113138d
--- /dev/null
+++ b/support-files/SCO/mkpkg.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+if [ "x$1" = "x" ]; then
+ echo " please set charset"
+ exit
+fi
+
+CHAR="$1"
+case "$1" in
+ [uU]*)
+ CHAR=ujis ; CH=uj
+ ;;
+ [sS]*)
+ CHAR=sjis ; CH=sj
+ ;;
+esac
+
+#-------------------
+DIR=`pwd`
+
+VERSION=`cat version`
+
+T=`uname -p`
+
+sed -e "s/@CHAR1@/${CH}/" \
+ -e "s/@CHAR2@/${CHAR}/" \
+ -e "s/@VERSION@/${VERSION}/" \
+ -e "s/@TYPE@/${T}/" \
+ pkginfo.ini > pkginfo.${CHAR}
+
+sed -e "s,@DIR@,${DIR},g" \
+ -e "s,@PKGINFO@,${DIR}/pkginfo.${CHAR}," \
+ prototype.ini > prototype.${CHAR}
+
+INIT="tmp-${CHAR}/etc/init.d/mysql"
+cp ../support-files/mysql.server $INIT
+chmod 755 $INIT
+
+(cd tmp-${CHAR}; \
+chown root etc usr ; \
+chgrp sys etc usr ;\
+chmod 755 usr etc; \
+chgrp sys etc/init.d ; \
+chmod 755 etc/init.d ; \
+find . -print|pkgproto >> ../prototype.${CHAR})
+
+pkgmk -o -f prototype.${CHAR} -r ${DIR}/tmp-${CHAR}
diff --git a/support-files/SCO/patch b/support-files/SCO/patch
new file mode 100644
index 00000000000..373eb8518c6
--- /dev/null
+++ b/support-files/SCO/patch
@@ -0,0 +1,96 @@
+--- scripts/safe_mysqld.sh.orig Sat Sep 2 17:28:26 2000
++++ scripts/safe_mysqld.sh Sat Sep 2 17:31:19 2000
+@@ -89,10 +89,10 @@
+
+
+ NOHUP_NICENESS=`nohup nice`
+-if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice --1 echo foo > /dev/null 2>&1; then
++if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice -1 echo foo > /dev/null 2>&1; then
+ NOHUP_NICENESS="nohup"
+ else
+- NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup"
++ NOHUP_NICENESS="nice -$NOHUP_NICENESS nohup"
+ fi
+
+ export MYSQL_UNIX_PORT
+@@ -163,7 +163,8 @@
+ # The only thing is ps x => redhat 5 gives warnings when using ps -x.
+ # kill -9 is used or the process won't react on the kill.
+ numofproces=`ps xa | grep -v "grep" | grep -c $ledir/mysqld`
+- echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log
++ echo | tee -a $err_log
++ echo "Number of processes running now: $numofproces" | tee -a $err_log
+ I=1
+ while test "$I" -le "$numofproces"
+ do
+@@ -185,4 +186,6 @@
+ echo "`date +'%y%m%d %H:%M:%S mysqld restarted'`" | tee -a $err_log
+ done
+
+-echo -e "`date +'%y%m%d %H:%M:%S mysqld ended\n'`" | tee -a $err_log
++echo | tee -a $err_log
++echo "`date +'%y%m%d %H:%M:%S mysqld ended'`" | tee -a $err_log
++echo | tee -a $err_log
+--- support-files/mysql.server.sh.orig Sat Sep 2 17:35:56 2000
++++ support-files/mysql.server.sh Sat Sep 2 17:36:35 2000
+@@ -23,6 +23,9 @@
+ mysql_daemon_user=@MYSQLD_USER@
+ export PATH
+
++## your options...
++OPT=""
++
+ mode=$1
+
+ if test -w / # determine if we should look at the root config file
+@@ -82,8 +85,9 @@
+ then
+ # Give extra arguments to mysqld with the my.cnf file. This script may
+ # be overwritten at next upgrade.
+- $bindir/safe_mysqld \
+- --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file &
++ $bindir/safe_mysqld $OPT \
++ --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file &
++# --log=$log_file &
+ else
+ echo "Can't execute $bindir/safe_mysqld"
+ fi
+--- configure.orig Sat Sep 2 17:54:03 2000
++++ configure Sat Sep 2 17:54:18 2000
+@@ -202,7 +202,7 @@
+ --with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257
+ croat czech danish dec8 dos estonia euc_kr gb2312 gbk
+ german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
+- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr
++ latin1 latin2 swe7 usa7 win1250 win1251ukr
+ ujis sjis tis620; default is latin1)"
+ ac_help="$ac_help
+ --with-extra-charsets=cs1,cs2
+@@ -8843,7 +8843,7 @@
+
+ # Choose a character set
+
+-CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
++CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620"
+ DEFAULT_CHARSET=latin1
+
+ # Check whether --with-charset or --without-charset was given.
+--- configure.in.orig Sat Sep 2 17:53:57 2000
++++ configure.in Sat Sep 2 17:54:36 2000
+@@ -1517,14 +1517,14 @@
+ dnl or other special handling, you must also create
+ dnl strings/ctype-$charset_name.c
+
+-CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
++CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620"
+ DEFAULT_CHARSET=latin1
+
+ AC_ARG_WITH(charset,
+ [ --with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257
+ croat czech danish dec8 dos estonia euc_kr gb2312 gbk
+ german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
+- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr
++ latin1 latin2 swe7 usa7 win1250 win1251ukr
+ ujis sjis tis620; default is latin1)],
+ [default_charset="$withval"],
+ [default_charset="$DEFAULT_CHARSET"])
diff --git a/support-files/SCO/pkginfo.ini b/support-files/SCO/pkginfo.ini
new file mode 100644
index 00000000000..13b8b6adb09
--- /dev/null
+++ b/support-files/SCO/pkginfo.ini
@@ -0,0 +1,8 @@
+PKG=MySQL
+NAME=MySQL
+ARCH=@TYPE@
+VERSION=@VERSION@
+CATEGORY=utility
+VENDOR=TcX DataKonsult AB, Detron HB and MySQL AB
+BASEDIR=/
+CLASSES=none
diff --git a/support-files/SCO/postinstall b/support-files/SCO/postinstall
new file mode 100644
index 00000000000..2e199b9af82
--- /dev/null
+++ b/support-files/SCO/postinstall
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
+export PATH
+export LD_LIBRARY_PATH
+
+D0="/usr/local/mysql-data"
+D="${D0}/mysql"
+
+DOFIX=0
+
+if /usr/bin/test ! -f ${D}/tables_priv.frm -a -d ${D} ; then
+ DOFIX=1
+fi
+
+if [ ! -d ${D} ]; then
+ DOFIX=2
+ /usr/local/bin/mysql_install_db
+fi
+
+ chown -R mysql $D0
+ chgrp -R mysql $D0
+
+if /usr/bin/test $DOFIX -eq 1 ; then
+ /etc/init.d/mysql start
+ /usr/local/bin/mysql_fix_privilege_tables
+else
+ /etc/init.d/mysql start || true
+fi
diff --git a/support-files/SCO/preinstall b/support-files/SCO/preinstall
new file mode 100644
index 00000000000..c1175561a99
--- /dev/null
+++ b/support-files/SCO/preinstall
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
+export PATH
+export LD_LIBRARY_PATH
+
+if /usr/bin/test -x /etc/init.d/mysql ; then
+ /etc/init.d/mysql stop || true
+fi
+
+#----- user check
+P=`grep mysql /etc/passwd`
+G=`grep mysql /etc/group`
+
+if /usr/bin/test "x$G" = "x" ; then
+ /usr/sbin/groupadd mysql
+fi
+if /usr/bin/test "x$P" = "x" ; then
+ /usr/sbin/useradd -g mysql -d /usr/local/mysql-data -s /bin/false mysql
+fi
diff --git a/support-files/SCO/preremove b/support-files/SCO/preremove
new file mode 100644
index 00000000000..a89648431c1
--- /dev/null
+++ b/support-files/SCO/preremove
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
+export PATH
+export LD_LIBRARY_PATH
+
+pid=`/usr/bin/ps -e | /usr/bin/grep mysqld | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
+[ "$pid" != "" ] && /usr/local/bin/mysqladmin shutdown
+
+#---
+#/usr/ucb/echo -n "Remove DATA Directory (All data expire) [Y/N]? "
+#read I
+I=No
+
+case "$I" in
+Y*|y*)
+ /usr/ucb/echo -n "Removing MySQL DATA ALL..."
+ rm -rf /usr/local/mysql-data
+ echo "done."
+ ;;
+*)
+ echo "not purge DATA directory"
+ ;;
+esac;
diff --git a/support-files/SCO/prototype.ini b/support-files/SCO/prototype.ini
new file mode 100644
index 00000000000..ca88bb67a90
--- /dev/null
+++ b/support-files/SCO/prototype.ini
@@ -0,0 +1,4 @@
+i pkginfo=@PKGINFO@
+i postinstall=@DIR@/postinstall
+i preinstall=@DIR@/preinstall
+i preremove=@DIR@/preremove
diff --git a/support-files/SCO/version b/support-files/SCO/version
new file mode 100644
index 00000000000..f9dc296b71b
--- /dev/null
+++ b/support-files/SCO/version
@@ -0,0 +1 @@
+3.23.23-beta