building libgda RPM as non-root
- From: Gregory Leblanc <gleblanc cu-portland edu>
- To: gnome-db-list gnome org
- Subject: building libgda RPM as non-root
- Date: 01 Jan 2001 22:24:06 -0800
Hey guys! I'm trying to build an RPM of libgda from the tarball
available on ftp.gnome.org. 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/Install.pm 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/Install.pm 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,
Greg
P.S. I'm not subscribed, so if you could CC: me on replies it would be
appreciated.
--- 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
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
@@ -17,7 +15,6 @@
Source: ftp://ftp.gnome.org/pub/GNOME/sources/gnome-db/%{name}-%{ver}.tar.gz
BuildRoot: /var/tmp/%{name}-%{ver}-root
URL: http://www.gnome.org/projects/gnome-db/
-DocDir: %{prefix}/doc
%description
GNU Data Access is an attempt to provide uniform access to
@@ -106,6 +103,10 @@
This package includes the GDA MySQL provider
%changelog
+* 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" ./autogen.sh $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir} --with-odbc=/opt/unixodbc --with-postgres=yes --with-mysql=yes
-else
- 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" ./autogen.sh $ARCH_FLAGS --prefix=%{_prefix} --sysconfdir=%{_sysconfdir}
fi
+%configure --with-postgres=yes --with-mysql=yes
+
if [ "$SMP" != "" ]; then
(make "MAKE=make -k -j $SMP"; exit 0)
make
@@ -136,17 +137,15 @@
%install
rm -rf $RPM_BUILD_ROOT
-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 \
-install
+%makeinstall oafinfodir=$RPM_BUILD_ROOT%{_datadir}/oaf \
+idldir=$RPM_BUILD_ROOT%{_datadir}/idl
%clean
rm -rf $RPM_BUILD_ROOT
%post
-if ! grep %{prefix}/lib /etc/ld.so.conf > /dev/null ; then
- echo "%{prefix}/lib" >> /etc/ld.so.conf
+if ! grep %{_libdir} /etc/ld.so.conf > /dev/null ; then
+ echo "%{_libdir}" >> /etc/ld.so.conf
fi
/sbin/ldconfig
@@ -157,43 +156,43 @@
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
-%{prefix}/bin/gda-test
-%{prefix}/lib/libgda-common.so*
-%{prefix}/lib/libgda-client.so*
-%{prefix}/lib/libgda-server.so*
-%{prefix}/share/gda/dtd/*
-%{prefix}/share/gnome/help/libgda/*
+%{_bindir}/gda-test
+%{_libdir}/libgda-common.so*
+%{_libdir}/libgda-client.so*
+%{_libdir}/libgda-server.so*
+%{_datadir}/gda/dtd/*
+%{_datadir}/gnome/help/libgda/*
%files devel
%defattr(-, root, root)
-%{prefix}/bin/gda-build*
-%{prefix}/bin/gda-run
-%{prefix}/bin/gda-config
-%{prefix}/lib/libgda-common.*a
-%{prefix}/lib/libgda-client.*a
-%{prefix}/lib/libgda-server.*a
-%{prefix}/include/gda/*
-%{prefix}/share/idl/*
+%{_bindir}/gda-build*
+%{_bindir}/gda-run
+%{_bindir}/gda-config
+%{_libdir}/libgda-common.*a
+%{_libdir}/libgda-client.*a
+%{_libdir}/libgda-server.*a
+%{_includedir}gda/*
+%{_datadir}/idl/*
%files -n gda-odbc
%defattr(-, root, root)
-%{prefix}/bin/gda-odbc-srv
-%{prefix}/lib/libgda-odbc.so*
-%{prefix}/share/oaf/GNOME_GDA_Provider_ODBC.oafinfo
+%{_bindir}/gda-odbc-srv
+%{_libdir}/libgda-odbc.so*
+%{_datadir}/oaf/GNOME_GDA_Provider_ODBC.oafinfo
%files -n gda-postgres
%defattr(-, root, root)
-%{prefix}/bin/gda-postgres-srv
-%{prefix}/lib/libgda-postgres.so*
-%{prefix}/share/oaf/GNOME_GDA_Provider_Postgres.oafinfo
+%{_bindir}/gda-postgres-srv
+%{_libdir}/libgda-postgres.so*
+%{_datadir}/oaf/GNOME_GDA_Provider_Postgres.oafinfo
%files -n gda-mysql
%defattr(-, root, root)
-%{prefix}/bin/gda-mysql-srv
-%{prefix}/lib/libgda-mysql.so*
-%{prefix}/share/oaf/GNOME_GDA_Provider_MySQL.oafinfo
+%{_bindir}/gda-mysql-srv
+%{_libdir}/libgda-mysql.so*
+%{_datadir}/oaf/GNOME_GDA_Provider_MySQL.oafinfo
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]