329
347
foreach $l (@loglines) {
330
348
$changelog .= $l;
332
$changelog .= "\n -- Norbert Preining <preining\@logic.at> $date\n\n";
350
$changelog .= "\n -- Norbert Preining <preining\@debian.org> $date\n\n";
336
354
if ($l =~ m/^version ([^-]*)-(\S*) (\S*) (.*)$/) {
337
355
if ($version ne "" || $extraversion ne "") {
338
if ($version eq "") {
356
if ($version eq "") {
363
if ($changelogversion eq "") {
364
$changelogversion = $version;
365
$changelogextraversion = $extraversion;
366
$changelogrevision = $revision;
368
$changelog .= "$package ($version$extraversion-$revision) $distribution; urgency=low\n\n";
369
foreach $l (@loglines) {
372
$changelog .= "\n -- Norbert Preining <preining\@debian.org> $date\n\n";
342
378
$distribution = $3;
345
if ($changelogversion eq "") {
346
$changelogversion = $version;
347
$changelogextraversion = $extraversion;
348
$changelogrevision = $revision;
350
$changelog .= "$package ($version$extraversion-$revision) $distribution; urgency=low\n\n";
351
foreach $l (@loglines) {
354
$changelog .= "\n -- Norbert Preining <preining\@logic.at> $date\n\n";
366
384
if ($l =~ m/^..\...\...../) {
367
if ($version eq "") {
368
# we have a first entry without a preceding version, make
369
# extraversion entry!
370
$extraversion = `date +"%y%m%d"`;
371
chomp($extraversion);
372
$extraversion = "ts$extraversion";
385
if ($version eq "") {
386
# we have a first entry without a preceding version, make
387
# extraversion entry!
388
$extraversion = `date +"%y%m%d"`;
389
chomp($extraversion);
390
$extraversion = "ts$extraversion";
374
392
push @loglines, " $l";
759
815
myopen(CONTROL,">$destfname") || die("Cannot open $destfname!\n");
760
816
print CONTROL "Source: $package\n";
761
print CONTROL "Section: tex\n";
762
print CONTROL "Priority: optional\n";
763
print CONTROL 'Maintainer: Debian TeX Maintainers <debian-tex-maint@lists.debian.org>'."\n";
764
print CONTROL 'Uploaders: Norbert Preining <preining@logic.at>', "\n";
817
print CONTROL "Section: ",
818
defined($Section{$package}) ? "$Section{$package}" : "$AllSection",
820
print CONTROL "Priority: ",
821
defined($Priority{$package}) ? "$Priority{$package}" : "$AllPriority",
823
print CONTROL "Maintainer: ",
824
defined($Maintainer{$package}) ? "$Maintainer{$package}" : "$AllMaintainer",
826
print CONTROL "Uploaders: ",
827
defined($Uploaders{$package}) ? "$Uploaders{$package}" : "$AllUploaders",
765
829
if (defined($BuildDep{$package})) {
766
830
print CONTROL "Build-Depends: $BuildDep{$package}\n";
768
832
if (defined($BuildDepIndep{$package})) {
769
833
print CONTROL "Build-Depends-Indep: $BuildDepIndep{$package}\n";
771
print CONTROL "Standards-Version: 3.7.2\n";
835
print CONTROL "Standards-Version: ",
836
defined($Standards{$package}) ? "$Standards{$package}" : "$AllStandards",
773
839
# now start the individual packages
776
842
foreach $pkg (@{$SourcePackages{$package}}) {
777
843
my %lists = %{&get_all_files($pkg,$globalreclevel)};
778
844
my $title = $TeXLive{$pkg}{'title'};
779
if (defined($Title{$pkg})) {
780
$title = $Title{$pkg};
845
if (defined($Title{$pkg})) {
846
$title = $Title{$pkg};
782
848
my @lop = @{$TeXLive{$pkg}{'includedpackages'}};
783
849
my $description = $TeXLive{$pkg}{'description'};
784
if (defined($Description{$pkg})) {
785
$description = $Description{$pkg};
850
if (defined($Description{$pkg})) {
851
$description = $Description{$pkg};
787
853
print CONTROL "\nPackage: $pkg\n";
788
854
print CONTROL "Architecture: $arch\n";
789
my @AllDepends = @{$TeXLive{$pkg}{'depends'}};
855
my @AllDepends = @{$TeXLive{$pkg}{'depends'}};
790
856
if ($arch eq "any") {
791
857
push (@AllDepends, '${shlibs:Depends}');
794
@AllConflicts = @{$TeXLive{$pkg}{'conflicts'}};
795
# if we do *not* have a *unversioned* conflict with tetex, we make
796
# various texlive packages optionally depend on tetex:
797
# so we have to replace
798
# texlive-base -> texlive-base | tetex-base
799
# texlive-latex-base -> texlive-latex-base | tetex-base
800
if (!unversioned_tetex_conflict(@AllConflicts)) {
802
foreach $d (@AllDepends) {
803
if ($d =~ m/^texlive-base$/) {
804
$o = "texlive-base | tetex-base";
805
} elsif ($d =~ m/^texlive-latex-base$/) {
806
$o = "texlive-latex-base | tetex-base";
812
@AllDepends = @newdep;
814
print CONTROL "Depends: ";
815
makeuniq(\@AllDepends);
816
print CONTROL join(", ",@AllDepends), "\n";
817
$opt_debug && print "\nDependencies for $package: ", join(", ",@AllDepends), "\n";
821
if ($#AllConflicts >= 0) {
822
makeuniq(\@AllConflicts);
823
print CONTROL "Conflicts: ", join(", ", @AllConflicts), "\n";
828
my @AllRecommends = @{$TeXLive{$pkg}{'recommends'}};
829
if ($#AllRecommends >= 0) {
830
makeuniq(\@AllRecommends);
831
print CONTROL "Recommends: ", join(", ", @AllRecommends), "\n";
836
my @AllSuggests = @{$TeXLive{$pkg}{'suggests'}};
837
if ($#AllSuggests >= 0) {
838
makeuniq(\@AllSuggests);
839
print CONTROL "Suggests: ", join(", ", @AllSuggests), "\n";
844
my @AllReplaces = @{$TeXLive{$pkg}{'replaces'}};
845
if ($#AllReplaces >= 0) {
846
makeuniq(\@AllReplaces);
847
print CONTROL "Replaces: ", join(", ", @AllReplaces), "\n";
850
# Provides of virtual packages
852
if ($pkg eq "texlive-base-bin") {
853
print CONTROL "Provides: dvipdfm\n";
855
if ($pkg eq "texlive-extra-utils") {
856
print CONTROL "Provides: cweb, ctie, texdoctk\n";
860
@AllConflicts = @{$TeXLive{$pkg}{'conflicts'}};
861
# if we do *not* have a *unversioned* conflict with tetex, we make
862
# various texlive packages optionally depend on tetex:
863
# so we have to replace
864
# texlive-base -> texlive-base | tetex-bin
865
# texlive-latex-base -> texlive-latex-base | tetex-bin
866
if (!unversioned_tetex_conflict(@AllConflicts)) {
868
foreach $d (@AllDepends) {
869
if ($d =~ m/^texlive-base$/) {
870
$o = "texlive-base | tetex-bin";
871
} elsif ($d =~ m/^texlive-latex-base$/) {
872
$o = "texlive-latex-base | tetex-bin";
878
@AllDepends = @newdep;
880
print CONTROL "Depends: ";
881
makeuniq(\@AllDepends);
882
print CONTROL join(", ",@AllDepends), "\n";
883
$opt_debug && print "\nDependencies for $package: ", join(", ",@AllDepends), "\n";
887
if ($#AllConflicts >= 0) {
888
makeuniq(\@AllConflicts);
889
print CONTROL "Conflicts: ", join(", ", @AllConflicts), "\n";
894
my @AllRecommends = @{$TeXLive{$pkg}{'recommends'}};
895
if ($#AllRecommends >= 0) {
896
makeuniq(\@AllRecommends);
897
print CONTROL "Recommends: ", join(", ", @AllRecommends), "\n";
902
my @AllProvides = @{$TeXLive{$pkg}{'provides'}};
903
if ($#AllProvides >= 0) {
904
makeuniq(\@AllProvides);
905
print CONTROL "Provides: ", join(", ", @AllProvides), "\n";
910
my @AllSuggests = @{$TeXLive{$pkg}{'suggests'}};
911
if ($#AllSuggests >= 0) {
912
makeuniq(\@AllSuggests);
913
print CONTROL "Suggests: ", join(", ", @AllSuggests), "\n";
918
my @AllReplaces = @{$TeXLive{$pkg}{'replaces'}};
919
if ($#AllReplaces >= 0) {
920
makeuniq(\@AllReplaces);
921
print CONTROL "Replaces: ", join(", ", @AllReplaces), "\n";
858
924
print CONTROL "Description: TeX Live: $title\n";
860
926
@deslines = split(/\n/, $description);
862
928
foreach $l (@deslines) {
863
929
if ($l =~ m/^\s*$/) {
864
if ($firstline) { $firstline = 0; next; }
865
print CONTROL " .\n";
867
#$shortl = shortenline($l);
868
#print CONTROL " $shortl\n";
930
if ($firstline) { $firstline = 0; next; }
931
print CONTROL " .\n";
933
#$shortl = shortenline($l);
934
#print CONTROL " $shortl\n";
874
940
foreach $p (@lop) {
875
941
$subtype = $TeXLive{$p}{'type'};
876
if (($subtype eq "Package") || ($subtype eq "Documentation")) {
942
if (($subtype eq "Package") || ($subtype eq "Documentation")) {
883
949
print CONTROL " .\n This package includes the following CTAN packages:\n";
884
950
foreach $p (@foo) {
885
$tit = $TeXLive{$p}{'title'};
886
if (defined($Title{$p})) {
890
# add an extra space at the beginning to have a real list
891
$shortl = " $p -- $tit";
951
$tit = $TeXLive{$p}{'title'};
952
if (defined($Title{$p})) {
956
# add an extra space at the beginning to have a real list
957
$shortl = " $p -- $tit";
921
987
$foo="\$etcdest = \"$sysetcdest\""; eval $foo;
922
988
$opt_debug && print "\nProcess $package\n";
923
989
if ($opt_debug) {
924
print "debdest = $debdest\n";
925
print "basedir = $basedir\n";
926
print "bindest = $bindest\n";
927
print "rundest = $rundest\n";
928
print "docdest = $docdest\n";
929
print "etcdest = $etcdest\n";
990
print "debdest = $debdest\n";
991
print "basedir = $basedir\n";
992
print "bindest = $bindest\n";
993
print "rundest = $rundest\n";
994
print "docdest = $docdest\n";
995
print "etcdest = $etcdest\n";
931
997
my %lists = %{&get_all_files($package,$globalreclevel)};
932
998
my $title = $TeXLive{$package}{'title'};
933
999
my $description = $TeXLive{$package}{'description'};
934
1000
eval { mkpath($rundest) };
936
die "Couldn't create $dir: $@";
1002
die "Couldn't create $dir: $@";
938
1004
if ($opt_debug) {
939
1005
print "SOURCEFILES: ", @{$lists{'SourceFiles'}}, "\n";