#!/bin/sh

name="irssi"
title="Irssi"
package="irssi"
version="0.8.6"
build="1"
noarch="n"
build_info=""

info="Irssi is a modular IRC client for UNIX."
desc="Irssi is a modular IRC client for UNIX that currently has
only text mode user interface, but 80-90% of the code isn't text
mode specific, so other UIs could be created pretty easily (GTK2
gui under development)."
category="net/client/irc"
environment="console/curses"
contact="$name@packages.packware.one.pl"
vendor="The Packware Project"
vendor_id="pw"

requires=""
obsoletes=""
conflicts=""

docs_source="ABOUT-NLS,ChangeLog,COPYING,INSTALL,NEWS,README,TODO,VERSION"
docs_cwd=""

strip_bin="y"
reset_own="y"
reset_dir="y"
reset_fil="y"
delete_cat="y"

. /usr/src/tgz/lib/builder.defs

add_source $name-$version.tar.bz2 $name-`echo $version | tr 'a-z' ' '`

verbose "Do you want to build Perl modules?"
yes_or_no with_perl y

if [ "$with_perl" = "y" ]; then

    configure_option --with-perl-lib=/usr/lib/perl5/site_perl/i386-linux
    configure_option --with-perl=module

else
    
    configure_option --with-perl=no

fi

verbose "Do you want to build Irssi's bot module?"
yes_or_no with_bot n

if [ "$with_bot" = "y" ]; then

    configure_option --with-bot

fi

verbose "Do you want to build proxy module?"
yes_or_no with_proxy n

if [ "$with_proxy" = "y" ]; then

    configure_option --with-proxy

fi

verbose "Do you want Irssi to support IPv6?"
yes_or_no with_ipv6 n

if [ "$with_ipv6" = "y" ]; then

    configure_option --enable-ipv6
    build_info "With IPv6."
    package_suffix ipv6

else
    
    build_info "Without IPv6."

fi

verbose "Do you want Irssi to support SSL?"
yes_or_no with_ssl y

if [ "$with_ssl" = "n" ]; then

    configure_option --disable-ssl
    build_info "Without SSL"

fi

configure_option --prefix=/usr
configure_option --without-socks

make_option docdir=/usr/doc/$name-$version

install_option DESTDIR=$pkg_main
install_option docdir=/usr/doc/$name-$version

parent_package="$package"
write_info main

cd $src1

do_configure
do_make

if [ "$with_perl" = "y" ]; then

    export PERL_INSTALL_ROOT=$pkg_main

fi

do_install

make_docs

subpackage changelog
subpackage devel
if [ "$with_bot" = "y" ]; then

    subpackage bot

fi
if [ "$with_perl" = "y" ]; then

    subpackage perl

fi
if [ "$with_proxy" = "y" ]; then

    subpackage proxy

fi

# This directory has empty subdirectories after excluding subpackages.
rm -rf $pkg_main/usr/lib

make_package main
make_package changelog
make_package devel
if [ "$with_bot" = "y" ]; then

    make_package bot

fi
if [ "$with_perl" = "y" ]; then

    make_package perl

fi
if [ "$with_proxy" = "y" ]; then

    make_package proxy

fi

clean_up

# $Log: irssi.builder,v $
# Revision 1.2  2002/11/20 09:09:04  swiergot
# - Reformatted desc variable.
# - Changed domain in contact variable to packages.packware.one.pl.
# - Removed needless comments.
#
# Revision 1.1  2002/11/19 22:33:05  stoodi
# - Initialized.
# - Version 0.8.6, build 1.
#
