building libgda RPM as non-root

Hey guys!  I'm trying to build an RPM of libgda from the tarball
available on  I made a whole bunch of cleanups to the
spec file which should have allowed it to build as non-root, and to make
sure that things got installed where they belong on many RPM
distributions, not just RH6.x.  However, when I go to do 'rpm -ba
libgda.spec', I get the following error where the build terminates.

cd Gnome/GDA/Common && make install
make[4]: Entering directory `/home/gleblanc/projects/rpm/BUILD/libgda-0.2.2/bindings/perl/Gnome/GDA/Common'
Warning: You do not have permissions to install into /usr/lib/perl5/site_perl/5.6.0/i386-linux at /usr/lib/perl5/5.6.0/ExtUtils/ line 62.
mkdir /usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/Gnome: Permission denied at /usr/lib/perl5/5.6.0/ExtUtils/ line 112
make[4]: *** [pure_site_install] Error 255
make[4]: Leaving directory `/home/gleblanc/projects/rpm/BUILD/libgda-0.2.2/bindings/perl/Gnome/GDA/Common'
make[3]: *** [install-data-local] Error 2
make[3]: Leaving directory `/home/gleblanc/projects/rpm/BUILD/libgda-0.2.2/bindings/perl'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/gleblanc/projects/rpm/BUILD/libgda-0.2.2/bindings/perl'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/gleblanc/projects/rpm/BUILD/libgda-0.2.2/bindings'
make: *** [install-recursive] Error 1
Bad exit status from /var/tmp/rpm-tmp.9716 (%install)

What I think this says is that libgda is trying to do something bad, and
install to the 'configure' prefix, and not to the 'make install' prefix.
I thought I'd take a crack at it, but this directory seems to use the
perl makefile stuff, which I'm not familiar with.  Does anybody know how
to fix this, and could take a look at it?  I've attached my diff of the
spec file, let me know if you see any errors, or have problems with it
other than the one that I've mentioned above.  Thanks,


P.S.  I'm not subscribed, so if you could CC: me on replies it would be
--- libgda.spec.old	Mon Jan  1 22:19:27 2001
+++ libgda.spec	Mon Jan  1 21:30:23 2001
@@ -2,8 +2,6 @@
 # defaults for redhat
 %define name	libgda
 %define ver	0.2.2
-%define prefix     /usr
-%define sysconfdir /etc
 %define  RELEASE 1
@@ -17,7 +15,6 @@
 BuildRoot: 	/var/tmp/%{name}-%{ver}-root
-DocDir: 	%{prefix}/doc
 GNU Data Access is an attempt to provide uniform access to
@@ -106,6 +103,10 @@
  This package includes the GDA MySQL provider
+* Mon Jan 1 2001 Gregory Leblanc <gleblanc cu-portland edu>
+- Many cleanups of macro useage, including ones only available 
+  with RPM 3.0.5 and later
 * Sat Sep 2 2000 Rodrigo Moya <rodrigo linuxave net>
 - Initial spec imported from old GNOME-DB spec
@@ -121,11 +122,11 @@
 # Needed for snapshot releases.
 if [ ! -f configure ]; then
-  CFLAGS="$RPM_OPT_FLAGS" ./ $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir} --with-odbc=/opt/unixodbc --with-postgres=yes --with-mysql=yes
-  CFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir} --with-odbc=/opt/unixodbc --with-postgres=yes --with-mysql=yes
+  CFLAGS="$RPM_OPT_FLAGS" ./ $ARCH_FLAGS --prefix=%{_prefix} --sysconfdir=%{_sysconfdir}
+%configure --with-postgres=yes --with-mysql=yes
 if [ "$SMP" != "" ]; then
   (make "MAKE=make -k -j $SMP"; exit 0)
@@ -136,17 +137,15 @@
-make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} \
-oafinfodir=$RPM_BUILD_ROOT%{prefix}/share/oaf \
-idldir=$RPM_BUILD_ROOT%{prefix}/share/idl \
+%makeinstall oafinfodir=$RPM_BUILD_ROOT%{_datadir}/oaf \
-if ! grep %{prefix}/lib /etc/ > /dev/null ; then
-  echo "%{prefix}/lib" >> /etc/
+if ! grep %{_libdir} /etc/ > /dev/null ; then
+  echo "%{_libdir}" >> /etc/
@@ -157,43 +156,43 @@
 %defattr(-, root, root)
 %files devel
 %defattr(-, root, root)
 %files -n gda-odbc
 %defattr(-, root, root)
 %files -n gda-postgres
 %defattr(-, root, root)
 %files -n gda-mysql
 %defattr(-, root, root)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]