[Gdal-dev] Problem in RPM packaging

Susumu Tanimura stanimura-ngs at umin.ac.jp
Wed Mar 17 08:39:37 EST 2004


Hi, there.

I have a problem with spec file for gdal, especially at the install
part.  

In the spec file, I wrote

%setup -q
%{__perl} -p -i -e 's|\$\(INST_|\$\(DESTDIR\)\$\(INST_|' GNUmakefile
%{__perl} -p -i -e 's|\$\(INST_|\$\(DESTDIR\)\$\(INST_|' port/GNUmakefile
%{__perl} -p -i -e 's|\$\(INST_|\$\(DESTDIR\)\$\(INST_|' gcore/GNUmakefile
%{__perl} -p -i -e 's|\$\(INST_|\$\(DESTDIR\)\$\(INST_|' ogr/GNUmakefile
%{__perl} -p -i -e 's|\$\(INST_|\$\(DESTDIR\)\$\(INST_|' apps/GNUmakefile
%{__perl} -p -i -e 's|\$\(INST_|\$\(DESTDIR\)\$\(INST_|' alg/GNUmakefile
%{__perl} -p -i -e 's|\$\(INST_|\$\(DESTDIR\)\$\(INST_|' pymod/GNUmakefile
%{__perl} -p -i -e 's|\$\(INST_|\$\(DESTDIR\)\$\(INST_|' man/GNUmakefile
%{__perl} -p -i -e 's|\$\(INST_|\$\(DESTDIR\)\$\(INST_|' frmts/GNUmakefile

[snip]

%install
%{__make} install DESTDIR=$RPM_BUILD_ROOT

However, it resulted that

[snip]

+ make prefix=/var/tmp/gdal-1.2.0-root/usr
exec_prefix=/var/tmp/gdal-1.2.0-root/usr
bindir=/var/tmp/gdal-1.2.0-root/usr/bin
sbindir=/var/tmp/gdal-1.2.0-root/usr/sbin
sysconfdir=/var/tmp/gdal-1.2.0-root/etc
datadir=/var/tmp/gdal-1.2.0-root/usr/share
includedir=/var/tmp/gdal-1.2.0-root/usr/include
libdir=/var/tmp/gdal-1.2.0-root/usr/lib
libexecdir=/var/tmp/gdal-1.2.0-root/usr/libexec
localstatedir=/var/tmp/gdal-1.2.0-root/var/lib
sharedstatedir=/var/tmp/gdal-1.2.0-root/usr/share
mandir=/var/tmp/gdal-1.2.0-root/usr/share/man
infodir=/var/tmp/gdal-1.2.0-root/usr/info install
INST_PREFIX=/var/tmp/gdal-1.2.0-root
GNUmakefile:43: warning: overriding commands for target `libgdal.la'
GNUmakefile:39: warning: ignoring old commands for target `libgdal.la'
(cd port; make)
make[1]: Entering directory `/home/hoge/rpm/BUILD/gdal-1.2.0/port'
make[1]: Nothing to be done for `default'.
make[1]: Leaving directory `/home/hoge/rpm/BUILD/gdal-1.2.0/port'
(cd gcore; make)

[snip]

(cd apps; make)
make[1]: Entering directory `/home/hoge/rpm/BUILD/gdal-1.2.0/apps'
make[1]: Nothing to be done for `default'.
make[1]: Leaving directory `/home/hoge/rpm/BUILD/gdal-1.2.0/apps'
./install-sh -d /usr/lib
for f in ./libgdal.la ; do /bin/sh ./libtool --mode=install ./install-sh -c $f /usr/lib ; done
./install-sh -c ./.libs/libgdal.1.2.0 /usr/lib/libgdal.1.2.0
cp: cannot create regular file `/usr/lib/#inst.14434#': Permission denied
make: *** [install-lib] Error 1
Bad exit status from /var/tmp/rpm-tmp.7004 (%install)

So, even though I set prefix as /var/tmp/gdal-1.2.0-root/usr, it was
ignored and used /usr.

Dose anyone give me some advice?  I found someone wrote gdal.spec at
http://cvs.pld.org.pl/SPECS/gdal.spec?rev=1.2 but I do not have those
patches.  Especially, %{name}-DESTDIR.patch seems to be essential one.

--
Susumu Tanimura










More information about the Gdal-dev mailing list