Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37893825
en ru br
Репозитории ALT

Группа :: Разработка/Прочее
Пакет: ctanify

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: alt-ctanify-1.0-add-tdsoutdir-option.patch
Скачать


From 3680253bbf35e5188decbbe6a39a7d305b4e7a3d Mon Sep 17 00:00:00 2001
From: Kirill Maslinsky <kirill@altlinux.org>
Date: Sun, 17 May 2009 23:31:51 +0400
Subject: [PATCH] ctanify: added -o (--tdsoutdir) option
    Create package TDS tree in the directory, specified with
    --tdsoutdir option, do not create CTAN package (tarball).
    This option is intended for use when the main function required
    is mapping between CTAN source files and TDS hierarchy.
    This is a more general use of ctanify where it can serve
    in a process of creating TEXMF tree parts from CTAN sources,
    somewhat similar to `make install` step.
Signed-off-by: Kirill Maslinsky <kirill@altlinux.org>
---
 ctanify |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/ctanify b/ctanify
index 5550ade..1234673 100644
--- a/ctanify
+++ b/ctanify
@@ -35,6 +35,7 @@ my $tdsdir = "";               # Absolute directory of the TDS tree
 my $pkgdir = "";               # Absolute directory of the package directory
 my $zipname;                   # Name of the TDS zip file
 my $tarname;                   # Name of the package tar file
+my $tdsoutdir;                 # Directory name where to output TDS tree
 my $usagestr = "Usage: ${progname} [--help] [--version] [--pkgname=<package>] [--[no]auto] [--[no]skip] [--[no]unixify] [--tdsonly=<filespec> ...] filename[=<dirname>] ...\n";
 
 # Associate file extensions with TDS directories.  "%s" is replaced
@@ -133,6 +134,7 @@ GetOptions("p|pkgname=s" => \$pkgname,
            "u|unixify!"  => \$unixify,       # Not documented; best not to use
            "t|tdsonly=s" => \@tdsonly,
            "a|auto!"     => \$autoinclude,
+           "o|tdsoutdir=s" => \$tdsoutdir,
            "V|version"   => \$wantversion,
            "h|help"      => \$wanthelp)
     || pod2usage(-verbose => 0,
@@ -227,7 +229,12 @@ foreach my $fname (@manifest) {
 
 # Create a working directory and populate it with TDS files.
 my $workdir = tempdir("$progname-XXXXXX", TMPDIR => 1, CLEANUP => 1);
-$tdsdir = "$workdir/texmf";
+if ($tdsoutdir) {
+    $tdsdir = $tdsoutdir;
+}
+else {
+    $tdsdir = "$workdir/texmf";
+}
 mkdir $tdsdir || die "${progname}: Failed to create $tdsdir ($!)\n";
 foreach my $fname (@manifest) {
     # Create a TDS subdirectory.
@@ -269,6 +276,8 @@ if (@bad_docs) {
     my $bad_docs = join ", ", @bad_docs;
     warn "${progname}: CTAN prefers having only PDF documentation (re: $bad_docs)\n";
 }
+# if tdsoutdir given, we don't need to proceed with CTAN packaging
+if (!$tdsoutdir) {
 
 # Store a listing of the TDS directory.
 my $prevdir = getcwd();
@@ -297,7 +306,7 @@ rmdir $tdsdir || die "${progname}: Failed to remove $tdsdir ($!)\n";
 $pkgdir = "$workdir/$pkgname";
 mkdir $pkgdir || die "${progname}: Failed to create $pkgdir ($!)\n";
 my %tdsonly = map {($_ => 1)} @tdsonly;
-foreach my $fname (@manifest) {
+foreach my $fname(@manifest) {
     my $relname = File::Spec->abs2rel($fname);
     next if defined $tdsonly{$relname};
     my ($namepart, $pathpart, $suffixpart) = fileparse($relname);
@@ -339,7 +348,7 @@ if ($zipname ne "") {
     }
 }
 print "\n";
-
+}
 ###########################################################################
 
 __END__
@@ -357,6 +366,7 @@ ctanify
 [B<--tdsonly>=I<filespec> ...]
 [B<-->[B<no>]B<unixify>]
 [B<-->[B<no>]B<skip>]
+[B<--tdsoutdir>]
 I<filespec>[=I<dirname>] ...
 
 ctanify
@@ -382,7 +392,7 @@ Live distribution.
 
 B<ctanify> accepts the following command-line options:
 
-=over 4
+=over 5
 
 =item B<-h>, B<--help>
 
@@ -404,6 +414,10 @@ produces.
 Do not automatically add files to the tarball.  Normally, B<ctanify>
 automatically includes all files mentioned in a F<.ins> file.
 
+=item B<-o> I<path>, B<--tdsoutdir>=I<path>
+
+Make package TDS tree in the specified directory, do not create CTAN tarball.
+
 =item B<-t> I<filespec>, B<--tdsonly>=I<filespec>
 
 Specify a subset of the files named on the command line to include
@@ -591,3 +605,11 @@ L<http://www.latex-project.org/lppl.txt>
 
 and S<version 1.3> or later is part of all distributions of LaTeX
 version 2005/12/01 or later.
+
+=head1 MODIFICATION NOTICE
+
+This file is modified for ALT Linux Sisyphus by Kirill Maslinsky
+I<kirill@altlinux.org>, 2009.
+
+Option -o (--tdsoutdir) was added to make use of ctanify in the task
+of arranging CTAN package sources into a TEXMF tree.
-- 
1.6.1.3.GIT
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin