View | Details | Raw Unified
Collapse All | Expand All

(-) hsqldb-1.7.3.1-r1.ebuild (-3 / +32 lines)
 Lines 10-16    Link Here 
LICENSE="as-is"
LICENSE="as-is"
SLOT="0"
SLOT="0"
KEYWORDS="x86 amd64 ppc64 sparc ppc"
KEYWORDS="~x86"
IUSE="doc jikes source"
IUSE="doc jikes source"
RDEPEND=">=virtual/jre-1.4
RDEPEND=">=virtual/jre-1.4
 Lines 44-50    Link Here 
	einfo "Preparing configuration files..."
	einfo "Preparing configuration files..."
	mkdir conf
	mkdir conf
	HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar
	HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar
	sed -e 's:^JAVA_EXECUTABLE=.*$:JAVA_EXECUTABLE=$(which java 2>/dev/null):g' \
	sed -e 's:^JAVA_EXECUTABLE=.*$:JAVA_EXECUTABLE=$(java-config --java 2>/dev/null):g' \
		-e "s/^HSQLDB_JAR_PATH=.*$/HSQLDB_JAR_PATH=${HSQLDB_JAR//\//\\/}/g" \
		-e "s/^HSQLDB_JAR_PATH=.*$/HSQLDB_JAR_PATH=${HSQLDB_JAR//\//\\/}/g" \
		-e "s/^SERVER_HOME=.*$/SERVER_HOME=\/var\/lib\/hsqldb/g" \
		-e "s/^SERVER_HOME=.*$/SERVER_HOME=\/var\/lib\/hsqldb/g" \
		-e "s/^HSQLDB_OWNER=.*$/HSQLDB_OWNER=hsqldb/g" \
		-e "s/^HSQLDB_OWNER=.*$/HSQLDB_OWNER=hsqldb/g" \
 Lines 74-81    Link Here 
	doinitd ${FILESDIR}/hsqldb
	doinitd ${FILESDIR}/hsqldb
	doconfd conf/hsqldb
	doconfd conf/hsqldb
	insinto /etc/hsqldb
	insinto /etc/hsqldb
	insopts -m 0600
	# Change the ownership of server.properties and sqltool.rc
	# files to hsqldb:hsqldb. (resolves Bug #111963)
	insopts -m 0600 -o hsqldb -g hsqldb
	doins conf/server.properties
	doins conf/server.properties
	insopts -m 0600 -o hsqldb -g hsqldb
	doins conf/sqltool.rc
	doins conf/sqltool.rc
	dodir /var/lib/hsqldb/bin
	dodir /var/lib/hsqldb/bin
 Lines 88-90    Link Here 
	chmod o-rwx ${D}/var/lib/hsqldb
	chmod o-rwx ${D}/var/lib/hsqldb
}
}
pkg_postinst() {
	ewarn "If you intend to run hsqldb in Server mode and you want to create"
	ewarn "additional databases, remember to put correct information in both"
	ewarn "'server.properties' and 'sqltool.rc' files."
	ewarn "(read the 'Init script Setup Procedure' section of the 'Chapter 3."
	ewarn "UNIX Quick Start' in the hsqldb docs for more information)"
	einfo ""
	einfo "Example:"
	einfo ""
	einfo "/etc/hsqldb/server.properties"
	einfo "============================="
	einfo "server.database.1=file:/var/lib/hsqldb/newdb/newdb"
	einfo "server.dbname.1=newdb"
	einfo "server.urlid.1=newdb"
	einfo ""
	einfo "/etc/hsqldb/sqltool.rc"
	einfo "======================"
	einfo "urlid newdb"
	einfo "url jdbc:hsqldb:hsql://localhost/newdb"
	einfo "username sa"
	einfo "password "
	ewarn ""
	ewarn "Also note that each hsqldb server can serve only up to 10"
	ewarn "different databases simultaneously (with consecutive {0-9}"
	ewarn "suffixes in the 'server.properties' file)."
}