RPMs for Mandrake 8.2 and cooker

Buchan Milne bgmilne at c...
Thu May 23 10:51:48 EDT 2002


In preparing RPMs of Grass5pre4 for he Mandrake cooker and 8.2, I have
also compiled gdal (for gdal support in grass).

RPMs can currently be found for 8.2 at:
http://ranger.dnsalias.com/mandrake/mandrake8.2/grass

In the process of compiling the RPMs, I had some issues:

1)libtiff and geotiff problems
Mandrake 8.2 has the following versions of libtiff and geotiff:

[bgmilne at bgmilne bgmilne]$ rpm -q libtiff3 libtiff3-devel libgeotiff1
libgeotiff1-devel
libtiff3-3.5.5-9mdk
libtiff3-devel-3.5.5-9mdk
libgeotiff1-1.1.4-2mdk
libgeotiff1-devel-1.1.4-2mdk
[bgmilne at bgmilne bgmilne]$

As you will see from the gdal spec file
(http://ranger.dnsalias.com/mandrake/mandrake8.2/grass/gdal.spec) I am
currently compiling against gdal's internal copy of geotiff, since I get
errors when linking against the system libtiff and libgeotiff (sample
errors given below for libgeotiff). I also had to avoid conflicting
with the headers for the system libgeotiff because of this. I could not
find any documentation on which version of libtiff and libgeotiff are
included. I would prefer to link against the system libtiff and
libgeotiff if possible.

2)Makefile patch
I had problems in the %install section of the RPM, until I patched the
makefile for DESTDIR support. This makes it easier to package, since the
user does not need to be root, mess with system files, or use different
arguments to make than used during compile. Mandrake has a macro
available for use in the spec file (%makeinstall_std) which runs make
$DESTDIR=$RPM_BUILD_ROOT.

I think (if the patch does not adversely affect normal building, which 
it should not) that it
would make life easier for packagers if this patch could be applied in
CVS. The patchis attached.

As soon as the issue regarding the use of internal copies of libtiff and
libgeotiff are resolved (either way), I will commit these RPMs to the
Mandrake cooker contribs, so that they will be available in next release
(along with Grass).

Since I have the grass and gdal packages available, and waiting to go
into the cooker contribs, a prompt response would be appreciated (as I
need to get back to working on my thesis, for which I need grass).

Regards,
Buchan


make[2]: Entering directory `/home/bgmilne/rpm/BUILD/gdal-1.1.7/frmts/gtiff'
c++ -c -I../.. -I../../port -I../../core -I../../ogr -Wall -fPIC -O3
-fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
-fno-strength-reduce -I/usr/include -I/usr/include/include
-I/usr/include -I/usr/include/include -I/usr/include/include
-I/usr/include -I/usr/include -I/usr/include/include
-I/usr/local/include geotiff.cpp -o geotiff.o
geotiff.cpp: In method `GTiffRasterBand::GTiffRasterBand (GTiffDataset
*, int)':
geotiff.cpp:336: `SAMPLEFORMAT_COMPLEXINT' undeclared (first use this
function)
geotiff.cpp:336: (Each undeclared identifier is reported only once for
each function it appears in.)
geotiff.cpp:349: `SAMPLEFORMAT_COMPLEXIEEEFP' undeclared (first use
this function)
geotiff.cpp: In function `TIFF *GTiffCreate (const char *, int, int,
int, GDALDataType, char **)':
geotiff.cpp:2162: warning: `uint16 nSampleFormat' might be used
uninitialized in this function
make[2]: *** [geotiff.o] Error 1
make[2]: Leaving directory `/home/bgmilne/rpm/BUILD/gdal-1.1.7/frmts/gtiff'
make[1]: *** [sub-libs] Error 1
make[1]: Leaving directory `/home/bgmilne/rpm/BUILD/gdal-1.1.7/frmts'
make: *** [frmts-target] Error 2

-- 
|----------------Registered Linux User #182071-----------------|
Buchan Milne Mechanical Engineer, Network Manager
Cellphone * Work +27 82 472 2231 * +27 21 8828820x202
Stellenbosch Automotive Engineering http://www.cae.co.za
GPG Key http://ranger.dnsalias.com/bgmilne.asc
1024D/60D204A7 2919 E232 5610 A038 87B1 72D6 AC92 BA50 60D2 04A7
-------------- next part --------------
name="gdal-1.1.7-destdir.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="gdal-1.1.7-destdir.patch"

--- gdal-1.1.7.orig/./GNUmakefile	Wed Mar 27 23:41:45 2002
+++ gdal-1.1.7/./GNUmakefile	Tue May 21 18:49:25 2002
@@ -114,10 +114,10 @@
install:	lib install-actions

