]> git.deb.at Git - pkg/mmv.git/commitdiff
Imported Debian patch 1.01b-12 debian/1.01b-12
authorBernd Eckenfels <ecki@debian.org>
Tue, 20 Nov 2001 18:03:24 +0000 (19:03 +0100)
committerAxel Beckert <abe@deuxchevaux.org>
Fri, 7 Sep 2012 10:59:52 +0000 (12:59 +0200)
debian/changelog
debian/control
debian/copyright
debian/postinst [new file with mode: 0644]
debian/prerm [new file with mode: 0644]
debian/rules
mmv.1
mmv.c

index 871ff325130ccd08399d8d1f3745a25c880a7c35..04f1fcdeeef8d4fa1bb954d70f4f4c2e0b447fd3 100644 (file)
@@ -1,3 +1,39 @@
+mmv (1.01b-12) unstable; urgency=low
+
+  * LFS support! (not sure if this breaks something :) (Closes: Bug #106822)
+  * support -- as option terminator (Closes: Bug #52417)
+
+ -- Bernd Eckenfels <ecki@debian.org>  Tue, 20 Nov 2001 19:03:24 +0100
+
+mmv (1.01b-11) unstable; urgency=medium
+
+  * added Build-Depends (Closes: Bug #105025)
+  * bumped Standards Version from 3.0.1 to 3.6.5
+  * make strig/-g depending on environemnt variable
+  * added a comment about quoting 'to' patter (Closes: Bug #106076)
+
+ -- Bernd Eckenfels <ecki@debian.org>  Sat, 10 Nov 2001 18:28:56 +0100
+
+mmv (1.01b-10.1) unstable; urgency=LOW
+
+  * reupload cause it was rejected
+
+ -- Bernd Eckenfels <ecki@debian.org>  Thu,  3 Aug 2000 02:38:20 +0200
+
+mmv (1.01b-10) unstable; urgency=LOW
+
+  * debian/rules clean will now kill *~ files
+
+ -- Bernd Eckenfels <ecki@debian.org>  Sun, 23 Jul 2000 04:28:46 +0200
+
+mmv (1.01b-9) unstable; urgency=LOW
+
+  * closes: #67605 (no special handling for char > 127 anymore)
+  * clsoes: #60128 (i think it was fixed by hartmut already)
+  * man page and doc now in /usr/share, new standards version
+
+ -- Bernd Eckenfels <ecki@debian.org>  Sun, 23 Jul 2000 04:08:19 +0200
+
 mmv (1.01b-8.1) unstable; urgency=LOW
 
   * NMU
 mmv (1.01b-8.1) unstable; urgency=LOW
 
   * NMU
index 944e4f4ccc44880d91daa0d716bc847adbdde66d..7260474e4fecaefcae595bbd602d225e8b10f5ce 100644 (file)
@@ -1,8 +1,9 @@
 Source: mmv
 Maintainer: Bernd Eckenfels <ecki@debian.org>
 Section: utils
 Source: mmv
 Maintainer: Bernd Eckenfels <ecki@debian.org>
 Section: utils
+Build-Depends: debhelper
 Priority: optional
 Priority: optional
-Standards-Version: 2.4.0.1
+Standards-Version: 3.5.6
 
 Package: mmv
 Architecture: any
 
 Package: mmv
 Architecture: any
index 148273f723241381caf396b1f6aeb848841c0a82..1bee46cf3654b207752d9b02bcfb4a32666b8500 100644 (file)
@@ -3,6 +3,10 @@ This is the Debian GNU/Linux prepackaged version of mmv.
 This package was put together by Michael Meskes <meskes@debian.org>,
 from sources obtained from USENET.
 
 This package was put together by Michael Meskes <meskes@debian.org>,
 from sources obtained from USENET.
 
+It is now maintained by Bernd Eckenfels <ecki@debian.org> with some
+enhancements (NLS Char Support, glibc compiles) from Bernd and kind
+contributions from Hartmut Koptein <koptein@et-inf.fho-emden.de>.
+
 Copyright (c) 1989 Vladimir Lanin
 
 Mmv is freeware. That means that the entire package of software and
 Copyright (c) 1989 Vladimir Lanin
 
 Mmv is freeware. That means that the entire package of software and
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..cb38ac8
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]; then
+  if [ -d /usr/doc -a ! -e /usr/doc/mmv -a -d /usr/share/doc/mmv ]; then
+    ln -sf ../share/doc/mmv /usr/doc/mmv
+  fi
+fi
diff --git a/debian/prerm b/debian/prerm
new file mode 100644 (file)
index 0000000..206acd8
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/mmv ]; then
+   rm -f /usr/doc/mmv
+fi
index 6f5373c53d55f99ba0d9ba4a1420adaf241c867e..de490b25002e6b2f200e63f9c777a4027a5d1dc7 100755 (executable)
@@ -1,8 +1,20 @@
 #! /usr/bin/make -f
 
 #! /usr/bin/make -f
 
+INSTALL_PROGRAM=install
 CC = gcc
 CC = gcc
-LDFLAGS = -s
-CFLAGS = -O2 -g -Wall
+LDFLAGS =
+CFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -g
+endif
+
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+INSTALL_PROGRAM += -s
+LDFLAGS += -s
+endif
+
 
 # The package
 p = mmv
 
 # The package
 p = mmv
@@ -23,7 +35,7 @@ clean:
 # Undoes the effect of `make -f debian/rules build'.
        $(checkdir)
        -make clean
 # Undoes the effect of `make -f debian/rules build'.
        $(checkdir)
        -make clean
-       -rm -f debian/files* debian/substvars* debian/*~
+       -rm -f debian/files* debian/substvars* debian/*~ core */core *~
        -rm -rf debian/tmp build
 
 binary: binary-arch binary-indep
        -rm -rf debian/tmp build
 
 binary: binary-arch binary-indep
@@ -41,30 +53,32 @@ binary-arch: build
        chmod g-s debian/tmp
        install -d -g root -m 755 -o root debian/tmp/DEBIAN
        install -d -g root -m 755 -o root debian/tmp/usr/bin
        chmod g-s debian/tmp
        install -d -g root -m 755 -o root debian/tmp/DEBIAN
        install -d -g root -m 755 -o root debian/tmp/usr/bin
-       install -d -g root -m 755 -o root debian/tmp/usr/man/man1
-       install -g root -o root -m 755 -s mmv debian/tmp/usr/bin
-       install -g root -o root -m 644 mmv.1 debian/tmp/usr/man/man1
-       gzip -9f debian/tmp/usr/man/man1/mmv.1
+       install -d -g root -m 755 -o root debian/tmp/usr/share/man/man1
+       $(INSTALL_PROGRAM) -g root -o root -m 755 mmv debian/tmp/usr/bin
+       install -g root -o root -m 644 mmv.1 debian/tmp/usr/share/man/man1
+       gzip -9f debian/tmp/usr/share/man/man1/mmv.1
        (cd debian/tmp/usr/bin;\
         ln -s mmv mcp; \
         ln -s mmv mad; \
         ln -s mmv mln;)
        (cd debian/tmp/usr/bin;\
         ln -s mmv mcp; \
         ln -s mmv mad; \
         ln -s mmv mln;)
-       (cd debian/tmp/usr/man/man1;\
+       (cd debian/tmp/usr/share/man/man1;\
         ln -s mmv.1.gz mcp.1.gz; \
         ln -s mmv.1.gz mad.1.gz; \
         ln -s mmv.1.gz mln.1.gz;)
         ln -s mmv.1.gz mcp.1.gz; \
         ln -s mmv.1.gz mad.1.gz; \
         ln -s mmv.1.gz mln.1.gz;)
-       install -d -g root -m 755 -o root debian/tmp/usr/doc/$(p)
+       install -d -g root -m 755 -o root debian/tmp/usr/share/doc/$(p)
        install -g root -m 644 -o root READ.ME \
        install -g root -m 644 -o root READ.ME \
-               debian/tmp/usr/doc/$(p)
+               debian/tmp/usr/share/doc/$(p)
        install -g root -m 644 -o root debian/changelog \
        install -g root -m 644 -o root debian/changelog \
-               debian/tmp/usr/doc/$(p)/changelog.Debian
-       gzip -f9 debian/tmp/usr/doc/$(p)/*
+               debian/tmp/usr/share/doc/$(p)/changelog.Debian
+       gzip -f9 debian/tmp/usr/share/doc/$(p)/*
        install -g root -m 644 -o root debian/copyright \
        install -g root -m 644 -o root debian/copyright \
-         debian/tmp/usr/doc/$(p)
-       chmod -R g-sw debian/tmp/usr/doc/$(p)
-       chown -R root.root debian/tmp/usr/doc/$(p)
+         debian/tmp/usr/share/doc/$(p)
+       install -g root -m 755 -o root debian/postinst debian/prerm \
+               debian/tmp/DEBIAN
+       chmod -R g-sw debian/tmp/usr/share/doc/$(p)
+       chown -R root.root debian/tmp/usr/share/doc/$(p)
        dpkg-shlibdeps debian/tmp/usr/bin/mmv
        dpkg-shlibdeps debian/tmp/usr/bin/mmv
-       dpkg-gencontrol
+       dpkg-gencontrol -isp
        dh_md5sums
        dpkg --build debian/tmp && dpkg-name -o -s .. debian/tmp.deb
 
        dh_md5sums
        dpkg --build debian/tmp && dpkg-name -o -s .. debian/tmp.deb
 
diff --git a/mmv.1 b/mmv.1
index e23c5aed8d5ce5688087719816055c2787aa3139..4c707a3dbb2d975147b0dfe116e7ce96a68be539 100644 (file)
--- a/mmv.1
+++ b/mmv.1
@@ -2,7 +2,7 @@
 .\" To print the MS-DOS version, use option -rO2.
 .\" Under System V, take out the '.\"  ' from the next line.
 .\" .nr O 1
 .\" To print the MS-DOS version, use option -rO2.
 .\" Under System V, take out the '.\"  ' from the next line.
 .\" .nr O 1
-.TH MMV 1 "November 20, 1989 (v1.0)"
+.TH MMV 1 "November 20, 2001 (v1.0lfs)"
 .ie !'\nO'2' \{\
 .SH NAME
 mmv \- move/copy/append/link multiple files by wildcard patterns
 .ie !'\nO'2' \{\
 .SH NAME
 mmv \- move/copy/append/link multiple files by wildcard patterns
@@ -28,6 +28,7 @@ mmv \- move/copy/append multiple files by wildcard patterns
 [\fB-d\fP|\fBp\fP]
 [\fB-g\fP|\fBt\fP]
 [\fB-v\fP|\fBn\fP]
 [\fB-d\fP|\fBp\fP]
 [\fB-g\fP|\fBt\fP]
 [\fB-v\fP|\fBn\fP]
+[\fB--\fP]
 [\fBfrom to\fP]
 .if '\nO'2' \{\
 .br
 [\fBfrom to\fP]
 .if '\nO'2' \{\
 .br
@@ -56,7 +57,8 @@ from the entire set of actions specified
 and gives the user the choice of either
 proceeding by avoiding the offending parts
 or aborting.
 and gives the user the choice of either
 proceeding by avoiding the offending parts
 or aborting.
-
+.I mmv does support large files (LFS) but it does *NOT* support 
+sparse files (i.e. it explodes them).
 .ce
 The Task Options
 .PP
 .ce
 The Task Options
 .PP
@@ -332,8 +334,9 @@ before passing the command-line arguments to
 .IR mmv ,
 it is usually necessary to enclose the command-line
 .I from
 .IR mmv ,
 it is usually necessary to enclose the command-line
 .I from
-pattern
-in quotes.
+and
+.I to
+patterns in quotes.
 \}
 
 .ce
 \}
 
 .ce
diff --git a/mmv.c b/mmv.c
index 8dc9ccbec172d2990119adcd7695f20e2d7d5796..1215984a682712dfc8cd2aebee2b725e0aaeccc6 100644 (file)
--- a/mmv.c
+++ b/mmv.c
@@ -62,7 +62,8 @@ static char USAGE[] =
 %s [-m|x%s|c|o|a|z] [-h] [-d|p] [-g|t] [-v|n] [from to]\n\
 \n\
 Use #N in the ``to'' pattern to get the string matched\n\
 %s [-m|x%s|c|o|a|z] [-h] [-d|p] [-g|t] [-v|n] [from to]\n\
 \n\
 Use #N in the ``to'' pattern to get the string matched\n\
-by the N'th ``from'' pattern wildcard.\n";
+by the N'th ``from'' pattern wildcard.\n\
+Use -- as the end of options.\n";
 
 #define OTHEROPT (_osmajor < 3 ? "" : "|r")
 
 
 #define OTHEROPT (_osmajor < 3 ? "" : "|r")
 
@@ -75,7 +76,9 @@ Use #[l|u]N in the ``to'' pattern to get the [lowercase|uppercase of the]\n\
 string matched by the N'th ``from'' pattern wildcard.\n\
 \n\
 A ``from'' pattern containing wildcards should be quoted when given\n\
 string matched by the N'th ``from'' pattern wildcard.\n\
 \n\
 A ``from'' pattern containing wildcards should be quoted when given\n\
-on the command line.\n";
+on the command line. Also you may need to quote ``to'' pattern.\n\
+\n\
+Use -- as the end of options.\n";
 
 #ifdef IS_SYSV
 #define OTHEROPT ""
 
 #ifdef IS_SYSV
 #define OTHEROPT ""
@@ -577,6 +580,11 @@ static void procargs(argc, argv, pfrompat, ptopat)
        for (argc--, argv++; argc > 0 && **argv == '-'; argc--, argv++)
                for (p = *argv + 1; *p != '\0'; p++) {
                        c = mylower(*p);
        for (argc--, argv++; argc > 0 && **argv == '-'; argc--, argv++)
                for (p = *argv + 1; *p != '\0'; p++) {
                        c = mylower(*p);
+                       if (c == '-') {
+                               argc--;
+                               argv++;
+                               goto endargs;
+                       }
                        if (c == 'v' && !noex)
                                verbose = 1;
                        else if (c == 'n' && !verbose)
                        if (c == 'v' && !noex)
                                verbose = 1;
                        else if (c == 'n' && !verbose)
@@ -620,6 +628,7 @@ static void procargs(argc, argv, pfrompat, ptopat)
                        }
                }
 
                        }
                }
 
+endargs:
        if (op == DFLT)
                if (strcmp(cmdname, MOVENAME) == 0)
                        op = XMOVE;
        if (op == DFLT)
                if (strcmp(cmdname, MOVENAME) == 0)
                        op = XMOVE;
@@ -1001,20 +1010,16 @@ static int parsepat()
                                printf(TRAILESC, from, to, ESC);
                                return(-1);
                        }
                                printf(TRAILESC, from, to, ESC);
                                return(-1);
                        }
+#ifdef IS_MSDOS
                default:
                        if (
                default:
                        if (
-#ifdef IS_MSDOS
                                c <= ' ' || c >= 127 ||
                                strchr(":/\\*?[]=+;,\"|<>", c) != NULL
                                c <= ' ' || c >= 127 ||
                                strchr(":/\\*?[]=+;,\"|<>", c) != NULL
-#else
-                               c & 0x80
-#endif
                        ) {
                                printf("%s -> %s : illegal character '%c' (0x%02X).\n",
                                        from, to, c, c);
                                return(-1);
                        }
                        ) {
                                printf("%s -> %s : illegal character '%c' (0x%02X).\n",
                                        from, to, c, c);
                                return(-1);
                        }
-#ifdef IS_MSDOS
                        if (isupper(c))
                                *p = c + ('a' - 'A');
 #endif
                        if (isupper(c))
                                *p = c + ('a' - 'A');
 #endif
@@ -2626,7 +2631,7 @@ static int copymove(p)
 
 static int copy(ff, len)
        FILEINFO *ff;
 
 static int copy(ff, len)
        FILEINFO *ff;
-       long len;
+       off_t len;
 {
        char buf[BUFSIZE], c;
        int f, t, k, mode, perm;
 {
        char buf[BUFSIZE], c;
        int f, t, k, mode, perm;
@@ -2674,7 +2679,7 @@ static int copy(ff, len)
                return(-1);
        }
        if (op & APPEND)
                return(-1);
        }
        if (op & APPEND)
-               lseek(t, 0L, 2);
+               lseek(t, (off_t)0, SEEK_END);
 #ifdef IS_MSDOS
        if (op & ZAPPEND && filelength(t) != 0) {
                if (lseek(t, -1L, 1) == -1L || read(t, &c, 1) != 1) {
 #ifdef IS_MSDOS
        if (op & ZAPPEND && filelength(t) != 0) {
                if (lseek(t, -1L, 1) == -1L || read(t, &c, 1) != 1) {
@@ -2686,10 +2691,10 @@ static int copy(ff, len)
                        lseek(t, -1L, 1);
        }
 #endif
                        lseek(t, -1L, 1);
        }
 #endif
-       if ((op & APPEND) && len != -1L) {
+       if ((op & APPEND) && len != (off_t)-1) {
                while (
                        len != 0 &&
                while (
                        len != 0 &&
-                       (k = read(f, buf, len > BUFSIZE ? BUFSIZE : (unsigned)len)) > 0 &&
+                       (k = read(f, buf, (len > BUFSIZE) ? BUFSIZE : (size_t)len)) > 0 &&
                        write(t, buf, k) == k
                )
                        len -= k;
                        write(t, buf, k) == k
                )
                        len -= k;