summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2003-01-16 23:34:24 +0000
committerHerb Lewis <herb@samba.org>2003-01-16 23:34:24 +0000
commit03d6b8400bbee59277a7054016a09722ed80952a (patch)
tree3198c47e8e576519004d05b38b9cecd80b51ef53 /packaging
parent2ff1d60bdc8e3635db0dc90482d0d2f9db653e9d (diff)
downloadsamba-03d6b8400bbee59277a7054016a09722ed80952a.tar.gz
samba-03d6b8400bbee59277a7054016a09722ed80952a.tar.bz2
samba-03d6b8400bbee59277a7054016a09722ed80952a.zip
update for 3.0
(This used to be commit 8b2d19eeaa59c709315062df6d68cf16b2905054)
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/SGI/idb.pl156
1 files changed, 72 insertions, 84 deletions
diff --git a/packaging/SGI/idb.pl b/packaging/SGI/idb.pl
index ddbad80356..1da0c95a32 100755
--- a/packaging/SGI/idb.pl
+++ b/packaging/SGI/idb.pl
@@ -35,73 +35,37 @@ close IGNORES;
# get the names of all the binary files to be installed
open(MAKEFILE,"$SRCDIR/source/Makefile") || die "Unable to open Makefile\n";
-@makefile = <MAKEFILE>;
-@winbind_progs = grep(/^WINBIND_PROGS /,@makefile);
-@winbind_sprogs = grep(/^WINBIND_SPROGS /,@makefile);
-@winbind_lprogs = grep(/^WINBIND_LPROGS /,@makefile);
-@winbind_pam_progs = grep(/^WINBIND_PAM_PROGS /,@makefile);
-@sprogs = grep(/^SPROGS /,@makefile);
-@progs1 = grep(/^PROGS1 /,@makefile);
-@progs2 = grep(/^PROGS2 /,@makefile);
-@mprogs = grep(/^MPROGS /,@makefile);
-@progs = grep(/^PROGS /,@makefile);
-@scripts = grep(/^SCRIPTS /,@makefile);
-@codepagelist = grep(/^CODEPAGELIST/,@makefile);
+while (not eof(MAKEFILE)) {
+ $_ = <MAKEFILE>;
+ chomp;
+ last if /^# object file lists/ ;
+ if (/^EXEEXT/) {
+ /^.*=(.*)/;
+ $EXEEXT = $1;
+ }
+ if (/^srcdir/) {
+ /^.*=(.*)/;
+ $srcdir = $1;
+ }
+ if (/^builddir/) {
+ /^.*=(.*)/;
+ $builddir = $1;
+ }
+ if (/^SBIN_PROGS/) { @sbinprogs = get_line($_); }
+ if (/^BIN_PROGS1/) { @binprogs1 = get_line($_); }
+ if (/^BIN_PROGS2/) { @binprogs2 = get_line($_); }
+ if (/^BIN_PROGS3/) { @binprogs3 = get_line($_); }
+ if (/^BIN_PROGS/) { @binprogs = get_line($_); }
+ if (/^SCRIPTS/) { @scripts = get_line($_); }
+ if (/^TORTURE_PROGS/) { @tortureprogs = get_line($_); }
+ if (/^SHLIBS/) { @shlibs = get_line($_); }
+}
close MAKEFILE;
-if (@winbind_progs) {
- @winbind_progs[0] =~ s/^.*\=//;
- @winbind_progs = split(' ',@winbind_progs[0]);
-}
-if (@winbind_sprogs) {
- @winbind_sprogs[0] =~ s/^.*\=//;
- @winbind_sprogs = split(' ',@winbind_sprogs[0]);
-}
-if (@winbind_lprogs) {
- @winbind_lprogs[0] =~ s/^.*\=//;
- @winbind_lprogs = split(' ',@winbind_lprogs[0]);
-}
-if (@winbind_pam_progs) {
- @winbind_pam_progs[0] =~ s/^.*\=//;
- @winbind_pam_progs = split(' ',@winbind_pam_progs[0]);
-}
-if (@sprogs) {
- @sprogs[0] =~ s/^.*\=//;
- @sprogs[0] =~ s/\$\(\S+\)\s//g;
- @sprogs = split(' ',@sprogs[0]);
-}
-if (@progs) {
- @progs[0] =~ s/^.*\=//;
- @progs[0] =~ s/\$\(\S+\)\s//g;
- @progs = split(' ',@progs[0]);
-}
-if (@mprogs) {
- @mprogs[0] =~ s/^.*\=//;
- @mprogs = split(' ',@mprogs[0]);
-}
-if (@progs1) {
- @progs1[0] =~ s/^.*\=//;
- @progs1 = split(' ',@progs1[0]);
-}
-if (@progs2) {
- @progs2[0] =~ s/^.*\=//;
- @progs2 = split(' ',@progs2[0]);
-}
-if (@scripts) {
- @scripts[0] =~ s/^.*\=//;
- @scripts[0] =~ s/\$\(srcdir\)\///g;
- @scripts = split(' ',@scripts[0]);
-}
+# add my local files to the list of binaries to install
+@bins = sort byfilename (@sbinprogs,@binprogs,@binprogs1,@binprogs2,@binprogs3,@scripts,("sambalp","smbprint"));
-# we need to create codepages for the package
-@codepagelist[0] =~ s/^.*\=//;
-chdir "$SRCDIR/source";
-system("chmod +x ./script/installcp.sh");
-system("./script/installcp.sh . . ../packaging/SGI/codepages ./bin @codepagelist[0]");
-chdir $curdir;
-opendir(DIR,"$SRCDIR/packaging/SGI/codepages") || die "Can't open codepages directory";
-@codepage = sort readdir(DIR);
-closedir(DIR);
+@nsswitch = sort byfilename (@shlibs);
# install the swat files
chdir "$SRCDIR/source";
@@ -110,11 +74,6 @@ system("./script/installswat.sh ../packaging/SGI/swat ./ ../packaging/SGI/swat/
system("cp -f ../swat/README ../packaging/SGI/swat");
chdir $curdir;
-# add my local files to the list of binaries to install
-@bins = sort byfilename (@sprogs,@progs,@progs1,@progs2,@mprogs,@scripts,@winbind_progs,@winbind_sprogs,("/findsmb","/sambalp","/smbprint"));
-
-@nsswitch = sort byfilename (@winbind_lprogs,@winbind_pam_progs);
-
# get a complete list of all files in the tree
chdir "$SRCDIR/";
&dodir('.');
@@ -122,10 +81,12 @@ chdir $curdir;
# the files installed in docs include all the original files in docs plus all
# the "*.doc" files from the source tree
-@docs = sort byfilename grep (!/^docs\/$/ & (/^source\/.*\.doc$/ | /^docs\//),@allfiles);
-@docs = grep(!/htmldocs\/using_samba/, @docs);
+@docs = sort bynextdir grep (!/CVS/ & (/^source\/.*\.doc$/ | /^docs\/\w/),@allfiles);
+@docs = grep(!/htmldocs/ & !/manpages/, @docs);
@docs = grep(!/docbook/, @docs);
+@libfiles = sort byfilename (grep (/^source\/codepages\/\w/,@allfiles),("packaging/SGI/smb.conf","source/bin/libsmbclient.a","source/bin/libsmbclient.so"));
+
@swatfiles = sort grep(/^packaging\/SGI\/swat/, @allfiles);
@catman = sort grep(/^packaging\/SGI\/catman/ & !/\/$/, @allfiles);
@catman = sort bydirnum @catman;
@@ -147,10 +108,10 @@ print IDB "l 0000 root sys etc/rc2.d/S82winbind $SRCPFX/packaging/SGI $PKG.sw.ba
if ($PKG eq "samba_irix") {
print IDB "d 0755 root sys usr/relnotes/samba_irix $SRCPFX/packaging/SGI $PKG.man.relnotes\n";
- print IDB "f 0644 root sys usr/relnotes/samba_irix/TC build/TC $PKG.man.relnotes\n";
- print IDB "f 0644 root sys usr/relnotes/samba_irix/ch1.z build/ch1.z $PKG.man.relnotes\n";
- print IDB "f 0644 root sys usr/relnotes/samba_irix/ch2.z build/ch2.z $PKG.man.relnotes\n";
- print IDB "f 0644 root sys usr/relnotes/samba_irix/ch3.z build/ch3.z $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba_irix/TC relnotes/TC $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba_irix/ch1.z relnotes/ch1.z $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba_irix/ch2.z relnotes/ch2.z $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba_irix/ch3.z relnotes/ch3.z $PKG.man.relnotes\n";
}
else {
@copyfile = grep (/^COPY/,@allfiles);
@@ -207,7 +168,6 @@ while(@bins) {
print IDB "d 0755 root sys usr/samba/docs $SRCPFX/docs $PKG.man.doc\n";
while (@docs) {
$nextfile = shift @docs;
- next if ($nextfile eq "CVS");
($junk,$file) = split(/\//,$nextfile,2);
if (grep(/\/$/,$nextfile)) {
$file =~ s/\/$//;
@@ -223,14 +183,15 @@ print IDB "d 0755 root sys usr/samba/include $SRCPFX/packaging/SGI $PKG.sw.base\
print IDB "f 0644 root sys usr/samba/include/libsmbclient.h $SRCPFX/source/include/libsmbclient.h $PKG.sw.base\n";
print IDB "d 0755 root sys usr/samba/lib $SRCPFX/packaging/SGI $PKG.sw.base\n";
-print IDB "d 0755 root sys usr/samba/lib/codepages $SRCPFX/packaging/SGI $PKG.sw.base\n";
-while (@codepage) {
- $nextpage = shift @codepage;
- print IDB "f 0644 root sys usr/samba/lib/codepages/$nextpage $SRCPFX/packaging/SGI/codepages/$nextpage $PKG.sw.base nostrip \n";
+while (@libfiles) {
+ $nextfile = shift @libfiles;
+ ($file = $nextfile) =~ s/.*\///;
+ if ($file eq "smb.conf") {
+ print IDB "f 0644 root sys usr/samba/lib/$file $SRCPFX/$nextfile $PKG.sw.base config(suggest)\n";
+ } else {
+ print IDB "f 0644 root sys usr/samba/lib/$file $SRCPFX/$nextfile $PKG.sw.base nostrip \n";
+ }
}
-print IDB "f 0644 root sys usr/samba/lib/libsmbclient.a $SRCPFX/source/bin/libsmbclient.a $PKG.sw.base\n";
-print IDB "f 0644 root sys usr/samba/lib/libsmbclient.so $SRCPFX/source/bin/libsmbclient.so $PKG.sw.base\n";
-print IDB "f 0644 root sys usr/samba/lib/smb.conf $SRCPFX/packaging/SGI/smb.conf $PKG.sw.base config(suggest)\n";
print IDB "d 0755 lp sys usr/samba/printer $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0755 lp sys usr/samba/printer/W32ALPHA $SRCPFX/packaging/SGI $PKG.sw.base\n";
@@ -365,12 +326,20 @@ sub dodir {
}
}
-sub byfilename {
+sub bynextdir {
($f0,$f1) = split(/\//,$a,2);
($f0,$f2) = split(/\//,$b,2);
$f1 cmp $f2;
}
+sub byfilename {
+ ($f0,$f1) = split(/.*\//,$a,2);
+ if ($f1 eq "") { $f1 = $f0 };
+ ($f0,$f2) = split(/.*\//,$b,2);
+ if ($f2 eq "") { $f2 = $f0 };
+ $f1 cmp $f2;
+}
+
sub bydirnum {
($f1 = $a) =~ s/^.*\///;
($f2 = $b) =~ s/^.*\///;
@@ -390,3 +359,22 @@ sub idbsort {
$f3 cmp $f4;
}
+sub get_line {
+ local ($line) = @_;
+
+ $line =~ s/^.*=//;
+ while (($cont = index($line,"\\")) > 0) {
+ $_ = <MAKEFILE>;
+ chomp;
+ s/^\s*/ /;
+ substr($line,$cont,1,$_);
+ }
+ $line =~ s/\$\(EXEEXT\)/$EXEEXT/g;
+ $line =~ s/\$\(srcdir\)/$srcdir/g;
+ $line =~ s/\$\(builddir\)/$builddir/g;
+ $line =~ s/\$\(\S*\)\s*//g;
+ $line =~ s/\s\s*/ /g;
+ @line = split(' ',$line);
+ return @line;
+}
+