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

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



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

Any idea how to solve this? If possible I'd like to stay with CDBS :)

Is there a way to "import" the additions the source'd file makes to the
environment into the makefile?

I've read a lot of pages returned by google, however, they did not
really help me.

TIA

Carsten

PS: Please CC me


Reply to: