Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 38163 | Differences between
and this patch

Collapse All | Expand All

(-)vocp-0.9.3.orig/install_vocp.pl (-67 / +86 lines)
Lines 69-89 Link Here
69
					'Crypt::Blowfish'	=> [0, 'VOCPweb'],
69
					'Crypt::Blowfish'	=> [0, 'VOCPweb'],
70
					'MIME::Parser'	=> [0, 'Email-to-VoiceMail'],
70
					'MIME::Parser'	=> [0, 'Email-to-VoiceMail'],
71
		);
71
		);
72
	
72
73
my $BASEDIR = $ENV{'VOCP_BASEDIR'};
74
			
73
my $AudioDSPModLocation = 'prog/dependencies/Audio-DSP-0.02b/';
75
my $AudioDSPModLocation = 'prog/dependencies/Audio-DSP-0.02b/';
74
76
75
my $ModemVgettyModLocation = 'prog/dependencies/Modem-Vgetty-0.04/';
77
my $ModemVgettyModLocation = 'prog/dependencies/Modem-Vgetty-0.04/';
76
78
77
my $VOCPDepsLocation = 'prog/dependencies/';
79
my $VOCPDepsLocation = 'prog/dependencies/';
78
$Version = '0.9.2';
80
$Version = '0.9.3';
79
81
80
$LocalDir = '/usr/local/vocp';
82
$LocalDir = $BASEDIR . '/usr/share/vocp';
81
83
82
$Cp = '/bin/cp';
84
$Cp = '/bin/cp';
83
85
84
$VOCP_conf_dir = "/etc/vocp";
86
$VOCP_conf_dir = $BASEDIR . "/etc/vocp";
85
87
86
$Spool_dir = '/var/spool/voice';
88
$Spool_dir = $BASEDIR . '/var/spool/voice';
87
89
88
@Message_dirs = ( 
90
@Message_dirs = ( 
89
		'messages/num',
91
		'messages/num',
Lines 136-142 Link Here
136
	'boxsample'	=> 'prog/boxes.conf.sample',
138
	'boxsample'	=> 'prog/boxes.conf.sample',
137
);
139
);
138
140
139
@LogFiles = ('/var/log/vocp.log', '/var/log/vocp-calls.log');
141
@LogFiles = ($BASEDIR . '/var/log/vocp.log', $BASEDIR . '/var/log/vocp-calls.log');
140
142
141
143
142
@Doc_files = (
144
@Doc_files = (
Lines 170-189 Link Here
170
	$Pwd = `pwd`;
172
	$Pwd = `pwd`;
171
	chomp($Pwd);
173
	chomp($Pwd);
172
174
173
	print "\n\nVOCP installer\n"
175
#	print "\n\nVOCP installer\n"
174
		. "$License\n\n"
176
#		. "$License\n\n"
175
		."This program will install VOCP $Version.\n"
177
#		."This program will install VOCP $Version.\n"
176
		."You may just press the ENTER key to accept "
178
#		."You may just press the ENTER key to accept "
177
		."the [default] value for any question.\n";
179
#		."the [default] value for any question.\n";
178
180
179
	my $AgreeLicense = 'n';
181
#	my $AgreeLicense = 'n';
180
	print "\n\nYou understand that the VOCP system, it's source code and all supporting documents and resources are\n"
182
#	print "\n\nYou understand that the VOCP system, it's source code and all supporting documents and resources are\n"
181
		. "\nCopyright (C) 2000-2003 Patrick Deegan, Psychogenic INC\n"
183
#		. "\nCopyright (C) 2000-2003 Patrick Deegan, Psychogenic INC\n"
182
		. "\nand subject to the terms and conditions described in the accompanying LICENSE file.  You have read the LICENSE and "
184
#		. "\nand subject to the terms and conditions described in the accompanying LICENSE file.  You have read the LICENSE and "
183
		. "agree to comply with the terms and conditions described therein? [$AgreeLicense]: ";
185
#		. "agree to comply with the terms and conditions described therein? [$AgreeLicense]: ";
186
#
187
#	option(\$AgreeLicense);
184
188
185
	option(\$AgreeLicense);
189
	my $AgreeLicense = 'y';	
186
	
187
	unless ($AgreeLicense =~ m|^\s*[yY]|)
190
	unless ($AgreeLicense =~ m|^\s*[yY]|)
188
	{
191
	{
189
		print "\nYou must agree to comply to the terms of the LICENSE before using VOCP or any parts thereof.\n"
192
		print "\nYou must agree to comply to the terms of the LICENSE before using VOCP or any parts thereof.\n"
Lines 191-206 Link Here
191
		exit(0);
194
		exit(0);
192
	}
195
	}
193
	
196
	
194
	print "\n\n";
197
#	print "\n\n";
195
		
198
#		
196
	########################### INSTALL Type ################################
199
	########################### INSTALL Type ################################
197
	# Type of installation
200
	# Type of installation
198
	my $install = $Install_type{'full'};
201
	my $install = $Install_type{'full'};
199
	print "Enter:\n$Install_type{'full'} for full vocp install,\n"
202
	if ( $ENV{'VOCP_INSTALL_TYPE'} ne '' ) {
200
	     ."$Install_type{'upgrade'} if you are upgrading a previous version of VOCP (read doc/upgrading.txt!),\n"
203
		$install = $ENV{'VOCP_INSTALL_TYPE'};
201
	     ."$Install_type{'sound'} if you only wish to convert the sound files "
204
	}
202
	     ."to rmd format\n[$install]: ";	     
205
203
	option(\$install);
206
#	print "Enter:\n$Install_type{'full'} for full vocp install,\n"
207
#	     ."$Install_type{'upgrade'} if you are upgrading a previous version of VOCP (read doc/upgrading.txt!),\n"
208
#	     ."$Install_type{'sound'} if you only wish to convert the sound files "
209
#	     ."to rmd format\n[$install]: ";	     
210
#	option(\$install);
204
	
211
	
205
	unless ($install =~ /^\d$/ && $install < 4) {
212
	unless ($install =~ /^\d$/ && $install < 4) {
206
		print "Invalid selection ($install), please try again...\n\n";
213
		print "Invalid selection ($install), please try again...\n\n";
Lines 212-229 Link Here
212
			|| $install == $Install_type{'upgrade'}) && $> != 0);
219
			|| $install == $Install_type{'upgrade'}) && $> != 0);
213
220
214
	if ($install == $Install_type{'upgrade'}) { # Skip sound file conversion
221
	if ($install == $Install_type{'upgrade'}) { # Skip sound file conversion
215
		print "Skipping sound file conversion.\n";
222
#		print "Skipping sound file conversion.\n";
216
	} else {
223
	} else {
217
		convert_sound() ;
224
		convert_sound() ;
218
	}
225
	}
219
	
226
	
220
	# If user selected only to convert, we're done.
227
	# If user selected only to convert, we're done.
221
	if ($install == $Install_type{'sound'}) {
228
	if ($install == $Install_type{'sound'}) {
222
		print "Done.\n\n";
229
#		print "Done.\n\n";
223
		exit(0);	
230
		exit(0);	
224
	}
231
	}
225
232
226
	system("touch " . join(" ", @LogFiles));
233
#	system("touch " . join(" ", @LogFiles));
227
234
228
	########################### Dependencies ################################
235
	########################### Dependencies ################################
229
	my $numSpaces = 30;
236
	my $numSpaces = 30;
Lines 267-276 Link Here
267
	if ($numFound != $numReqs)
274
	if ($numFound != $numReqs)
268
	{
275
	{
269
	
276
	
270
		my $installDeps = 'y';
277
		my $installDeps = 'n';
271
		print "\nCertain modules now required by VOCP were not found.  You must install the modules marked REQUIRED before proceeding.  "
278
		print "\nCertain modules now required by VOCP were not found.  You must install the modules marked REQUIRED before proceeding.";
272
			. "You may:\n\t- Abort and manually install any dependencies\n\t- Proceed with current configuration.\n\t- Attempt to automatically install all missing dependencies.\n\nInstall ALL dependencies automatically (you must be connected to the Internet)? [$installDeps]: ";
279
#			. "You may:\n\t- Abort and manually install any dependencies\n\t- Proceed with current configuration.\n\t- Attempt to automatically install all missing dependencies.\n\nInstall ALL dependencies automatically (you must be connected to the Internet)? [$installDeps]: ";
273
		option(\$installDeps);
280
#		option(\$installDeps);
274
	
281
	
275
		if ($installDeps =~ /^\s*[yY]/)
282
		if ($installDeps =~ /^\s*[yY]/)
276
		{
283
		{
Lines 355-365 Link Here
355
362
356
	########################### VOCP modules ################################
363
	########################### VOCP modules ################################
357
	#Copy program files
364
	#Copy program files
358
	chdir($Pwd);
365
#	chdir($Pwd);
359
	print "Installing VOCP Perl modules...\n";
366
#	print "Installing VOCP Perl modules...\n";
360
	chdir($PerlModule_dirs{'VOCP'});
367
#	chdir($PerlModule_dirs{'VOCP'});
361
	system("perl Makefile.PL; make; make install");
368
#	system("perl Makefile.PL; make; make install");
362
	print "\nDone\n\n\n";
369
#	print "\nDone\n\n\n";
363
	chdir($Pwd);
370
	chdir($Pwd);
364
371
365
372
Lines 398-406 Link Here
398
	system("$compiler -o pwcheck pwcheck.c");
405
	system("$compiler -o pwcheck pwcheck.c");
399
	print "Creating xfer_to_vocp setuid wrapper\n";
406
	print "Creating xfer_to_vocp setuid wrapper\n";
400
	system("$compiler -o xfer_to_vocp xfer_to_vocp.c");
407
	system("$compiler -o xfer_to_vocp xfer_to_vocp.c");
401
	my $haveTTS = 'n';
408
#	my $haveTTS = 'n';
402
	print "\nDo you wish to use Text-to-speech (to hear emails, etc.) AND do you have the Festival TTS engine installed [$haveTTS]: ";
409
#	print "\nDo you wish to use Text-to-speech (to hear emails, etc.) AND do you have the Festival TTS engine installed [$haveTTS]: ";
403
	option(\$haveTTS);
410
#	option(\$haveTTS);
411
	my $haveTTS = 'y';
412
	if ( $ENV{'VOCP_HAVE_TTS'} ne 'y' ) {
413
		$haveTTS = 'n';
414
	}
404
415
405
	if ($haveTTS =~ m|^\s*[yY]|)
416
	if ($haveTTS =~ m|^\s*[yY]|)
406
	{
417
	{
Lines 408-417 Link Here
408
		my $festDir;
419
		my $festDir;
409
		do 
420
		do 
410
		{
421
		{
411
			print "Under which directory can Festival's bin/text2wave program be \nfound (enter full path up to bin/text2wave): ";
422
#			print "Under which directory can Festival's bin/text2wave program be \nfound (enter full path up to bin/text2wave): ";
412
			option(\$festDir);
423
#			option(\$festDir);
413
			chomp($festDir);
424
#			chomp($festDir);
414
			
425
			
426
			$festDir = '/usr/bin/text2wave';
415
			# Correct if they've entered the full path including the executable
427
			# Correct if they've entered the full path including the executable
416
			if ($festDir =~ m|^(.*)/bin/text2wave$|)
428
			if ($festDir =~ m|^(.*)/bin/text2wave$|)
417
			{
429
			{
Lines 504-520 Link Here
504
	}
516
	}
505
517
506
		
518
		
507
	option(\$VOCP_group);
519
#	option(\$VOCP_group);
508
	
520
	if ( $ENV{'VOCP_GROUP'} ne '' ) {
509
	while (! -x $Groupadd)
521
		$VOCP_group = $ENV{'VOCP_GROUP'};
510
	{
522
	}
511
		print "\nWhat is the full path of the groupadd program on your system?\n"
523
#	
512
			. "[$Groupadd]: ";
524
#	while (! -x $Groupadd)
513
		option(\$Groupadd);
525
#	{
514
	}
526
#		print "\nWhat is the full path of the groupadd program on your system?\n"
515
	
527
#			. "[$Groupadd]: ";
516
	print "\nCreating group and setting permissions on boxes.conf and messages.pl...\n";
528
#		option(\$Groupadd);
517
	system("$Groupadd $VOCP_group");
529
#	}
530
#	
531
#	print "\nCreating group and setting permissions on boxes.conf and messages.pl...\n";
532
#	system("$Groupadd $VOCP_group");
518
		
533
		
519
534
520
	# Do a little work on permissions
535
	# Do a little work on permissions
Lines 562-572 Link Here
562
	my ($pvftormd, $found);
577
	my ($pvftormd, $found);
563
	do {
578
	do {
564
		# locate pvftormd
579
		# locate pvftormd
565
		my $pvftoolsdir = '/usr/local/bin';
580
		my $pvftoolsdir = '/usr/bin';
566
		print "Where is the pvftormd executable (included "
581
#		print "Where is the pvftormd executable (included "
567
		     ."with mgetty) installed on your system\n"
582
#		     ."with mgetty) installed on your system\n"
568
		     ."[$pvftoolsdir]: ";
583
#		     ."[$pvftoolsdir]: ";
569
		option(\$pvftoolsdir);
584
#		option(\$pvftoolsdir);
570
		$pvftormd = $pvftoolsdir . '/pvftormd';
585
		$pvftormd = $pvftoolsdir . '/pvftormd';
571
		if (-x $pvftormd) {
586
		if (-x $pvftormd) {
572
			print "\n";
587
			print "\n";
Lines 580-593 Link Here
580
	} until ($found);
595
	} until ($found);
581
	
596
	
582
	my $pvftormdopt = 'Lucent 5';
597
	my $pvftormdopt = 'Lucent 5';
598
599
	if ( $ENV{'PVF_FORMAT'} ne '' ) {
600
		$pvftormdopt = $ENV{'PVF_FORMAT'};
601
	}
583
	
602
	
584
	print "\nListed above are the supported modems and "
603
#	print "\nListed above are the supported modems and "
585
	      ."compression types.  You should already know which "
604
#	      ."compression types.  You should already know which "
586
	      ."of these apply to your modem (if not see the "
605
#	      ."of these apply to your modem (if not see the "
587
	      ."documentation included on vgetty or the website). "
606
#	      ."documentation included on vgetty or the website). "
588
	      ."Please enter the options that apply to your modem, "
607
#	      ."Please enter the options that apply to your modem, "
589
	      ."for example, $pvftormdopt\n[$pvftormdopt]: ";
608
#	      ."for example, $pvftormdopt\n[$pvftormdopt]: ";
590
	option(\$pvftormdopt);
609
#	option(\$pvftormdopt);
591
	
610
	
592
	print "\nConverting sound files, this can take a while...\n";
611
	print "\nConverting sound files, this can take a while...\n";
593
	
612
	

Return to bug 38163