[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#380227: Suggestions for texlive packaging (was: Bug#380227: texlive-bin: Why is the source in a tar.bz archive?)



Norbert Preining <preining@logic.at> wrote:

> On Fre, 29 Sep 2006, Frank Küster wrote:
>> The same applies for some other suggestions with respect to texlive
>> packaging that I have in mind, but not yet found time to write them
>> down. 
>
> Please take your time and write it down...

Okay, here we go.

>From a Perl point of view, the tpm2deb.pl script is fun to work with, at
least for me who's not a guru.  It's cleanly written, with functions
that exactly do what they are made for, etc.

However, I think it's not so good from a collective maintenance point of
view:  There are two many pieces of information, or strings that end up
somewhere in the debian/ directory, cluttered throughout the script.  It
would be much better to separate all this out to either a configuration
file, or to separate files.  

As an example for "to a configuration file", take this patch that I
prepared long ago, but never submitted (and that is probably outdated):

@@ -29,6 +30,18 @@
 # please see the README file in the pkg-texlive svn repository of the
 # debian-tex project on alioth.debian.org
 
+# configuration items for all texlive packages
+my $debsection    = "Section: tex\n";
+my $debpriority   = "Priority: optional\n";
+my $debmaintainer = 'Maintainer: Debian TeX Maintainers <debian-tex-maint@lists.debian.org>'."\n";
+my $debuploaders  = 'Uploaders: Norbert Preining <preining@logic.at>', "\n";
+my $debstandardsversion = "Standards-Version: 3.7.2\n";
+
+# and special ones for some
+my $base_bin_provides = "Provides: dvipdfm\n";
+my $extra_utils_provides = "Provides: cweb, ctie, texdoctk\n";
+my $ctanlist_heading = " .\n This package includes the following CTAN packages:\n";
+
 BEGIN {   # get our other local perl modules.
 	($mydir = $0) =~ s,/[^/]*$,,;
 	if ($mydir eq $0) { $mydir = `pwd` ; chomp($mydir); }
@@ -766,17 +779,17 @@
 	local $foo;
 	myopen(CONTROL,">$destfname") || die("Cannot open $destfname!\n");
 	print CONTROL "Source: $package\n";
-	print CONTROL "Section: tex\n";
-	print CONTROL "Priority: optional\n";
-	print CONTROL 'Maintainer: Debian TeX Maintainers <debian-tex-maint@lists.debian.org>'."\n";
-	print CONTROL 'Uploaders: Norbert Preining <preining@debian.org>', "\n";
+	print CONTROL $debsection ;
+	print CONTROL $debpriority ;
+	print CONTROL $debmaintainer ;
+	print CONTROL $debuploaders ;
 	if (defined($BuildDep{$package})) {
 		print CONTROL "Build-Depends: $BuildDep{$package}\n";
 	}
 	if (defined($BuildDepIndep{$package})) {
 		print CONTROL "Build-Depends-Indep: $BuildDepIndep{$package}\n";
 	}
-	print CONTROL "Standards-Version: 3.7.2\n";
+	print CONTROL $debstandardsversion;
 	#
 	# now start the individual packages
 	#
@@ -858,47 +871,47 @@
...

taking this out into a separate configfile is the next step.  A good
example for an external file is the function create_rules_file which
contains lots of 

print RULES <<EOP
...Makefile snippet...
EOF

This would also be better in separate files:  You can more easily find
and change it, without caring for the Perl inside.  Heck, even the
Python people could happily provide patches ;-).

With proper names for the configuration variables and separate files,
much of the "we should really document this" would already be resolved. 

That is how far I got...

Regards, Frank
-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Reply to: