#                     P K G B U I L D
# BRL-CAD
#
# Copyright (c) 2007-2010 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# 3. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###
#
# This is the BRL-CAD package file for Arch Linux.
#
# Contributor: Loui Chang <louipc.ist@NOSPAMgmail.com>
#
###
pkgname=brlcad
pkgdesc="An extensive Constructive Solid Geometry (CSG) modeling system."
_major=$(cat ../../include/conf/MAJOR)
_minor=$(cat ../../include/conf/MINOR)
_patch=$(cat ../../include/conf/PATCH)
pkgver=$_major.$_minor.$_patch
pkgrel=1
url="http://brlcad.org"
license=('custom:BDL' 'BSD' 'LGPL')
install=brlcad.install
arch=('i686' 'x86_64')
makedepends=('bc' 'libxslt')
optdepends=('tkhtml3: For man page browsing in mged.')
depends=('boost' 'flex' 'libgl' 'libpng' 'tk>=8.5' 'zlib')

options=('!libtool' '!strip' 'docs')
source=('brlcad.sh')
md5sums=('451f65ed85b1364cc7a0bfa93192d93b')

build() {
    cd $startdir/../../

    # Uncomment the next line if building from SVN fetched sources.
    #./autogen.sh
    ./configure --prefix=/opt/brlcad
    make || return 1
    make DESTDIR=$startdir/pkg install || return 1

    mkdir -p $startdir/pkg/etc/profile.d
    install -m755 $startdir/src/brlcad.sh $startdir/pkg/etc/profile.d

    mkdir -p $startdir/pkg/usr/share/licenses/$pkgname
    cp $startdir/../../doc/legal/bdl.txt \
        $startdir/pkg/usr/share/licenses/$pkgname

}

# Local Variables:
# tab-width: 8
# mode: sh
# indent-tabs-mode: t
# End:
# ex: shiftwidth=4 tabstop=8