install-actions:
-	$(INSTALL_DIR) $(INST_BIN)
-	$(INSTALL_DIR) $(INST_DATA)
-	$(INSTALL_DIR) $(INST_LIB)
-	$(INSTALL_DIR) $(INST_INCLUDE)
+	$(INSTALL_DIR) $(DESTDIR)$(INST_BIN)
+	$(INSTALL_DIR) $(DESTDIR)$(INST_DATA)
+	$(INSTALL_DIR) $(DESTDIR)$(INST_LIB)
+	$(INSTALL_DIR) $(DESTDIR)$(INST_INCLUDE)
(cd port; $(MAKE) install)
(cd core; $(MAKE) install)
(cd frmts; $(MAKE) install)
@@ -126,8 +126,8 @@
ifneq ($(PYTHON),no)
(cd pymod; $(MAKE) install)
endif
-	$(INSTALL) $(GDAL_LIB) $(INST_LIB)
+	$(INSTALL) $(GDAL_LIB) $(DESTDIR)$(INST_LIB)
ifeq ($(HAVE_LD_SHARED),yes)
-	$(INSTALL) $(GDAL_SLIB) $(INST_LIB)
+	$(INSTALL) $(GDAL_SLIB) $(DESTDIR)$(INST_LIB)
endif
-	for f in data/*.csv data/stateplane.txt ; do $(INSTALL) $$f $(INST_DATA) ; done
+	for f in data/*.csv data/stateplane.txt ; do $(INSTALL) $$f $(DESTDIR)$(INST_DATA) ; done
--- gdal-1.1.7.orig/port/GNUmakefile	Wed Jan 23 22:45:16 2002
+++ gdal-1.1.7/port/GNUmakefile	Tue May 21 18:38:59 2002
@@ -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) $$f $(DESTDIR)$(INST_INCLUDE) ; done
+	$(INSTALL) cpl.a $(DESTDIR)$(INST_LIB)

xmlreformat:	xmlreformat.o $(LIB)
-	$(CXX) $(CXXFLAGS) xmlreformat.o $(LIB) -o xmlreformat
\ No newline at end of file
+	$(CXX) $(CXXFLAGS) xmlreformat.o $(LIB) -o xmlreformat
--- gdal-1.1.7.orig/core/GNUmakefile	Wed Nov 21 05:16:47 2001
+++ gdal-1.1.7/core/GNUmakefile	Tue May 21 18:38:59 2002
@@ -26,4 +26,4 @@
$(CXX) -c $(GDAL_INCLUDE) $(CXXFLAGS) $*.cpp -o $*.o

install:
-	for f in *.h ; do $(INSTALL) $$f $(INST_INCLUDE) ; done
+	for f in *.h ; do $(INSTALL) $$f $(DESTDIR)$(INST_INCLUDE) ; done
--- gdal-1.1.7.orig/ogr/GNUmakefile	Fri Mar 29 01:54:26 2002
+++ gdal-1.1.7/ogr/GNUmakefile	Tue May 21 18:38:59 2002
@@ -123,16 +123,16 @@

ifeq ($(OGR_ENABLED),yes)
install-full:	ogrinfo ogr2ogr ogrtindex
-	$(INSTALL) ogr2ogr $(INST_BIN)
-	$(INSTALL) ogrinfo $(INST_BIN)
-	$(INSTALL) ogrtindex $(INST_BIN)
-	$(INSTALL) $(OGRFRMTS_LIB) $(INST_LIB)
+	$(INSTALL) ogr2ogr $(DESTDIR)$(INST_BIN)
+	$(INSTALL) ogrinfo $(DESTDIR)$(INST_BIN)
+	$(INSTALL) ogrtindex $(DESTDIR)$(INST_BIN)
+	$(INSTALL) $(OGRFRMTS_LIB) $(DESTDIR)$(INST_LIB)
else
install-full:
endif

install:	$(OGR_LIB) install-full
-	for f in $(INST_H_FILES) ; do $(INSTALL) $$f $(INST_INCLUDE) ; done
-	$(INSTALL) $(OGR_LIB) $(INST_LIB)
+	for f in $(INST_H_FILES) ; do $(INSTALL) $$f $(DESTDIR)$(INST_INCLUDE) ; done
+	$(INSTALL) $(OGR_LIB) $(DESTDIR)$(INST_LIB)


--- gdal-1.1.7.orig/apps/GNUmakefile	Wed Nov 7 05:49:16 2001
+++ gdal-1.1.7/apps/GNUmakefile	Tue May 21 18:38:59 2002
@@ -86,6 +86,6 @@


install: default
-	for f in $(BIN_LIST) ; do $(INSTALL) $$f $(INST_BIN) ; done
-	$(INSTALL) gdal-config-inst $(INST_BIN)/gdal-config
+	for f in $(BIN_LIST) ; do $(INSTALL) $$f $(DESTDIR)$(INST_BIN) ; done
+	$(INSTALL) gdal-config-inst $(DESTDIR)$(INST_BIN)/gdal-config

--- gdal-1.1.7.orig/pymod/GNUmakefile	Sat Sep 15 04:51:29 2001
+++ gdal-1.1.7/pymod/GNUmakefile	Tue May 21 18:38:59 2002
@@ -30,5 +30,5 @@


install:
-	$(INSTALL_DIR) $(INST_PYMOD)
-	for f in *.py $(GDALMODULE) ; do $(INSTALL) $$f $(INST_PYMOD) ; done
+	$(INSTALL_DIR) $(DESDIR)$(INST_PYMOD)
+	for f in *.py $(GDALMODULE) ; do $(INSTALL) $$f $(DESTDIR)$(INST_PYMOD) ; done



More information about the Gdal-dev mailing list