#! /usr/bin/perl
#
# $Header: //sapdb/TOOLSRC/develop/sys/src/BuildPackage/PackDefs.pm#4 $
# $DateTime: 2002/03/08 15:32:18 $
# $Change: 17731 $
#
# Desc:	- define packages and profiles of SAP DB Packages
#		
#
		
package BuildPackage::PackDefs;

use Exporter;
use BuildPackage::Vars;

@ISA = ('Exporter');

@EXPORT = ('%profile_in_name','%profiles','@allpackages');

#define profiles -> contain package names
%profiles=(
	'Server' => ['Base','Server Utilities','Database Kernel',$LC_STATE eq 'DEV' ? undef : "PCR $RUNTIME_VERSION"],
	
	#'APO LiveCache' => ['Base','Server Utilities','Database Kernel',"PCR $RUNTIME_VERSION",'APO COM'],

	'APO LiveCache' => ['APO COM'],

	#'Client' =>  ['Base',"PCR $RUNTIME_VERSION"],

	'Runtime For SAP AS' => ['Base',"PCR $RUNTIME_VERSION"],
	
	#'Runtime For SAP AS' => ['Base',"PCR $RUNTIME_VERSION",'JDBC'],
	
	'Web' => ['Base','Webtools'],
	
	'DB Analyzer' => ['Base',$^O =~ /mswin/i ? 'ODBC' : undef ,'DB Analyzer'],
	
	'Develop' => ['Base',"PCR $RUNTIME_VERSION","SDK $RUNTIME_VERSION",'ODBC','JDBC','Perl Driver','Python Driver']
);


%profile_in_name = (

	'Runtime For SAP AS' => 'as_runtime',
	'APO LiveCache' => "apo${APO_SHORT_VERS}_livecache"

);

	
	
#define packages
@allpackages=(
		{
			'name' => 'Base',
			'subdir' => 'base',
			'script' => 'instbase',
			'archive' => 'SAPDBBAS.TGZ',
			'filelist' => 'base.lst'	
		},
		{
			'name' => 'Server Utilities',
			'subdir' => 'utils',
			'script' => 'instutils',
			'archive' => 'SAPDBUTL.TGZ',
			'filelist' => 'utils.lst'	
		},
		{
			'name' => 'Database Kernel',
			'subdir' => 'kernel',
			'script' => 'instsrv',
			'archive' => 'SAPDBKRN.TGZ',
			'filelist' => 'kernel.lst'	
		},
		{
			'name' => "PCR $RUNTIME_VERSION",
			'subdir' => 'pcr',
			'script' => 'instpcr',
			'archive' => "PCR$MAJ$MIN$COR.TGZ",
			'filelist' => 'pcr.lst',
			'specialFunc' => \&BuildPackage::New::copyPCR
		},
		
		{
			'name' => 'DB Analyzer',
			'subdir' => 'dbana',
			'script' => 'instdbana',
			'archive' => 'SAPDBANA.TGZ',
			'filelist' => 'dbana.lst'	
		},
		{
			'name' => "SDK $RUNTIME_VERSION",
			'subdir' => 'sdk',
			'script' => 'instsdk',
			'archive' => "SDK$RUNTIME_VERSION.TGZ",
			'filelist' => 'sdk.lst'	
		},
		{
			'name' => 'Webtools',
			'subdir' => 'web',
			'script' => 'instweb',
			'archive' => 'SAPDBWEB.TGZ',
			'filelist' => 'web.lst'	
		},
		{
			'name' => 'ODBC',
			'subdir' => 'odbc',
			'script' => 'instodbc',
			'archive' => 'SAPODBC.TGZ',
			'filelist' => 'odbc.lst'	
		},	
		{
			'name' => 'JDBC',
			'subdir' => 'jdbc',
			'script' => 'instjdbc',
			'archive' => 'SAPJDBC.TGZ',
			'filelist' => 'jdbc.lst',
			'FileMappings' => $^O =~ /mswin/i ? {"$RUNTIME_PATH/pgm/sapdbcbin.dll" => 'pgm/sapdbcbin.dll','runtime/jar/sapdbc.jar' => 'misc/sapdbc.jar'} : {'runtime/jar/sapdbc.jar' => 'misc/sapdbc.jar'} 	
		},
		{
			'name' => 'Perl Driver',
			'subdir' => 'perl',
			'script' => 'instperl',
			'archive' => 'SAPDBPL.TGZ',
			'filelist' => 'perl.lst'
		},
		{
			'name' => 'Python Driver',
			'subdir' => 'python',
			'script' => 'instpy',
			'archive' => 'SAPDBPY.TGZ',
			'filelist' => 'python.lst'	
		},
		{
			'name' => 'APO COM',
			'subdir' => 'apocom',
			'script' => 'instapocom',
			'archive' => 'APOCOM.TGZ',
			'filelist' => 'apocom.lst'
		}
);





1;

