#!/bin/sh
#
# source:
#   $Source: /var/cvs/projects/debian/wn/debian/dpkg.scripts/substfiles,v $
#
# revision:
#   @(#) $Id: substfiles,v 1.7 1998/05/05 02:55:34 jplejacq Exp $
#
# copyright:
#   Copyright (C) 1997 Jean Pierre LeJacq <jplejacq@quoininc.com>
#
#   Distributed under the GNU GENERAL PUBLIC LICENSE.
#
# description:
#   Define file system structure for package.
#
#   The idea behind this file is to support a variety of directory
#   layouts.  Two layouts are supported here: standard and opt.  Each
#   layout defines the directories that the files are installed in and
#   links that may be reguired to these files from standard locations
#   in the debian file system.
#
#   This is not a complete shell script.  Must be included in another
#   file.


# main:
  # source:
    f_pkg_src="${pkg}-${ver}.tar.gz"
    url_pkg_dir="http://hopf.math.nwu.edu"
    url_pkg_src="${url_pkg_dir}/${f_pkg_src}"


  if [ -f "debian/scheme-opt" ]
  then
    d_pkg_root="${d_host_opt}/${pkg}"

    # directories:
      d_pkg_bin="${d_pkg_root}/bin"
      d_pkg_bin_s="${d_pkg_root}/sbin"
      d_pkg_doc="${d_pkg_root}/doc"
      d_pkg_docbase="${d_pkg_doc}"
      d_pkg_lib="${d_pkg_root}/lib"
      d_pkg_man="${d_pkg_root}/man"
      d_pkg_pixmaps="${d_pkg_root}/include/pixmaps"

      d_pkg_bin_cgi="${d_pkg_lib}/cgi-bin"

      d_pkg_etc="${d_host_opt_etc}/${pkg}"

      d_pkg_var="${d_host_opt_var}/${pkg}"
      d_pkg_log="${d_pkg_var}/log"
      d_pkg_run="${d_host_run}/${pkg}"


    # files:
      f_pkg_docbase="${d_pkg_docbase}/${pkg}.doc-base"

      f_pkg_etc_crondaily="${d_pkg_etc}/${pkg}.cron.daily"
      f_pkg_etc_initd="${d_pkg_etc}/${pkg}.init.d"
      f_pkg_etc_conf="${d_pkg_etc}/${pkg}.conf"
      f_pkg_etc_rc="${d_pkg_etc}/${pkg}.rc"
      f_pkg_menu="${d_pkg_lib}/${pkg}.menu"

      f_pkg_log_access="${d_pkg_log}/access"
      f_pkg_log_error="${d_pkg_log}/error"
      f_pkg_run_pid="${d_pkg_run}/${pkg}.pid"


    # links:
      l_pkg_doc="${d_host_doc}/${pkg}"
      l_pkg_docbase="${d_host_docbase}/${pkg}"
      l_pkg_menu="${d_host_menu}/${pkg}"

      l_pkg_etc_crondaily="${d_host_etc_crondaily}/${pkg}"
      l_pkg_etc_initd="${d_host_etc_initd}/${pkg}"
  else
    # directories:
      d_pkg_bin="${d_host_bin_usr}"
      d_pkg_bin_s="${d_host_bin_s_usr}"
      d_pkg_doc="${d_host_doc}/${pkg}"
      d_pkg_docbase="${d_host_docbase}"
      d_pkg_lib="${d_host_lib_usr}/${pkg}"
      d_pkg_man="${d_host_man}"
      d_pkg_pixmaps="${d_host_pixmaps}"

      d_pkg_bin_cgi="${d_host_bin_cgi}/${pkg}"

      d_pkg_etc="${d_host_etc}/${pkg}"

      d_pkg_var="${d_host_var}"
      d_pkg_log="${d_pkg_var}/log/${pkg}"
      d_pkg_run="${d_host_run}/${pkg}"


    # files:
      f_pkg_docbase="${d_pkg_docbase}/${pkg}"

      f_pkg_etc_crondaily="${d_host_etc_crondaily}/${pkg}"
      f_pkg_etc_initd="${d_host_etc_initd}/${pkg}"
      f_pkg_etc_conf="${d_pkg_etc}/${pkg}.conf"
      f_pkg_etc_rc="${d_pkg_etc}/${pkg}.rc"
      f_pkg_menu="${d_host_menu}/${pkg}"

      f_pkg_log_access="${d_pkg_log}/access"
      f_pkg_log_error="${d_pkg_log}/error"
      f_pkg_run_pid="${d_pkg_run}/${pkg}.pid"


    # links:
      l_pkg_doc="${d_pkg_doc}"
      l_pkg_docbase="${f_pkg_docbase}"
      l_pkg_menu="${f_pkg_menu}"

      l_pkg_etc_crondaily="${f_pkg_etc_crondaily}"
      l_pkg_etc_initd="${f_pkg_etc_initd}"
  fi
