#!/bin/sh
#
# source:
#   $Source: /var/cvs/projects/debian/printop/debian/dpkg.scripts/substfiles,v $
#
# revision:
#   @(#) $Id: substfiles,v 1.3 1998/04/23 04:29:24 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://www.asta.uni-hamburg.de/users/cbx"
    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_doc="${d_pkg_root}/doc"
      d_pkg_docbase="${d_pkg_doc}"
      d_pkg_man="${d_pkg_root}/man"
      d_pkg_menu="${d_pkg_root}/lib"

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


    # files:
      f_pkg_docbase="${d_pkg_docbase}/${pkg}.doc-base"
      f_pkg_etc_conf="${d_pkg_etc}/${pkg}.conf"
      f_pkg_menu="${d_pkg_menu}/${pkg}.menu"

      f_pkg_etcuser_conf="~/.${pkg}.conf"


    # links:
      l_pkg_menu="${d_host_menu}/${pkg}"
      l_pkg_doc="${d_host_doc}/${pkg}"
      l_pkg_docbase="${d_host_docbase}/${pkg}"
  else
    # directories:
      d_pkg_bin="${d_host_bin_usr}"
      d_pkg_doc="${d_host_doc}/${pkg}"
      d_pkg_docbase="${d_host_docbase}"
      d_pkg_man="${d_host_man}"
      d_pkg_menu="${d_host_menu}"

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


    # files:
      f_pkg_docbase="${d_pkg_docbase}/${pkg}"
      f_pkg_etc_conf="${d_pkg_etc}/${pkg}.conf"
      f_pkg_menu="${d_pkg_menu}/${pkg}"

      f_pkg_etcuser_conf="~/.${pkg}.conf"


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