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

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


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

include /usr/share/cdbs/1/rules/tarball.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

--libdir=$(INSTALL_PREFIX)/lib --enable-online --enable-dtt


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:

	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.



PS: Please CC me

Reply to: