create.sh revision 6ba6a49186aff8de4dc5251195b9917021b5ee69
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# CDDL HEADER START
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# The contents of this file are subject to the terms of the
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# Common Development and Distribution License (the "License").
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# You may not use this file except in compliance with the License.
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# See the License for the specific language governing permissions
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# and limitations under the License.
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# When distributing Covered Code, include this CDDL HEADER in each
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# If applicable, add the following below this CDDL HEADER, with the
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# fields enclosed by brackets "[]" replaced with your own identifying
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# information: Portions Copyright [yyyy] [name of copyright owner]
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# CDDL HEADER END
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republic# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# Use is subject to license terms.
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbyeversion=`grep 'name="version"' build.xml | cut -f 4 -d \"`
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republicrevision=0.`uname -v | perl -ne 's/(\d+)/print "$1\n"/e'`
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye if [ $? != 0 ]
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbyeeval `pkgsend open OSOLopengrok@${version}-${revision}`
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbyeif [ $? != 0 ]
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye echo "Fatal: could not open OSOLopengrok@${version}-${revision}"
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republicfor dir in /etc/opengrok /usr/opengrok /usr/opengrok/man /usr/opengrok/man/man1\
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republic /usr/opengrok/doc
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye PKGSEND add dir mode=0755 owner=root group=sys path=${dir}
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republicfor dir in /usr/opengrok/bin /usr/opengrok/lib
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republicdo
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republic PKGSEND add dir mode=0755 owner=root group=bin path=${dir}
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republicdone
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbyefor dir in /var/opengrok /var/opengrok/data /var/opengrok/etc \
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republic PKGSEND add dir mode=0755 owner=webservd group=webservd path=${dir}
5e6c91d7e77062129cd0b6ac8aaa546dff216419Lubos KoscoPKGSEND add link path=/usr/opengrok/lib/lib target=../lib
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond NorbyePKGSEND add file platform/solaris/smf/opengrok.xml mode=0444 owner=root group=sys path=/var/svc/manifest/application/opengrok.xml restart_fmri=svc:/system/manifest-import:default
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add file platform/solaris/smf/svc-opengrok mode=0555 owner=root group=bin path=/lib/svc/method/svc-opengrok
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add file platform/solaris/smf/ogindexd mode=0555 owner=root group=bin path=/usr/opengrok/lib/ogindexd
5e6c91d7e77062129cd0b6ac8aaa546dff216419Lubos KoscoPKGSEND add file OpenGrok mode=0555 owner=root group=bin path=/usr/opengrok/bin/OpenGrok
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add file dist/opengrok.jar mode=0444 owner=root group=bin path=/usr/opengrok/lib/opengrok.jar
5e6c91d7e77062129cd0b6ac8aaa546dff216419Lubos KoscoPKGSEND add file logging.properties mode=0444 owner=root group=sys path=/usr/opengrok/doc/logging.properties
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add file README.txt mode=0444 owner=root group=sys path=/usr/opengrok/doc/README.txt
5e6c91d7e77062129cd0b6ac8aaa546dff216419Lubos KoscoPKGSEND add file CHANGES.txt mode=0444 owner=root group=sys path=/usr/opengrok/doc/CHANGES.txt
5e6c91d7e77062129cd0b6ac8aaa546dff216419Lubos KoscoPKGSEND add file LICENSE.txt mode=0444 owner=root group=sys path=/usr/opengrok/doc/LICENSE.txt
5e6c91d7e77062129cd0b6ac8aaa546dff216419Lubos KoscoPKGSEND add file NOTICE.txt mode=0444 owner=root group=sys path=/usr/opengrok/doc/NOTICE.txt
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add file doc/EXAMPLE.txt mode=0444 owner=root group=sys path=/usr/opengrok/doc/EXAMPLE.txt
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# install libs
ab4ab2edaac480f68b476dc19e015c54cd4f1978Lubos Kosco lucene-core-3.0.2.jar lucene-spellchecker-3.0.2.jar \
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech Republic PKGSEND add file dist/lib/${file} mode=0444 owner=root group=bin path=/usr/opengrok/lib/${file}
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# install man page
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add file dist/opengrok.1 mode=0444 owner=root group=bin path=/usr/opengrok/man/man1/opengrok.1
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond Norbye# install default configuration
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add depend fmri=pkg:/runtime/java type=require
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add depend fmri=pkg:/web/java-servlet/tomcat type=require
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add depend fmri=pkg:/developer/tool/exuberant-ctags type=require
d3f4f9ed01f6a0b171d0a81c630f5708e47adb7avitezslav batrla - Sun Microsystems - Prague Czech RepublicPKGSEND add file dist/source.war mode=0444 owner=webservd group=webservd path=/var/tomcat6/webapps/source.war
d20db9dd18673cf482111b9cd3ecc6823d0e45a3Trond NorbyePKGSEND add set name=description value="OpenGrok - Wicked fast source browser"