X-Git-Url: http://git.samba.org/?p=samba.git;a=blobdiff_plain;f=packaging%2FSGI%2Fidb.pl;h=7eea09d8d551665a0b8052ef290b140cdf9d9078;hp=c4a03c817bfcd7617baf2f67c2692577faf462e9;hb=4adb00e41abbbaf6eaa014e6a599cb2c8b77d7da;hpb=b7e1265f106010e03d92575f4578162ec659994b diff --git a/packaging/SGI/idb.pl b/packaging/SGI/idb.pl index c4a03c817bf..7eea09d8d55 100755 --- a/packaging/SGI/idb.pl +++ b/packaging/SGI/idb.pl @@ -1,7 +1,9 @@ #!/usr/bin/perl +require "pwd.pl" || die "Required pwd.pl not found"; # This perl script automatically generates the samba.idb file +&initpwd; $curdir = $ENV{"PWD"}; # get a complete list of all files in the tree @@ -29,36 +31,31 @@ close MAKEFILE; if (@sprogs) { @sprogs[0] =~ s/^.*\=//; - @sprogs[0] =~ s/^.*\)//; @sprogs = split(' ',@sprogs[0]); } if (@progs) { @progs[0] =~ s/^.*\=//; - @progs[0] =~ s/^.*\)//; @progs = split(' ',@progs[0]); } if (@progs1) { @progs1[0] =~ s/^.*\=//; - @progs1[0] =~ s/^.*\)//; @progs1 = split(' ',@progs1[0]); } if (@scripts) { @scripts[0] =~ s/^.*\=//; - @scripts[0] =~ s/^.*\)//; @scripts = split(' ',@scripts[0]); } if (@codepage) { @codepage[0] =~ s/^.*\=//; - @codepage[0] =~ s/^.*\)//; chdir '../../source'; # if we have codepages we need to create them for the package - system("./installcp.sh . ../packaging/SGI/codepage . @codepage[0]"); + system("./installcp.sh . ../packaging/SGI/codepages . @codepage[0]"); chdir $curdir; @codepage = sort split(' ',@codepage[0]); } # add my local files to the list of binaries to install -@bins = sort (@sprogs,@progs,@progs1,@scripts,("psfixes.pl","sambalp","smbprint")); +@bins = sort (@sprogs,@progs,@progs1,@scripts,("findsmb","sambalp","smbprint")); # the files installed in docs include all the original files in docs plus all # the "*.doc" files from the source tree @@ -69,7 +66,7 @@ if (@codepage) { # strip out all the generated directories and the "*.o" files from the source # release -@allfiles = grep(!/^.*\.o$/ & !/^packaging\/SGI\/bins/ & !/^packaging\/SGI\/catman/ & !/^packaging\/SGI\/html/ & !/^packaging\/SGI\/codepage/, @allfiles); +@allfiles = grep(!/^.*\.o$/ & !/^packaging\/SGI\/bins/ & !/^packaging\/SGI\/catman/ & !/^packaging\/SGI\/html/ & !/^packaging\/SGI\/codepages/, @allfiles); open(IDB,">samba.idb") || die "Unable to open samba.idb for output\n"; @@ -90,20 +87,23 @@ print IDB "f 0444 root sys usr/samba/README packaging/SGI/README samba.sw.base\n print IDB "d 0755 root sys usr/samba/bin packaging/SGI samba.sw.base\n"; while(@bins) { $nextfile = shift @bins; - if ($nextfile eq "smbpasswd") { - print IDB "f 4555 root sys usr/samba/bin/$nextfile source/$nextfile samba.sw.base\n"; - } - elsif ($nextfile eq "psfixes.pl") { - print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n"; - } - elsif ($nextfile eq "sambalp") { - print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n"; - } - elsif ($nextfile eq "smbprint") { - print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n"; - } - else { - print IDB "f 0755 root sys usr/samba/bin/$nextfile source/$nextfile samba.sw.base\n"; + + if (index($nextfile,'$')) { + if ($nextfile eq "smbpasswd") { + print IDB "f 4555 root sys usr/samba/bin/$nextfile source/$nextfile samba.sw.base\n"; + } + elsif ($nextfile eq "findsmb") { + print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n"; + } + elsif ($nextfile eq "sambalp") { + print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n"; + } + elsif ($nextfile eq "smbprint") { + print IDB "f 0755 root sys usr/samba/bin/$nextfile packaging/SGI/$nextfile samba.sw.base\n"; + } + else { + print IDB "f 0755 root sys usr/samba/bin/$nextfile source/$nextfile samba.sw.base\n"; + } } } @@ -125,10 +125,10 @@ while (@docs) { print IDB "f 0755 root sys usr/samba/inetd.sh packaging/SGI/inetd.sh samba.sw.base\n"; print IDB "d 0755 root sys usr/samba/lib packaging/SGI samba.sw.base\n"; if (@codepage) { - print IDB "d 0755 root sys usr/samba/lib/codepage packaging/SGI samba.sw.base\n"; + print IDB "d 0755 root sys usr/samba/lib/codepages packaging/SGI samba.sw.base\n"; while (@codepage) { $nextpage = shift @codepage; - print IDB "f 0644 root sys usr/samba/lib/codepage/codepage.$nextpage packaging/SGI/codepage/codepage.$nextpage samba.sw.base\n"; + print IDB "f 0644 root sys usr/samba/lib/codepages/codepage.$nextpage packaging/SGI/codepages/codepage.$nextpage samba.sw.base\n"; } } print IDB "f 0644 root sys usr/samba/lib/smb.conf packaging/SGI/smb.conf samba.sw.base config(update)\n"; @@ -146,7 +146,7 @@ while (@allfiles) { print IDB "d 0755 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n"; } else { - if (grep(/SGI/ & (/\.sh$/ | /\.pl$/ | /mkman$/),$nextfile)) { + if (grep((/\.sh$/ | /\.pl$/ | /mkman$/),$nextfile)) { print IDB "f 0755 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n"; } else {