Skip to content

Commit

Permalink
creatensis: build installed.db for osgeo4w-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 8, 2013
1 parent e522a20 commit 15efd23
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions ms-windows/osgeo4w/creatensis.pl
Expand Up @@ -164,17 +164,28 @@ sub getDeps {
my $taropt = "v" x $verbose;

unless(-d $unpacked ) {
mkdir $unpacked, 0755;
mkdir "$unpacked", 0755;
mkdir "$unpacked/bin", 0755;
mkdir "$unpacked/etc", 0755;
mkdir "$unpacked/etc/setup", 0755;

foreach my $p ( keys %pkgs ) {
$p = $file{$p};
# Create package database
open O, ">$unpacked/etc/setup/installed.db";
print O "INSTALLED.DB 2\n";

foreach my $pn ( keys %pkgs ) {
$p = $file{$pn};
$p =~ s#^.*/#$packages/#;

print O "$pn $p 0\n";

print "Unpacking $p...\n" if $verbose;
system "tar $taropt -C $unpacked -xjf $p";
system "tar $taropt -C $unpacked -xjvf $p | gzip -c >$unpacked/etc/setup/$pn.lst.gz";
die "unpacking of $p failed" if $?;
}

close O;

chdir $unpacked;

mkdir "bin", 0755;
Expand Down

0 comments on commit 15efd23

Please sign in to comment.