1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/databases/frontbase/pkg-install
Edwin Groothuis bbfb03d5ed [NEW PORTS] www/webobjects(+) Apple WebObjects ports bundle
This is a bundle of several ports covering many typical requirements
for building an Apple WebObjects deployment environment. Each port
is or has a dependancy with some other port in the bundle, and have
therefore been lodged collectively.

	databases/frontbase:

	FrontBase is a high performance, scalable, SQL 92 compliant relational
	database server created in the internet age for universal deployment.

	WWW: http://www.frontbase.com/

PR:		ports/117299
Submitted by:	Quinton Dolan <q@onthenet.com.au>
2008-06-13 04:16:29 +00:00

279 lines
11 KiB
Bash

#! /bin/sh
# $FreeBSD$
PATH=/bin:/usr/sbin:/usr/bin
FBUSER=frontbase
DB_DIR=${PKG_PREFIX}/FrontBase/Databases
backupwarning() { echo "
=========== BACKUP YOUR DATA! =============
As always, backup your data before
upgrading. This is *NOT* done by the port!
Press ctrl-C *now* if you need to backup.
===========================================
"
sleep 5
}
licensestring() { echo "
You will need to obtain and install a valid license string.
Go to http://www.frontbase.com and request a license
Once you have obtained a valid license string, install it as follows:
Create a file ${PKG_PREFIX}/FrontBase/LicenseString with a single line
consisting of the 64-character license string, followed by a colon (:)
and the 16-character license check, i.e. a total of 81 characters.
Once the license file has been installed, restart FrontBase.
To verify that the license string has been installed correctly,
run ${PKG_PREFIX}/FrontBase/bin/FBInfoCenter
"
}
pre-install() {
backupwarning
USER=${FBUSER}
GROUP=${USER}
UID=275
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d ${DB_DIR} -c "FrontBase Daemon"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
if ! [ -x ~${FBUSER} ] ; then
mkdir -p ${DB_DIR}
chown frontbase:frontbase ${DB_DIR}
fi
}
post-install() {
mkdir -p ${PKG_PREFIX}/FrontBase/Backups
mkdir -p ${PKG_PREFIX}/FrontBase/Databases
mkdir -p ${PKG_PREFIX}/FrontBase/TransactionLogs
chmod 750 ${PKG_PREFIX}/FrontBase/Backups
chmod 750 ${PKG_PREFIX}/FrontBase/Databases
chmod 750 ${PKG_PREFIX}/FrontBase/TransactionLogs
chown -R frontbase:wheel ${PKG_PREFIX}/FrontBase/Backups \
${PKG_PREFIX}/FrontBase/Databases \
${PKG_PREFIX}/FrontBase/TransactionLogs
licensestring
}
show_license() {
more << EOF_LICENSE
FRONTBASE, INC. END USER LICENSE AGREEMENT
Please read this document carefully. This is a legal agreement
between you ("Licensee") and FrontBase, Inc. ("FrontBase"). BY
CLICKING THE ACCEPTANCE BUTTON, LICENSEE REPRESENTS AND AGREES THAT
LICENSEE IS AUTHORIZED TO CONSENT TO (AND HEREBY AGREES TO) THE
TERMS OF THIS AGREEMENT. IF LICENSEE DOES NOT AGREE TO ALL OF THE
TERMS, PLEASE SELECT THE BUTTON INDICATING NON-ACCEPTANCE.
TERMS AND CONDITIONS OF SOFTWARE LICENSE
1. GRANT OF LICENSE; USE RESTRICTIONS. This End User License
Agreement ("Agreement") permits Licensee to download and use one
copy of the Software on a single database server ("Server") and to
use and install the Software on multiple CPUs that are networked
to the Server. Licensee agrees that it shall not modify, translate,
reverse compile, decrypt, extract, disassemble, or otherwise reverse
engineer any portion of the Software.
2. COPY RESTRICTIONS. Licensee may make copies (full or partial)
for backup or archival purposes to support the right to use licensed
herein. Licensee agrees that all copies of the Software shall be
owned by FrontBase, shall be considered Software subject to this
Agreement, and shall include the same proprietary and copyright
notices and legends as supplied by FrontBase and its licensors.
3. OWNERSHIP OF SOFTWARE. FrontBase retains all right, title, and
interest in the Software. Licensee agrees that no title to the
Software, or the intellectual property in any of the Software, or
in any Software copy, is transferred to Licensee. This license is
not a sale of the original Software or any copy thereof.
4. TRANSFER RESTRICTIONS. Licensee may transfer the Software and
all licenses and rights in Software granted under this Agreement,
provided that all Software copies are also transferred or destroyed
and provided that the transferee agrees to accept the terms and
conditions of this Agreement. Licensee's license will automatically
terminate upon any transfer of the Software.
5. TERMINATION. Licensee may terminate this License, without the
right of refund, by notifying FrontBase of such termination. FrontBase
may terminate this license upon notice for Licensee's failure to
comply with any of these License Terms. Upon termination, Licensee
must immediately destroy the Software, together with all copies,
in any form.
6. GOVERNING LAW; DISPUTES. This Agreement shall be governed by
and interpreted in accordance with the State of California, excluding
its choice of law rules. The parties hereby agree that any dispute
regarding the interpretation or validity of, or otherwise arising
out of, this Agreement, or relating to the products licensed hereunder
shall be subject to the exclusive jurisdiction of the California
state courts (or, if there is federal jurisdiction, one of the
United Stated District Courts for the State of California, and the
parties agree to submit to the personal and exclusive jurisdiction
and the venue of these courts.
7. INTEGRATION. This Agreement is the entire agreement between
Licensee and FrontBase relating to Software and: (i) supersedes all
prior or contemporaneous oral or written communications, proposals
and representations with respect to its subject matter; and (ii)
prevails over any conflicting or additional terms of any quote,
order, acknowledgment, or similar communication between parties
during the term of this Agreement. No modification to the Agreement
will be binding, unless in writing and signed by a duly authorized
representative of each party.
8. SEVERABILITY. If any provision of this contract is found, by a
court of competent jurisdiction, to be invalid, the parties
nevertheless agree that the court should endeavor to give effect
to the parties' intentions as reflected in the provision and all
other provisions shall remain in effect.
9. LIMITED WARRANTY AND DISCLAIMER OF WARRANTY; LIMITATION OF
LIABILITY. FrontBase warrants that it has the authority and right
to license the Software, and that the Software will substantially
conform to the material printed specifications therefore which are
in effect on the date of original delivery of such Software.
FrontBase's entire liability under this warranty shall be, at
FrontBase's option, to either (a) refund the price paid for the
Software, or (b) repair and replace the full Software. FrontBase's
warranty and obligation shall extend for thirty (30) days after
initial installation of the Software by Licensee ("Warranty Period"),
and is solely for the benefit of Licensee, who has no authority to
assign or pass through this warranty to any other person or entity.
This warranty shall not apply if Software is used other than in
accordance with FrontBase's written instructions, or if any of
Licensee's hardware equipment associated with the use of Software
malfunctions.
Except as provided in this Section, the Software is provided to
Licensee on an "AS IS" basis, and FrontBase makes no other warranty
of any kind, express or implied, with regard to the Software licensed
hereunder. FrontBase does not warrant or represent that the Software
will operate uninterrupted or error free or that all defects in the
Software are correctable or will be corrected.
EXCEPT AS EXPRESSLY PROVIDED IN THIS LICENSE OR REQUIRED BY APPLICABLE
LAW, ALL WARRANTIES, CONDITIONS, REPRESENTATIONS, INDEMNITIES AND
GUARANTEES WITH RESPECT TO THE PRODUCTS, WHETHER EXPRESS OR IMPLIED,
ARISING BY LAW, CUSTOM, PRIOR ORAL OR WRITTEN STATEMENTS BY LICENSOR,
ITS LICENSORS OR REPRESENTATIVES OR OTHERWISE (INCLUDING, BUT NOT
LIMITED TO ANY WARRANTY OF MERCHANTABILITY, SATISFACTION AND FITNESS
FOR A PARTICULAR PURPOSE) ARE HEREBY OVERRIDDEN, EXCLUDED AND
DISCLAIMED. IN NO EVENT SHALL FRONTBASE BE LIABLE FOR ANY SPECIAL,
CONSEQUENTIAL, INCIDENTAL OR INDIRECT DAMAGES OF ANY KIND (INCLUDING
WITHOUT LIMITATION LOSS OF PROFITS OR DATA AND PERSONAL INJURY),
WHETHER OR NOT FRONTBASE HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH LOSS, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF THIS
AGREEMENT OR ARISING OUT OF LICENSEE'S USE OF THE SOFTWARE. THESE
LIMITATIONS SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL
PURPOSE OF ANY LIMITED REMEDY. In no event will FrontBase be liable
for any claim against Licensee by a third party, and Licensee hereby
agrees to defend, indemnify, and hold FrontBase harmless for any
claims for costs, damages, expenses (including without limitation,
reasonable attorneys' fees) or liability arising out of or in
connection with the installation, use and performance of the Software
licensed hereunder, whether alone or in combination with any other
product or service.
10. LIMITATION ON ACTIONS. Regardless of any statute or law to the
contrary, any claim or cause of action arising out of or related
to the use of the Software in this Agreement must be filed within
one (1) year after such claim or cause of action arose or be forever
barred.
11. WAIVER AND MODIFICATION. Any waiver or modification to this
License will not be effective unless executed in writing and signed
by an authorized representative of FrontBase.
12. U.S. EXPORT RESTRICTIONS AND GOVERNMENT RESTRICTED RIGHTS
LEGEND. You may not export or re-export the Software or any copy
or adaptation in violation of any applicable laws or regulations.
Licensee agrees that Licensee does not intend to, and will not,
without the prior written approval, if required, of the Office of
Export Administration of the U.S. Department of Commerce, Washington,
D.C. 20230, transmit either directly or indirectly, any portion of
the Software to any country for which such approval is required.
The Software and Documentation have been developed entirely at
private expense. Use, duplication or disclosure of the Software by
the Government is subject to restrictions as set forth in FAR
52.227-19(c) or subparagraph (c)(1)(ii) of the Rights in Technical
Data and Computer Software clause at DFARS 52.227-7013 and/or in
similar or successor clauses in the FAR, or the DOD or NASA FAR
supplement. Unpublished rights are reserved under the Copyright
Laws of the United States.
EOF_LICENSE
agreed=
while [ x$agreed = x ]; do
echo
echo "Do you agree to the above license terms? [yes or no] "
read reply leftover
case $reply in
y* | Y*)
agreed=1
;;
n* | n*)
echo
echo "If you don't agree to the license you can't install this software"
exit 1
;;
esac
done
}
case $2 in
PRE-INSTALL)
show_license
pre-install
exit 0
;;
POST-INSTALL)
post-install
exit 0
;;
BACKUPWARNING)
backupwarning
exit 0
;;
*)
exit 1
;;
esac