File: Makefile.PL

package info (click to toggle)
libtfbs-perl 0.6.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,608 kB
  • ctags: 725
  • sloc: perl: 6,980; ansic: 699; makefile: 557; sh: 9
file content (148 lines) | stat: -rw-r--r-- 3,761 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
require 5.006;
use ExtUtils::MakeMaker;


my $NAME     = 'TFBS';
my $DISTNAME = "TFBS";
my $VERSION  = "0.5.0";

get_sql_data();

WriteMakefile(
	      NAME	  => $NAME,
	      DISTNAME    => $DISTNAME,
	      VERSION     => $VERSION,
	      'dist'      => {  COMPRESS     => 'gzip -9f',
				SUFFIX       => '.gz', 
				DIST_DEFAULT => 'all tardist',
			    },

	      );

sub get_sql_data  {
    my $ans = "abc";
    do {
	print "Do you have write access to a MySQL database server? [n] ";
	$ans=<STDIN>; chomp $ans;
    } until $ans =~ /^y|n/i or $ans eq "";

    if (uc(substr($ans,0,1)) eq 'Y')  {
	print "\nOK, tell me more about it.\n\n";
	print "\tHost name : [localhost] ";	
	my $hostname = <STDIN>; chomp $hostname;
	$hostname = 'localhost' unless $hostname;

	print "\tUsername  : [none]     ";
	my $username = <STDIN>; chomp $username;
	$username = '' unless $username;
	
	print "\tPassword  : [none]     ";
	my $password = <STDIN>; chomp $password;
	$password = '' unless password;

	open FILE, ">t/MYSQLCONNECT" 
	    or die "Can't write to t/ directory, stopped";
	print FILE join("::", $hostname, $username, $password, " ");
	close FILE;
    }
    else {
	unlink "t/MYSQLCONNECT" if -e "t/MYSQLCONNECT";
    }
}

BEGIN {
    my $fail = 0;
    unless (eval "use  Bio::Root::RootI;1") {
	$fail = 1;
	print qq!

	-------------------------------------------------
		            WARNING
	-------------------------------------------------

	 Bioperl does not seem to be installed.

         Bioperl 1.0 or newer is unconditionally required by TFBS.

	 Please install Bioperl BEFORE proceeding with 
	 TFBS installation. Go to http://bioperl.org for 
	 information on how to obtain and install it.

	-------------------------------------------------

	 !;
    }

    unless (eval "use PDL; 1") {
	$fail = 1;
	print qq!

	-------------------------------------------------
		            WARNING
	-------------------------------------------------

	 PDL (Perl Data Language) does not seem to be 
	 installed.

         PDL is unconditionally required by TFBS.

	 Please install PDL BEFORE proceeding with 
	 TFBS installation. Go to http://pdl.perl.org for 
	 information on how to obtain and install it.

         NOTE FOR LINUX USERS: PDL binary packages 
	 (.rpm, .deb) are included in all major Linux 
	 distributions and repositories. Unless you are an 
	 advanced Linux user, it is recommended that you 
	 install PDL from one of these packages, 
	 or from CPAN command line.
        
	-------------------------------------------------

	 !;
    }
    unless (eval "use File::Temp; 1") {
	$fail = 1;
	print qq!

	-------------------------------------------------
		            WARNING
	-------------------------------------------------

	 File::Temp package does not seem to be installed.

         File::Temp is unconditionally required by TFBS.

	 Please install File::Temp BEFORE proceeding with 
	 TFBS installation. The package is available from
	 CPAN (http://cpan.perl.org/).

	-------------------------------------------------

	 !;
    }
    if ($fail) {
	print STDERR "TFBS installation aborted.\n";
	print STDERR "Please install one or more missing modules before proceeding\n\n";
	exit(0);
    }
    unless (eval "use GD; 1") {
	# do not fail
	print qq!

	-------------------------------------------------
		            WARNING
	-------------------------------------------------
         GD.pm does not seem to be installed.

         GD is reqired to produce "sequence logos" from 
	 information content matrices. If you need this 
	 functionality, please visit 
	 http://stein.cshl.org/WWW/software/GD/ 
         for information on obtaining and installing GD.
        -------------------------------------------------

!;
    }
    
};