Conduit arch dependence, redux



Hi, all you folks I don't know from synce at all ;).

I did bring this up in the past on IRC, but wanted to revisit it now
conduit is maturing.

The issue is simply this: Conduit is architecture-independent, but its
install scripts don't act like it is.

Several distros - including Mandriva - have different libdirs on
different architectures. On i586 libdir is /usr/lib , on x86_64 libdir
is /usr/lib64 . So if an app installs files to libdir, it cannot be
packaged as 'noarch'.

I currently have a bunch of substitutions in the MDV spec file for
conduit that cause it to install itself in a proper arch-dependent way -
basically, it installs its modules to exec_prefix/lib (which is
always /usr/lib , on both i586 and x86-64) rather than libdir. It also
puts the pkgconfig file in /usr/share/pkgconfig rather
than /usr/lib/pkgconfig . It would be nice to have something like this
adopted upstream, assuming it won't cause problems in other situations.
Here's the relevant bits from the spec file, for reference:

# install plugins to /usr/lib regardless of arch: they are arch-independent
perl -pi -e 's,\$\(libdir\)/conduit,\$\(exec_prefix\)/lib/conduit,g' conduit/modules/Makefile.am
perl -pi -e 's,\$\(libdir\)/conduit,\$\(exec_prefix\)/lib/conduit,g' conduit/modules/*/Makefile.am
perl -pi -e 's,\$\(libdir\)/conduit,\$\(exec_prefix\)/lib/conduit,g' conduit/modules/*/*/Makefile.am

# install pkgconfig file to /usr/share/pkgconfig instead of libdir/pkgconfig
perl -pi -e 's,\$\(libdir\)/pkgconfig,\$\(datadir\)/pkgconfig,g' data/Makefile.am

# ...and correct the paths in it to match the changes we made above
perl -pi -e 's.MODULEDIR, \$libdir.MODULEDIR, \$exec_prefix/lib.g' configure.ac

# correct start_conduit.py for the changes made above
perl -pi -e 's.LIBDIR, \$libdir.LIBDIR, \$exec_prefix/lib.g' configure.ac

%build
%if %svn
sh ./autogen.sh
%else
# redefinition of ACLOCAL is needed because conduit ships its own
# Awsum Hax0reD .m4 files and a normal aclocal uses the standard ones
# and breaks build. - AdamW 2007/10
ACLOCAL="aclocal -I ./m4" autoreconf
-- 
adamw



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