From a951be6e87b588c7cf84beb8e11aaf112631b71e Mon Sep 17 00:00:00 2001 From: thierry Date: Sun, 8 Aug 2004 13:21:03 +0000 Subject: Add sybase_ase 11.0.3.3, Sybase ASE RDBM System 11. PR: 50068 Submitted by: Alex Kiesel --- databases/Makefile | 1 + databases/sybase_ase/Makefile | 44 ++ databases/sybase_ase/distinfo | 2 + databases/sybase_ase/files/sybase.sh.sample | 44 ++ databases/sybase_ase/pkg-descr | 8 + databases/sybase_ase/pkg-install | 121 +++ databases/sybase_ase/pkg-plist | 1054 +++++++++++++++++++++++++++ 7 files changed, 1274 insertions(+) create mode 100644 databases/sybase_ase/Makefile create mode 100644 databases/sybase_ase/distinfo create mode 100644 databases/sybase_ase/files/sybase.sh.sample create mode 100644 databases/sybase_ase/pkg-descr create mode 100644 databases/sybase_ase/pkg-install create mode 100644 databases/sybase_ase/pkg-plist (limited to 'databases') diff --git a/databases/Makefile b/databases/Makefile index 3d4ad6a..e7f5893 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -307,6 +307,7 @@ SUBDIR += sqlrelay SUBDIR += sqsh SUBDIR += sybase-ocsd + SUBDIR += sybase_ase SUBDIR += sybtcl SUBDIR += tcl-Mysql SUBDIR += tdb diff --git a/databases/sybase_ase/Makefile b/databases/sybase_ase/Makefile new file mode 100644 index 0000000..2679c52 --- /dev/null +++ b/databases/sybase_ase/Makefile @@ -0,0 +1,44 @@ +# New ports collection makefile for: sybase-ase +# Date created: 8 March 2003 +# Whom: Alex Kiesel +# +# $FreeBSD$ +# + +PORTNAME= sybase_ase +PORTVERSION= 11.0.3.3 +CATEGORIES= databases +MASTER_SITES= http://download.sybase.com/pub/ase1103_linux/ +DISTNAME= ${PORTNAME:S/_/-/}-${PORTVERSION:S/./_/g}-FreeBSD-6_i386 +EXTRACT_SUFX= .tgz + +MAINTAINER= kiesel@schlund.de +COMMENT= Sybase ASE RDBM System 11 + +RESTRICTED= "Please see the license" +NO_BUILD= "This is a precompiled package" +ONLY_FOR_ARCHS= i386 +NO_PACKAGE= "Packaging is pointless, the port does not build anything" +NO_INSTALL_MANPAGES= yes +PKGDEINSTALL= ${PKGDIR}/pkg-install + +USE_LINUX= yes + +pre-install: + @${ECHO_MSG} "---> Creating sybase user and group" + @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + +do-install: + ${MKDIR} ${PREFIX}/sybase-ase + ${TAR} -xzpf ${_DISTDIR}${DISTFILES} -C ${PREFIX}/sybase-ase + ${MV} ${PREFIX}/sybase-ase/sybase/* ${PREFIX}/sybase-ase/ + ${CHOWN} -R sybase:sybase ${PREFIX}/sybase-ase + ${INSTALL_SCRIPT} ${FILESDIR}/sybase.sh.sample ${PREFIX}/etc/rc.d/ + @${ECHO_MSG} "Sybase ASE ${PORTVERSION} has been successfully installed." + @${ECHO_MSG} "A sample startup script has been copied to" + @${ECHO_MSG} "${PREFIX}/etc/rc.d/sybase.sh.sample" + @${ECHO_MSG} "" + @${ECHO_MSG} "You must now configure your sybase. To do so, su to 'sybase'" + @${ECHO_MSG} "and run ./install/sybinit" + +.include diff --git a/databases/sybase_ase/distinfo b/databases/sybase_ase/distinfo new file mode 100644 index 0000000..302a7a9 --- /dev/null +++ b/databases/sybase_ase/distinfo @@ -0,0 +1,2 @@ +MD5 (sybase-ase-11_0_3_3-FreeBSD-6_i386.tgz) = 88f1a4e111a7d05ef1932a1df0acc1ff +SIZE (sybase-ase-11_0_3_3-FreeBSD-6_i386.tgz) = 20140580 diff --git a/databases/sybase_ase/files/sybase.sh.sample b/databases/sybase_ase/files/sybase.sh.sample new file mode 100644 index 0000000..2730af0 --- /dev/null +++ b/databases/sybase_ase/files/sybase.sh.sample @@ -0,0 +1,44 @@ +#!/bin/sh +export SYBASE=`grep -e "^sybase" /etc/passwd | cut -d: -f 6` +if [ -n "${SYBASE}" -a -d "${SYBASE}" ]; then + export PATH="${SYBASE}/bin:${SYBASE}/install:${PATH}" + + unset LANG + unset LC_ALL + + case "$1" in + start) + echo -n "Sybase ASE " + cd ${SYBASE}/install + for run_server in RUN_* ; do + su sybase -c "startserver -f ${run_server}" > /dev/null 2>&1 + echo -n "${run_server} " + done + echo -n "done" + ;; + + stop) + echo -n "Sybase ASE " + killall dataserver + killall backupserver + ;; + + status) + showserver + ;; + + restart) + $0 stop + $0 start + ;; + + *) + echo "usage - $0 {start|stop|status|restart}" + exit 1 + esac +else + echo "Sybase home directory not set, cannot continue" + exit 1 +fi + +exit 0 diff --git a/databases/sybase_ase/pkg-descr b/databases/sybase_ase/pkg-descr new file mode 100644 index 0000000..772b6a3 --- /dev/null +++ b/databases/sybase_ase/pkg-descr @@ -0,0 +1,8 @@ +This is a port for the Sybase Adaptive Server Enterprise +database server. + +Sybase ASE is a very powerful relational database server that +offers support for transactions, locks, differend isolation +levels, stored procedures, backup and housekeeping tasks. + +WWW: http://www.sybase.com/detail?id=1009516 diff --git a/databases/sybase_ase/pkg-install b/databases/sybase_ase/pkg-install new file mode 100644 index 0000000..ef45264 --- /dev/null +++ b/databases/sybase_ase/pkg-install @@ -0,0 +1,121 @@ +#! /bin/sh +# +# $FreeBSD$ +# + +user=sybase +group=sybase +homedir=${PREFIX}/sybase-ase + +ask() { + local question default answer + + question=$1 + default=$2 + if [ -z "${PACKAGE_BUILDING}" ]; then + read -p "${question} [${default}]? " answer + fi + if [ x${answer} = x ]; then + answer=${default} + fi + echo ${answer} +} + +yesno() { + local dflt question answer + + question=$1 + dflt=$2 + while :; do + answer=$(ask "${question}" "${dflt}") + case "${answer}" in + [Yy]*) return 0;; + [Nn]*) return 1;; + esac + echo "Please answer yes or no." + done +} + +make_account() { + local u g gcos home + + u=$1 + g=$2 + gcos=$3 + home=$4 + + if pw group show "${g}" >/dev/null 2>&1; then + echo "You already have a group \"${g}\", so I will use it." + else + echo "You need a group \"${g}\"." + if which -s pw && yesno "Would you like me to create it" y; then + pw groupadd ${g} || exit + echo "Done." + else + echo "Please create it, and try again." + if ! grep -q "^${u}:" /etc/passwd; then + echo "While you're at it, please create a user \"${u}\" too," + echo "with a default group of \"${g}\"." + fi + exit 1 + fi + fi + + if pw user show "${u}" >/dev/null 2>&1; then + echo "You already have a user \"${u}\", so I will use it." + else + echo "You need a user \"${u}\"." + if which -s pw && yesno "Would you like me to create it" y; then + pw useradd ${u} -g ${g} -d ${home} -c "${gcos}" || exit + echo "Done." + else + echo "Please create it, and try again." + exit 1 + fi + fi + +} + +delete_account() { + local u g + + u=$1 + g=$2 + if yesno "Do you want me to remove group \"${g}\"" y; then + pw groupdel -n ${g} + echo "Done." + fi + if yesno "Do you want me to remove user \"${u}\"" y; then + pw userdel -n ${u} + echo "Done." + fi +} + +case $2 in + +PRE-INSTALL) + if which -s pw ; then + : + else + cat <