This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libtime-olsontz-data-perl.

commit baf8678749a00314ac1c78757ba41c3c55b6a55b
Author: gregor herrmann <gre...@debian.org>
Date:   Sun Jun 1 23:20:09 2014 +0200

    very preliminary support for building from tzdata
    
    - debian/patches/prebuild-standalone: hackish changes to prebuild
      so that it runs from the tzdata source package / without the perl
      distribution stuff
    - debian/NOTES. some, well, notes. probably not very understandable but
      better to have them in git than only on my harddisk
    
    Git-Dch: Ignore
---
 debian/NOTES                       | 32 ++++++++++++++++++++++
 debian/patches/prebuild-standalone | 55 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series              |  1 +
 3 files changed, 88 insertions(+)

diff --git a/debian/NOTES b/debian/NOTES
new file mode 100644
index 0000000..f3d8974
--- /dev/null
+++ b/debian/NOTES
@@ -0,0 +1,32 @@
+./prebuild
+after bare: only ./lib/Time/OlsonTZ/Data.pm.tpl
+after download: ./tzsrc.meta
+after build_data meta: ./lib/Time/OlsonTZ/Data.pm
+                       ./lib/Time/OlsonTZ/Data/country_selection.tzp
+
+ship ./prebuild and ./lib/Time/OlsonTZ/Data.pm.tpl in 
libtime-olsontz-data-perl-src
+(tests as well?)
+run ./prebuild with whatever options in tzdata source package
+ship created ./lib/Time/OlsonTZ/Data.pm and 
./lib/Time/OlsonTZ/Data/country_selection.tzp in tzdata binary package
+(patched Data.pm to read /usr/share/zoneinfo/*)
+in a libtime-olsontz-data-perl binary package
+
+ideas:
+- (ti:) runtime instead of build time?
+- (gr:) rewrite prebuild to minimum
+- (ti:) postinst?
+
+
+for tzdata source pkg:
+
+clean:
+       $(RM) -rv perl
+
+build:
+       mkdir -p perl/lib/Time/OlsonTZ/
+       cp /usr/share/<pkg>/Data.pm.tpl perl/lib/Time/OlsonTZ/
+       cd perl
+       /usr/share/<pkg>/prebuild get_olson local ../ 2014a
+       /usr/share/<pkg>/prebuild build_data meta
+
+.install
diff --git a/debian/patches/prebuild-standalone 
b/debian/patches/prebuild-standalone
new file mode 100644
index 0000000..dc325d0
--- /dev/null
+++ b/debian/patches/prebuild-standalone
@@ -0,0 +1,55 @@
+--- a/prebuild
++++ b/prebuild
+@@ -23,7 +23,7 @@
+       lib/Time/OlsonTZ/Data.pm.tpl
+ )) {
+       unless(-f "$target_dir/$_") {
+-              die "bad target directory: $target_dir/$_ not available\n";
++              warn "bad target directory: $target_dir/$_ not available\n";
+       }
+ }
+ 
+@@ -43,6 +43,7 @@
+ sub write_file($$) {
+       my($fn, $content) = @_;
+       (my $dir = $fn) =~ s#/[^/]*\z##;
++      return unless $fn;
+       mkpath($dir);
+       my $tfn = "$fn.new$$";
+       clean_file($tfn);
+@@ -217,9 +218,10 @@
+               wanted => sub {
+                       return unless -f $_;
+                       unless(m#\A$dldir/([^/]+)\z#) {
+-                              die "downloaded file $_ in unexpected place\n";
++                              warn "downloaded file $_ in unexpected place\n";
+                       }
+                       my $lname = $1;
++                      return unless $lname;
+                       if(m#/tz(?:code|data)\.tar\.(?:Z|gz)\z#) {
+                               # Is download tarball; not a source file.
+                               return;
+@@ -239,7 +241,7 @@
+                               return;
+                       }
+                       write_file("$tdir/$lname", $content);
+-                      push @files, $lname;
++                      push @files, $lname if -f "$tdir/$lname";
+               },
+       }, $dldir);
+       rename($tdir, "$target_dir/tzsrc")
+@@ -345,10 +347,10 @@
+       if(exists $type{meta}) {
+               expand_template($dl, "lib/Time/OlsonTZ/Data.pm");
+               generate_country_selection($dl);
+-              expand_manifest([
+-                      (map { "tzsrc/$_" } @{$tzsrc_meta->{files}}),
+-                      (map { tzfile_name($_) } keys %{$dl->canonical_names}),
+-              ]);
++#             expand_manifest([
++#                     (map { "tzsrc/$_" } @{$tzsrc_meta->{files}}),
++#                     (map { tzfile_name($_) } keys %{$dl->canonical_names}),
++#             ]);
+       }
+       if(exists $type{tzfiles}) {
+               my $dl_tzfile_dir = $dl->zoneinfo_dir;
diff --git a/debian/patches/series b/debian/patches/series
index 6fe710e..e1c2b3c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 tzdata.patch
+prebuild-standalone

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libtime-olsontz-data-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to