Created a custom script to add the line "USEMINSPACING OBS OFF" to
each of the standard cell technology LEF files.  This is the correct
setting, as otherwise macros with obstruction areas won't be handled
correctly by place & route tools.  Also:  The custom script causes
the technology LEF file to flag as a mismatch in the "patch" file,
and "patch" creates a backup file with a ".orig" extension.  So the
".orig" extension has been added to the list of file extensions to
ignore when doing "make install".
diff --git a/VERSION b/VERSION
index f7a332f..6d552cc 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.265
+1.0.266
diff --git a/common/staging_install.py b/common/staging_install.py
index a1be9a4..ebc99f7 100755
--- a/common/staging_install.py
+++ b/common/staging_install.py
@@ -664,6 +664,8 @@
                                 os.remove(filepath)
                             elif os.path.splitext(libfile)[1] == '.swp':
                                 os.remove(filepath)
+                            elif os.path.splitext(libfile)[1] == '.orig':
+                                os.remove(filepath)
         else:
             libraries = os.listdir(writedir + refdir)
             for library in libraries:
@@ -694,6 +696,8 @@
                                 os.remove(libfilepath)
                             elif os.path.splitext(libfile)[1] == '.ext':
                                 os.remove(libfilepath)
+                            elif os.path.splitext(libfile)[1] == '.orig':
+                                os.remove(libfilepath)
 
     print('Done with PDK migration.')
     sys.exit(0)
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index fae19ff..83e9c28 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -1060,7 +1060,7 @@
 		-library digital sky130_fd_sc_hd 2>&1 | tee -a ${SKY130A}_make.log
 	# Install all SkyWater digital standard cells.
 	${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
-		-techlef %l/latest/tech/*.tlef \
+		-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef.py \
 		-spice %l/latest/cells/*/*.spice compile-only \
 			sort=../common/sort_pdkfiles.py \
 			filter=custom/scripts/fix_device_models.py \
@@ -1109,7 +1109,7 @@
 digital-hdll-a:
 	# Install all SkyWater digital standard cells.
 	${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
-		-techlef %l/latest/tech/*.tlef \
+		-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef.py \
 		-spice %l/latest/cells/*/*.spice compile-only \
 			sort=../common/sort_pdkfiles.py \
 			filter=custom/scripts/fix_device_models.py \
@@ -1148,7 +1148,7 @@
 		-library digital sky130_fd_sc_hvl 2>&1 | tee -a ${SKY130A}_make.log
 	# Install all SkyWater digital standard cells.
 	${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
-		-techlef %l/latest/tech/*.tlef \
+		-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef.py \
 		-spice %l/latest/cells/*/*.spice compile-only \
 			no-copy=custom/sky130_fd_sc_hvl/spice/sky130_fd*.spice \
 			sort=../common/sort_pdkfiles.py \
@@ -1190,7 +1190,7 @@
 digital-lp-a:
 	# Install all SkyWater digital standard cells.
 	${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
-		-techlef %l/latest/tech/*.tlef \
+		-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef.py \
 		-spice %l/latest/cells/*/*.spice compile-only \
 			sort=../common/sort_pdkfiles.py \
 			filter=custom/scripts/fix_device_models.py \
@@ -1224,7 +1224,7 @@
 		-library digital sky130_fd_sc_hs 2>&1 | tee -a ${SKY130A}_make.log
 	# Install all SkyWater digital standard cells.
 	${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
-		-techlef %l/latest/tech/*.tlef \
+		-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef.py \
 		-spice %l/latest/cells/*/*.spice compile-only \
 			sort=../common/sort_pdkfiles.py \
 			filter=custom/scripts/fix_device_models.py \
@@ -1255,7 +1255,7 @@
 digital-ms-a:
 	# Install all SkyWater digital standard cells.
 	${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
-		-techlef %l/latest/tech/*.tlef \
+		-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef.py \
 		-spice %l/latest/cells/*/*.spice compile-only \
 			sort=../common/sort_pdkfiles.py \
 			filter=custom/scripts/fix_device_models.py \
@@ -1285,7 +1285,7 @@
 digital-ls-a:
 	# Install all SkyWater digital standard cells.
 	${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
-		-techlef %l/latest/tech/*.tlef \
+		-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef.py \
 		-spice %l/latest/cells/*/*.spice compile-only \
 			sort=../common/sort_pdkfiles.py \
 			filter=custom/scripts/fix_device_models.py \
diff --git a/sky130/custom/scripts/fix_techlef.py b/sky130/custom/scripts/fix_techlef.py
new file mode 100755
index 0000000..af2af2b
--- /dev/null
+++ b/sky130/custom/scripts/fix_techlef.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python3
+#
+# fix_techlef ---
+#
+# This script adds the missing statement "USEMINSPACING OBS OFF" from
+# the technology LEF files for Sky130.
+#
+# This script is a filter to be run by setting the name of this script as
+# the value to "filter=" for the model install in the sky130 Makefile.
+
+import re
+import os
+import sys
+
+def filter(inname, outname):
+
+    # Read input
+    try:
+        with open(inname, 'r') as inFile:
+            ltext = inFile.read()
+            llines = ltext.splitlines()
+    except:
+        print('fix_techlef.py: failed to open ' + inname + ' for reading.', file=sys.stderr)
+        return 1
+
+    # Process input with regexp
+
+    fixedlines = []
+    modified = False
+
+    proprex = re.compile('[ \t]*MANUFACTURINGGRID')
+
+    for line in llines:
+        fixedlines.append(line)
+
+        # Check for the MANUFACTURINGGRID statement in the file, and
+        # add the USEMINSPACING statement after it.
+
+        pmatch = proprex.match(line)
+        if pmatch:
+            fixedlines.append('USEMINSPACING OBS OFF ;')
+            modified = True
+
+    # Write output
+    if outname == None:
+        for i in fixedlines:
+            print(i)
+    else:
+        # If the output is a symbolic link but no modifications have been made,
+        # then leave it alone.  If it was modified, then remove the symbolic
+        # link before writing.
+        if os.path.islink(outname):
+            if not modified:
+                return 0
+            else:
+                os.unlink(outname)
+        try:
+            with open(outname, 'w') as outFile:
+                for i in fixedlines:
+                    print(i, file=outFile)
+        except:
+            print('fix_techlef.py: failed to open ' + outname + ' for writing.', file=sys.stderr)
+            return 1
+
+
+if __name__ == '__main__':
+
+    # This script expects to get one or two arguments.  One argument is
+    # mandatory and is the input file.  The other argument is optional and
+    # is the output file.  The output file and input file may be the same
+    # name, in which case the original input is overwritten.
+
+    options = []
+    arguments = []
+    for item in sys.argv[1:]:
+        if item.find('-', 0) == 0:
+            options.append(item[1:])
+        else:
+            arguments.append(item)
+
+    if len(arguments) > 0:
+        infilename = arguments[0]
+
+    if len(arguments) > 1:
+        outfilename = arguments[1]
+    else:
+        outfilename = None
+
+    result = filter(infilename, outfilename)
+    sys.exit(result)