]> thyrsus.com Git - imgsizer.git/commitdiff
Ready to ship.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 15 Nov 2003 06:28:12 +0000 (06:28 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 15 Nov 2003 06:28:12 +0000 (06:28 +0000)
Makefile
README
imgsizer

index b5accb1c47725d314a846fdcc8245125aa75f57f..33cf76c1c1c89e45d8fb9f1208f4359aac7f248c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 # Makefile for the imgsizer distribution
-VERS=2.4
+VERS=2.5
 
 # These choices are correct for Linux.  Season to taste.
 BINDIR = /usr/bin
@@ -20,7 +20,7 @@ clean:
 imgsizer.1: imgsizer.xml
        xmlto man imgsizer.xml
 
-SOURCES = READ.ME Makefile \
+SOURCES = READ.ME Makefile imgsizer.spec \
        imgsizer imgsizer.xml \
        test-before.html test-converted.html test.png tnhd2.jpg
 
@@ -40,14 +40,10 @@ dist: imgsizer-$(VERS).tar.gz
 
 # Make RPMs.  You need to be root to make this work
 RPMROOT=/usr/src/redhat
-RPM = rpmbuild
-RPMFLAGS = -bb --target noarch
-rpm: imgsizer-$(VERS).tar.gz
-       cp imgsizer-$(VERS).tar.gz $(RPMROOT)/SOURCES;
-       cp imgsizer.spec $(RPMROOT)/SPECS/imgsizer.spec
-       (cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) imgsizer.spec)
-       cp $(RPMROOT)/RPMS/noarch/imgsizer-$(VERS)*.rpm .
-       chown $$USER *
+rpm: dist
+       rpmbuild --target noarch --define 'myversion $(VERS)' -ta imgsizer-$(VERS).tar.gz
+       cp $(RPMROOT)/RPMS/noarch/imgsizer-$(VERS)*.noarch.rpm .
+
 
 
 
diff --git a/README b/README
index 6ff75db1ff40cb7c6335fb111b5cdf0d5ac95b3b..1f4685c02cbefaa997bd78513778ac0128e01ec3 100644 (file)
--- a/README
+++ b/README
@@ -13,7 +13,7 @@ Files in this directory:
        imgsizer.lsm    -- Linux Software Map description.
 
 Put imgsizer on your execution path and the man page in a man source
-directory somewhere.  `make install' will do the right hing on a Linux box. 
+directory somewhere.  `make install' will do the right thing on a Linux box. 
 That's it.
 
 You will need either identify(1) from the ImageMagick tools or
index 6cd8e2716b636e123dce3f29de711048271468de..3ee339e614e650feec7601de2fb288d4a771c10b 100755 (executable)
--- a/imgsizer
+++ b/imgsizer
 #
 #    Incorporated fixes by Peter S. Galbraith.
 #
-# Fixes by EST, 25 April 2003
+# Fixes by ESR, 25 April 2003
 #
 #    Merged amended versions of Lennart Poettering's fix for Debian bug 139714.
 #    and Jeroen N. Witmond's fix for Debian bug 168964.  Added regression-test
 #    production.
+#
+# Enhancement by ESR, 14 Nov 2003
+#
+#    Verify and merge Lucien Saviot's patch to produce XHTML from XHTML input.
 
 import sys, os, getopt, string, re, urllib, commands
 
@@ -71,7 +75,7 @@ try:
 except ImportError:
     import cmp
 
-version = "2.4, 25 April 2003";
+version = "2.5, 14 November 2003";
 
 splash = """imgsizer version %s, Eric S. Raymond <esr@thyrsus.com>
 See <http://www.tuxedo.org/~esr/software.html> for updates."""
@@ -104,7 +108,7 @@ def attrformat(xc, dim):
         res = " " + dim
     else:
         res = " " + string.upper(dim)
-    res = res + '=' + str(xc)
+    res = res + '="' + str(xc) + '"'
     return res
 
 def sizefix(infp, outfp):
@@ -136,8 +140,13 @@ def sizefix(infp, outfp):
                     return
                 if ch == '>':
                     break
+                if ch == '/':
+                    ch2 = infp.read(1)
+                    ch = ch + ch2
+                    if ch2 == '>':
+                        break
                 attributes = attributes + ch
-            outfp.write(transform(attributes) + ">")
+            outfp.write(transform(attributes) + ch)
 
 x_match = re.compile (r" ([0-9]+) *x *([0-9]+)")
 rdjpg_match = re.compile (r" ([0-9]+)w *\* *([0-9]+)h")