R: [Gdal-dev] [ANNOUNCE] gdal debian package at mentors.de bi a n.ne t

Amici Alessandro alessandro_amici at telespazio.it
Tue Jun 3 12:02:10 EDT 2003

[resend to the list]


> I have applied the suggested changes with a few minor differences.
> The gdal_utilities.html was already created from
> core/gdal_utilities.dox
> (the old html file logic was left over), and the master version of
> gdalicon.png is in gdal/data already.

looks ok to me, i'll test it later. in the mean time here it goes the
'install data 0644' patch (+ install-docs for ogr)

--- gdal-1.1.8+030521.orig/alg/GNUmakefile
+++ gdal-1.1.8+030521/alg/GNUmakefile
@@ -21,7 +21,7 @@
 	$(CXX) -c $(GDAL_INCLUDE) $(CXXFLAGS) $*.cpp -o $*.o
-	for f in *.h ; do $(INSTALL) $$f $(INST_INCLUDE) ; done
+	for f in *.h ; do $(INSTALL_DATA) $$f $(INST_INCLUDE) ; done
 lib:	$(OBJ)
 	(cd .. ; $(MAKE) force-lib)
--- gdal-1.1.8+030521.orig/ogr/GNUmakefile
+++ gdal-1.1.8+030521/ogr/GNUmakefile
@@ -34,6 +34,7 @@
 	rm -f sdts2mi$(EXE) testepsg$(EXE)
 	rm -f test_ogrsf$(EXE) $(OGR_LIB)
 	(cd ogrsf_frmts; $(MAKE) clean)
+	rm -f html/*
 very-clean: clean
 	rm -rf html rtf
@@ -68,6 +69,11 @@
 	rm -rf html/*
+	cp html/* $(INST_DOCS)/ogr/
 $(OGR_LIB):	$(OBJ)
 	$(AR) r $(OGR_LIB) $?
@@ -119,13 +125,15 @@
 	$(INSTALL) ogr2ogr $(INST_BIN)
 	$(INSTALL) ogrinfo $(INST_BIN)
 	$(INSTALL) ogrtindex $(INST_BIN)
 install:	$(OGR_LIB) install-full
-	for f in $(INST_H_FILES) ; do $(INSTALL) $$f $(INST_INCLUDE) ; done
+	for f in $(INST_H_FILES) ; \
+	    do $(INSTALL_DATA) $$f $(INST_INCLUDE) ; \
+	done
--- gdal-1.1.8+030521.orig/core/GNUmakefile
+++ gdal-1.1.8+030521/core/GNUmakefile
@@ -35,4 +35,4 @@
 	$(CXX) -c $(GDAL_INCLUDE) $(CXXFLAGS) $*.cpp -o $*.o
-	for f in *.h ; do $(INSTALL) $$f $(INST_INCLUDE) ; done
+	for f in *.h ; do $(INSTALL_DATA) $$f $(INST_INCLUDE) ; done
--- gdal-1.1.8+030521.orig/port/GNUmakefile
+++ gdal-1.1.8+030521/port/GNUmakefile
@@ -33,8 +33,8 @@
 	$(RANLIB) $(LIB)
 install:	$(LIB)
-	for f in *.h ; do $(INSTALL) $$f $(INST_INCLUDE) ; done
-	$(INSTALL) cpl.a $(INST_LIB)
+	for f in *.h ; do $(INSTALL_DATA) $$f $(INST_INCLUDE) ; done
 xmlreformat:	xmlreformat.o $(LIB)
 	$(CXX) $(CXXFLAGS) xmlreformat.o $(LIB) -o xmlreformat
\ No newline at end of file
--- gdal-1.1.8+030521.orig/GNUmakefile
+++ gdal-1.1.8+030521/GNUmakefile
@@ -139,9 +139,9 @@
 ifneq ($(PYTHON),no)
 	(cd pymod; $(MAKE) install)
 ifeq ($(HAVE_LD_SHARED),yes)
-	for f in data/*.* ; do $(INSTALL) -m 0644 $$f $(INST_DATA) ; done
+	for f in data/*.* ; do $(INSTALL_DATA) $$f $(INST_DATA) ; done
--- gdal-1.1.8+030521.orig/GDALmake.opt.in
+++ gdal-1.1.8+030521/GDALmake.opt.in
@@ -1,6 +1,7 @@
 CC	=	@CC@
 CXX	=	@CXX@
 INSTALL = 	$(GDAL_ROOT)/install-sh -c
+INSTALL_DATA	= 	$(GDAL_ROOT)/install-sh -c -m 0644
 INSTALL_DIR = 	$(GDAL_ROOT)/install-sh -d
 #Flags to build optimized relese version

the original patch (done before you applied the docs changes) has been
heavily tested. the above incarnation is hand-modified and may have
problems on the topdir GNUmakefile.

the following python bit may be more controversal due to the use of
the command 'head' and to the fact that it is a bit fragile WRT
handling spaces (i.e. "#!/usr/bin/env  pyhton" is not recognized 
as a script!).

if you prefer i can change it to use 'awk' instead.
however it works as expected on the current sources. here it goes:

--- gdal-1.1.8+030521.orig/pymod/GNUmakefile
+++ gdal-1.1.8+030521/pymod/GNUmakefile
@@ -31,4 +31,12 @@
 install:	$(GDALMODULE)
-	for f in *.py $(GDALMODULE) ; do $(INSTALL) $$f $(INST_PYMOD) ; done
+	for f in *.py ; do \
+	    HEAD=`head -n 1 $$f`; \
+	    if [ "$$HEAD" = "#!/usr/bin/env python" ]; then \
+		$(INSTALL) $$f $(INST_PYMOD); \
+	    else \
+	    fi \
+	done

> Let me know if you have any problems with the code as committed now.

i noted that i end up doing most of the work at home, where i have 
normal connection, so if your proposal about cvs write access is still
valid, i think it will make things easier for both of us.
future plans are:
	- hack aclocal.m4 to set GDAL_SLIB_SONAME when using gnu binutils
	- configure option for building a standard sonamed shared library
	  (including file names), when using gnu binutils.

i played a bit with the gnu libtool, lately. it looks like a powerful 
tool, if it is really up to what it promises. what's your concerns
about it? wuold you consider the libtoolification of gdal a worthwile
project? (apart from a bit of initial makefile panic i don't expect
it to be too diffcult, but i might be wrong!)


More information about the Gdal-dev mailing list