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

Re: CDBS - how to source a shell fragement before running ./configure?



On Tuesday 23 June 2009 08:22:17 Carsten Aulbert wrote:
> Hi,
>
> as suggested on debian-user I repost my question here (sorry for the
> cross post, but I think it's better than send to individual emails to
> both lists, feel free to remove the other list)
>
> I'm currently packaging some "internal" software named gds with the
> great CDBS package. However, I have a problem. One of the build
> dependencies installs things into a non-standard system location (read
> /opt) and I need to source one file to let the configure script know
> where to look for certain software.
>
> Right now my debian/rules file looks like:
> #!/usr/bin/make -f
>
> MAJOR_VER := 2.13
> DEB_TAR_SRCDIR:=gds-2.13.1
> INSTALL_PREFIX:=/opt/lscsoft/gds
>
> include /usr/share/cdbs/1/rules/tarball.mk
> include /usr/share/cdbs/1/rules/debhelper.mk
> include /usr/share/cdbs/1/class/autotools.mk
>
> DEB_CONFIGURE_NORMAL_ARGS := --prefix=$(INSTALL_PREFIX)
> --libdir=$(INSTALL_PREFIX)/lib --enable-online --enable-dtt
> CFLAGS += -D_POSIX_C_SOURCE=199309 -fPIC
>
> ------8><------------8><----------------
>
> This one works provided I source /opt/foo/bar.sh before running
> dpkg-buildpackage. Obviously, I would like to get this included into the
> rules file, however, my current attempts failed since it seems that the
> "source" only happens in a subshell and the remaining (inlcuded makefile
> snippets odn't know about this)
>
> I'm adding this to the debian/rules file:
>
> makebuilddir/gds::
> 	source /opt/foo/bar.sh
>
> which subsequently leads the configure script to fail when detecting
> software available under /opt

It's a bit daring, but the following might work:

DEB_CONFIGURE_INVOKE := . opt/foo/bar.sh ; $(DEB_CONFIGURE_INVOKE)


Reply to: