Skip to content

Commit 506f17a

Browse files
author
Michael Dickey
committed
Tab -> Spaces global conversion
Updated copyright headers
1 parent 86fafd5 commit 506f17a

File tree

94 files changed

+14673
-14683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+14673
-14683
lines changed

NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
For recent updates, see http://www.pion.org
1+
For recent updates, see https://github.com/cloudmeter/pion

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Build and installation summary:
1616
# ./autogen.sh (only required if using a git clone)
1717
# ./configure (run ./configure --help to see available options)
1818
# make all (this will build everything except the unit tests)
19-
# make check (this will build and run the unit tests)
19+
# make check (this will build and run the unit tests)
2020
# make docs (this will build the Doxygen source documentation)
2121
# make install (this may require superuser/Administrator privileges)
2222

TODO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
See http://trac.atomiclabs.com
1+
See https://github.com/cloudmeter/pion

build/common.pl

100755100644
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,45 @@
1212

1313
# recursively copies an entire directory tree, excluding anything that starts with a dot
1414
sub copyDirWithoutDotFiles(@) {
15-
my $src_dir = shift();
16-
my $dst_dir = shift();
17-
my %templates = @_;
18-
19-
# make sure directory exists
20-
mkpath($dst_dir);
15+
my $src_dir = shift();
16+
my $dst_dir = shift();
17+
my %templates = @_;
18+
19+
# make sure directory exists
20+
mkpath($dst_dir);
2121

22-
# get list of files in source directory
23-
opendir(DIR, $src_dir);
24-
my @files = readdir(DIR);
25-
closedir(DIR);
22+
# get list of files in source directory
23+
opendir(DIR, $src_dir);
24+
my @files = readdir(DIR);
25+
closedir(DIR);
2626

27-
# iterate through source files
28-
foreach (@files) {
29-
if ( ! /^\./ ) {
30-
my $src_file = File::Spec->catfile($src_dir, $_);
31-
my $dst_file = File::Spec->catfile($dst_dir, $_);
32-
if (-d $src_file) {
33-
copyDirWithoutDotFiles($src_file, $dst_file, %templates);
34-
} elsif ( scalar keys %templates == 0 ) {
35-
# no templates specified -> just copy the file as-is
36-
copy($src_file, $dst_file);
37-
} else {
38-
# template parameters were specified
39-
# process key->value parameters while copying the file
40-
# WARNING: this probably only works for text files
41-
open(FROMFILE, $src_file) or die "could not open source template ($src_file)";
42-
open(TOFILE, ">", $dst_file) or die "could not open $dst_file for writing";
43-
while ( <FROMFILE> ) {
44-
while ( ($key, $value) = each %templates ) {
45-
s,\@$key\@,$value,;
46-
}
47-
print TOFILE $_;
48-
}
49-
close(FROMFILE);
50-
close(TOFILE);
51-
}
52-
}
53-
}
27+
# iterate through source files
28+
foreach (@files) {
29+
if ( ! /^\./ ) {
30+
my $src_file = File::Spec->catfile($src_dir, $_);
31+
my $dst_file = File::Spec->catfile($dst_dir, $_);
32+
if (-d $src_file) {
33+
copyDirWithoutDotFiles($src_file, $dst_file, %templates);
34+
} elsif ( scalar keys %templates == 0 ) {
35+
# no templates specified -> just copy the file as-is
36+
copy($src_file, $dst_file);
37+
} else {
38+
# template parameters were specified
39+
# process key->value parameters while copying the file
40+
# WARNING: this probably only works for text files
41+
open(FROMFILE, $src_file) or die "could not open source template ($src_file)";
42+
open(TOFILE, ">", $dst_file) or die "could not open $dst_file for writing";
43+
while ( <FROMFILE> ) {
44+
while ( ($key, $value) = each %templates ) {
45+
s,\@$key\@,$value,;
46+
}
47+
print TOFILE $_;
48+
}
49+
close(FROMFILE);
50+
close(TOFILE);
51+
}
52+
}
53+
}
5454
}
5555

5656
1;

build/make_config.pl

100755100644
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,28 @@
3333

3434
# build template parameter hash (start with default values)
3535
my %templates = ("PION_PLUGINS_DIRECTORY" => "../../platform/codecs/.libs/</PluginPath><PluginPath>../../platform/databases/.libs/</PluginPath><PluginPath>../../platform/reactors/.libs</PluginPath><PluginPath>../../platform/protocols/.libs/</PluginPath><PluginPath>../../platform/services/.libs/</PluginPath><PluginPath>../../net/services/.libs/",
36-
"PION_DATA_DIRECTORY" => ".",
37-
"PION_UI_DIRECTORY" => "../../platform/ui",
38-
"PION_LOG_CONFIG" => "logconfig.txt",
39-
"PION_CONFIG_CHANGE_LOG" => "config.log");
36+
"PION_DATA_DIRECTORY" => ".",
37+
"PION_UI_DIRECTORY" => "../../platform/ui",
38+
"PION_LOG_CONFIG" => "logconfig.txt",
39+
"PION_CONFIG_CHANGE_LOG" => "config.log");
4040

4141
# update template parameter hash using values provided
4242
my $do_merge = 0;
4343
for ($n = 2; $n <= $#ARGV; ++$n) {
44-
die "Bad template argument: \"$ARGV[$n]\"" if (! ($ARGV[$n] =~ m/([^=]+)=(.*)/) );
45-
if ($1 eq "MERGE") {
46-
$do_merge = 1
47-
} else {
48-
$templates{$1} = $2;
49-
}
44+
die "Bad template argument: \"$ARGV[$n]\"" if (! ($ARGV[$n] =~ m/([^=]+)=(.*)/) );
45+
if ($1 eq "MERGE") {
46+
$do_merge = 1
47+
} else {
48+
$templates{$1} = $2;
49+
}
5050
}
5151

5252
# clear out old files and directories at destination
5353
if (not $do_merge) {
54-
@oldfiles = bsd_glob($DESTDIR . "/*");
55-
foreach (@oldfiles) {
56-
rmtree($_);
57-
}
54+
@oldfiles = bsd_glob($DESTDIR . "/*");
55+
foreach (@oldfiles) {
56+
rmtree($_);
57+
}
5858
}
5959

6060
# copy files using templates

build/make_rpm.pl

100755100644
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# check command line parameters
2121
die("usage: make_rpm.pl <VERSION> <RELEASE.ARCH> [--nostrip]")
22-
if ($#ARGV < 1 || $#ARGV > 2 || ($#ARGV == 2 && $ARGV[2] ne "--nostrip"));
22+
if ($#ARGV < 1 || $#ARGV > 2 || ($#ARGV == 2 && $ARGV[2] ne "--nostrip"));
2323

2424
# must be run as root
2525
die("This script must be run as root!") if $>!=0;
@@ -30,16 +30,16 @@
3030

3131
# check for --nostrip option
3232
if ($ARGV[2] eq "--nostrip") {
33-
$INSTALL_BIN = 'install';
34-
$SPEC_OPTIONS = '%define __os_install_post %{nil}';
33+
$INSTALL_BIN = 'install';
34+
$SPEC_OPTIONS = '%define __os_install_post %{nil}';
3535
} else {
36-
$INSTALL_BIN = 'install -s';
37-
$SPEC_OPTIONS = '';
36+
$INSTALL_BIN = 'install -s';
37+
$SPEC_OPTIONS = '';
3838
}
3939

4040
# check validity of RELEASE parameter
4141
die("Second parameter must be format <RELEASE.ARCH> (i.e. \"1.el5\")")
42-
if ($RELEASE !~ m/^\d+\..+$/);
42+
if ($RELEASE !~ m/^\d+\..+$/);
4343

4444
# find binary directory
4545
$BIN_DIR = "bin";
@@ -50,11 +50,11 @@
5050
die("error: unable to find binary directory") if ($#PACKAGES != 0);
5151
$EDITION = $PACKAGE_BASE = $PACKAGE_DIR = $PACKAGES[0];
5252
if ( $PACKAGE_DIR =~ m/.*pion-[a-z]+-.*/ ) {
53-
$PACKAGE_BASE =~ s/.*(pion-[a-z]+)-.*/$1/;
54-
$EDITION =~ s/.*pion-([a-z]+)-.*/$1/;
53+
$PACKAGE_BASE =~ s/.*(pion-[a-z]+)-.*/$1/;
54+
$EDITION =~ s/.*pion-([a-z]+)-.*/$1/;
5555
} else {
56-
$PACKAGE_BASE =~ s/.*(pion)-.*/$1/;
57-
$EDITION = "";
56+
$PACKAGE_BASE =~ s/.*(pion)-.*/$1/;
57+
$EDITION = "";
5858
}
5959
$BIN_SRC_BASE = $PACKAGE_BASE . "-" . $VERSION . "-" . $RELEASE;
6060
$BIN_SRC_DIR = "$BUILD_DIR/$BIN_SRC_BASE";
@@ -81,15 +81,15 @@
8181

8282
# prepare some vars for spec file
8383
if ($EDITION eq "core") {
84-
$spec_license = "GPL";
85-
$config_file_glob = "*.{xml,txt,pem}";
86-
$install_perl_scripts = "";
87-
$extra_config_files = "";
84+
$spec_license = "GPL";
85+
$config_file_glob = "*.{xml,txt,pem}";
86+
$install_perl_scripts = "";
87+
$extra_config_files = "";
8888
} else {
89-
$spec_license = "commercial";
90-
$config_file_glob = "*.{xml,txt,pem}";
91-
$install_perl_scripts = "install -m 660 $BIN_SRC_DIR/config/*.pl \$RPM_BUILD_ROOT/var/lib/pion";
92-
$extra_config_files = "\%config /etc/pion/SearchEngines.xml\n\%config(noreplace) /etc/pion/ReplayQueries.xml\n\%config(noreplace) /etc/pion/robots.xml";
89+
$spec_license = "commercial";
90+
$config_file_glob = "*.{xml,txt,pem}";
91+
$install_perl_scripts = "install -m 660 $BIN_SRC_DIR/config/*.pl \$RPM_BUILD_ROOT/var/lib/pion";
92+
$extra_config_files = "\%config /etc/pion/SearchEngines.xml\n\%config(noreplace) /etc/pion/ReplayQueries.xml\n\%config(noreplace) /etc/pion/robots.xml";
9393
}
9494
$SPEC_POST="/sbin/ldconfig";
9595
$SPEC_POSTUN="/sbin/ldconfig";
@@ -221,14 +221,14 @@
221221

222222
# output library file names
223223
foreach $_ (@spec_libs) {
224-
s[$LIBS_DIR][/usr/lib];
225-
print SPEC_FILE $_ . "\n";
224+
s[$LIBS_DIR][/usr/lib];
225+
print SPEC_FILE $_ . "\n";
226226
}
227227

228228
# output purge scripts (if any)
229229
foreach $_ (@purge_scripts) {
230-
s[$CONFIG_DIR][/var/lib/pion];
231-
print SPEC_FILE $_ . "\n";
230+
s[$CONFIG_DIR][/var/lib/pion];
231+
print SPEC_FILE $_ . "\n";
232232
}
233233

234234

@@ -241,25 +241,25 @@
241241
`rm -rf $BIN_SRC_DIR`;
242242
copyDirWithoutDotFiles($PACKAGE_DIR, $BIN_SRC_DIR);
243243
if ($EDITION eq "core") {
244-
copyDirWithoutDotFiles("platform/build/rpm", $BIN_SRC_DIR);
244+
copyDirWithoutDotFiles("platform/build/rpm", $BIN_SRC_DIR);
245245
} else {
246-
# find the pion-core directory
247-
$_ = getcwd();
248-
if (/pion-[^-]+-/) {
249-
s,/$,,;
250-
s,\\$,,;
251-
s,pion-[^-]+-(.*),pion-core-$1,;
252-
if (-d $_) {
253-
$PION_PLATFORM_DIR = $_;
254-
} else {
255-
$PION_PLATFORM_DIR = File::Spec->catdir( ("..", "pion-core") );
256-
}
257-
} else {
258-
$PION_PLATFORM_DIR = File::Spec->catdir( ("..", "pion-core") );
259-
}
260-
die("Could not find pion-core directory: $PION_CORE_DIR") if (! -d $PION_PLATFORM_DIR);
261-
copyDirWithoutDotFiles($PION_PLATFORM_DIR . "/platform/build/rpm", $BIN_SRC_DIR);
262-
copyDirWithoutDotFiles("enterprise/build/rpm", $BIN_SRC_DIR);
246+
# find the pion-core directory
247+
$_ = getcwd();
248+
if (/pion-[^-]+-/) {
249+
s,/$,,;
250+
s,\\$,,;
251+
s,pion-[^-]+-(.*),pion-core-$1,;
252+
if (-d $_) {
253+
$PION_PLATFORM_DIR = $_;
254+
} else {
255+
$PION_PLATFORM_DIR = File::Spec->catdir( ("..", "pion-core") );
256+
}
257+
} else {
258+
$PION_PLATFORM_DIR = File::Spec->catdir( ("..", "pion-core") );
259+
}
260+
die("Could not find pion-core directory: $PION_CORE_DIR") if (! -d $PION_PLATFORM_DIR);
261+
copyDirWithoutDotFiles($PION_PLATFORM_DIR . "/platform/build/rpm", $BIN_SRC_DIR);
262+
copyDirWithoutDotFiles("enterprise/build/rpm", $BIN_SRC_DIR);
263263
}
264264

265265

0 commit comments

Comments
 (0)