pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/texlive2pkg



Module Name:    pkgsrc
Committed By:   markd
Date:           Tue Aug 27 06:21:18 UTC 2019

Modified Files:
        pkgsrc/pkgtools/texlive2pkg: Makefile
        pkgsrc/pkgtools/texlive2pkg/files: texlive2pkg.8 texlive2pkg.sh

Log Message:
texlive2pkg: update to 1.7

add option to derive doc tarball path from the base package path.
allow tarball path to be a url.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/pkgtools/texlive2pkg/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.8
cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/texlive2pkg/Makefile
diff -u pkgsrc/pkgtools/texlive2pkg/Makefile:1.10 pkgsrc/pkgtools/texlive2pkg/Makefile:1.11
--- pkgsrc/pkgtools/texlive2pkg/Makefile:1.10   Mon Aug 12 08:35:14 2019
+++ pkgsrc/pkgtools/texlive2pkg/Makefile        Tue Aug 27 06:21:18 2019
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2019/08/12 08:35:14 markd Exp $
+# $NetBSD: Makefile,v 1.11 2019/08/27 06:21:18 markd Exp $
 #
 
-PKGNAME=       texlive2pkg-1.6
+PKGNAME=       texlive2pkg-1.7
 CATEGORIES=    pkgtools
 
 MAINTAINER=    markd%NetBSD.org@localhost
@@ -12,7 +12,7 @@ LICENSE=      modified-bsd
 WRKSRC=                        ${WRKDIR}
 NO_BUILD=              yes
 USE_LANGUAGES=         # none
-USE_TOOLS+=            perl:run xzcat:run
+USE_TOOLS+=            ftp:run perl:run xzcat:run
 AUTO_MKDIRS=           yes
 
 SUBST_CLASSES+=                tools
@@ -20,6 +20,7 @@ SUBST_STAGE.tools=    pre-configure
 SUBST_MESSAGE.tools=   Substituting tool locations.
 SUBST_FILES.tools=     texlive2pkg.sh
 SUBST_VARS.tools=      DISTDIR MAKE PREFIX
+SUBST_SED.tools=       -e 's,@FTP@,${TOOLS_PATH.ftp},g'
 
 REPLACE_PERL+=         texlive.pkg texlive.pkg.doc
 

Index: pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.8
diff -u pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.8:1.2 pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.8:1.3
--- pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.8:1.2 Sun Jan 24 19:45:30 2016
+++ pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.8     Tue Aug 27 06:21:18 2019
@@ -1,4 +1,4 @@
-.\"    $NetBSD: texlive2pkg.8,v 1.2 2016/01/24 19:45:30 wiz Exp $
+.\"    $NetBSD: texlive2pkg.8,v 1.3 2019/08/27 06:21:18 markd Exp $
 .\"
 .\" Copyright (c) 2016
 .\"    Mark Davies.  All rights reserved.
@@ -36,6 +36,7 @@
 .Nd create a pkgsrc package for a texlive package
 .Sh SYNOPSIS
 .Nm
+.Op Fl d
 .Ar package-tarball
 .Op Ar doc-tarball
 .Sh DESCRIPTION
@@ -57,13 +58,19 @@ has finished its job.
 .Nm
 is intended to help the process of creating a package but is not
 intended to fly on autopilot.
+.Sh OPTIONS
+The following command-line options are supported:
+.Bl -tag -width indent
+.It Fl d
+Derive the doc-tarball path from the package-tarball 
+by replacing the .tar.xz with .doc.tar.xz.
 .Sh EXAMPLES
 Use the following commands to create a
 .Xr pkgsrc 7
 package for the texlive package
 .Ar foo :
 .Dl cd pkgsrc/print
-.Dl texlive2pkg foo.tar.xz foo.doc.tar.xz
+.Dl texlive2pkg -d foo.tar.xz
 Remember to test the resulting package.
 .Sh SEE ALSO
 .Xr pkgsrc 7

Index: pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.sh
diff -u pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.sh:1.1 pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.sh:1.2
--- pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.sh:1.1        Sun Jan 24 19:34:44 2016
+++ pkgsrc/pkgtools/texlive2pkg/files/texlive2pkg.sh    Tue Aug 27 06:21:18 2019
@@ -1,6 +1,6 @@
 #!/bin/sh
 # texlive2pkg
-# $NetBSD: texlive2pkg.sh,v 1.1 2016/01/24 19:34:44 markd Exp $
+# $NetBSD: texlive2pkg.sh,v 1.2 2019/08/27 06:21:18 markd Exp $
 #
 # Copyright (c) 2016
 #       Mark Davies.  All rights reserved.
@@ -37,32 +37,37 @@ TDIR=/tmp/tl.$$
 DISTDIR=@DISTDIR@
 LIBEXECDIR=@PREFIX@/libexec/texlive2pkg
 MAKE=@MAKE@
+FTP=@FTP@
 pkgtarball=""
 doctarball=""
-
-USAGE="${NAME} package-tarball [doc-tarball] -- create a texlive package for pkgsrc"
+dodoc=0
+pkgurl=0
+docurl=0
+
+USAGE="${NAME} [-d] package-tarball [doc-tarball] -- create a texlive package for pkgsrc"
+
+if [ "$1" = "-d" ]; then
+  dodoc=1
+  shift
+fi
 
 if [ ${#} -eq 1 ]; then
   pkgtarball=$1
+  if [ $dodoc -eq 1 ]; then
+    doctarball=${pkgtarball%%.tar.xz}.doc.tar.xz
+  fi
 elif [ ${#} -eq 2 ]; then
   pkgtarball=$1
   doctarball=$2
-  case $doctarball in
-  /*.doc.tar.xz)
-     break ;;
-  *.doc.tar.xz)
-     doctarball=$PWD/$doctarball
-     break ;;
-  *)
-     echo ${USAGE}
-     exit 1
-  esac
 else
   echo ${USAGE}
   exit 1
 fi
 
 case $pkgtarball in
+file:/*.tar.xz | ftp:/*.tar.xz | http:/*.tar.xz | https:/*.tar.xz )
+   pkgurl=1
+   break ;;
 /*.tar.xz)
    break ;;
 *.tar.xz)
@@ -73,15 +78,42 @@ case $pkgtarball in
    exit 1
 esac
 
+case "$doctarball" in
+"")
+   break ;;
+file:/*.doc.tar.xz | ftp:/*.tar.xz | http:/*.doc.tar.xz | https:/*.doc.tar.xz )
+   docurl=1
+   break ;;
+/*.doc.tar.xz)
+   break ;;  
+*.doc.tar.xz)
+   doctarball=$PWD/$doctarball
+   break ;;
+*)
+   echo ${USAGE}
+   exit 1
+esac
+
+mkdir $TDIR
+
+if [ $pkgurl -eq 1 ]; then
+  (cd $TDIR; $FTP $pkgtarball )
+  pkgtarball=$TDIR/`basename $pkgtarball`
+fi
+if [ $docurl -eq 1 ]; then
+  (cd $TDIR; $FTP $doctarball )
+  doctarball=$TDIR/`basename $doctarball`
+fi
+
 if [ ! -f $pkgtarball ]; then
   echo "File not found - $pkgtarball"
   exit 1
 fi
 
-(mkdir $TDIR; cd $TDIR ; xzcat $pkgtarball | tar xf - tlpkg)
+(cd $TDIR ; xzcat $pkgtarball | tar xf - tlpkg)
 eval `$LIBEXECDIR/texlive.pkg $TDIR/tlpkg/tlpobj/*.tlpobj`
 mkdir -p $DISTDIR/tex-$PKG-$REV
-cp $* $DISTDIR/tex-$PKG-$REV/
+cp $pkgtarball $doctarball $DISTDIR/tex-$PKG-$REV/
 (cd tex-$PKG; $MAKE makesum)
 if [ -f "$doctarball" ]; then
    (cd $TDIR; xzcat $doctarball | tar xf - tlpkg)



Home | Main Index | Thread Index | Old Index