[Build-common-hackers] CDBS and multiple upstream tarballs in one orig tarball

Michael Koch konqueror@gmx.de
Thu, 25 Mar 2004 18:53:03 +0100


Am Mittwoch, 24. M=E4rz 2004 22:03 schrieb Jeff Bailey:
> On Wed, Mar 24, 2004 at 09:28:08PM +0100, Michael Koch wrote:
> > My problem is now that I dont get Atlas-C++ nor skstream to build
> > within CDBS. Can you give me some hints on this ? Or a pointer to
> > an example ?
> >
> > It would be nice too if I could patch the upstream sources too. I
> > dont got that working either but this has no high priority yet.
>
> Hmm.  When I wrote the ability to handle multiple tarballs, I had the
> idea of overlays, like are used in glibc.  cdbs is not currently
> configured (unless walters has done some major surgery) do actually
> do multiple configure passes through different source trees.

I got it working with some workaround by moving autotools*.mk into the=20
deb sources. The main problem was that I could not pass LDFLAGS and=20
PKG_CONFIG_PATH environment variables to ./configure of my main=20
upstream sources. LDFLAGS should be handled the same as CFLAGS or=20
CXXFLAGS. For PKG_CONFIG_PATH I would propose a more general solution=20
by allowing the following

DEB_CONFIGURE_EXTRA_ENV :=3D PKG_CONFIG_PATH=3D"/some/path/".

I built the static libs by this code in debian/rules:

include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include $(CURDIR)/debian/cdbs/autotools.mk

pre-build:: stamp-build-static-libs

build-static-libs: stamp-build-static-libs

stamp-build-static-libs:
	(cd debian/libs/skstream-0.2.5 ; 				\
	./configure							\
		--host=3D$(DEB_HOST_GNU_TYPE)				\
                --build=3D$(DEB_BUILD_GNU_TYPE)				\
		--prefix=3D$(CURDIR)/debian/tmp-libs/			\
		--disable-shared --enable-static			\
                --mandir=3D\$${prefix}/share/man				\
                --infodir=3D\$${prefix}/share/info			\
                --disable-debug;					\
	make;								\
	make install)

	(cd debian/libs/Atlas-C++-0.4.6 ;				\
	./configure 							\
		--host=3D$(DEB_HOST_GNU_TYPE)				\
                --build=3D$(DEB_BUILD_GNU_TYPE)				\
		--prefix=3D$(CURDIR)/debian/tmp-libs/			\
		--disable-shared --enable-static			\
                --mandir=3D\$${prefix}/share/man				\
                --infodir=3D\$${prefix}/share/info			\
                --disable-debug;					\
	make ;								\
	make install)

	touch stamp-build-static-libs

clean::
	-(cd debian/libs/skstream-0.2.5 ;				\
	make distclean ;							\
	rm -f config.log config.status)

	-(cd debian/libs/Atlas-C++-0.4.6 ;				\
	make distclean ;							\
	rm -f config.log config.status)

	-rm -rf $(CURDIR)/debian/tmp-libs
	-rm -f $(CURDIR)/stamp-build-static-libs

DEB_CONFIGURE_EXTRA_ENV :=3D=20
PKG_CONFIG_PATH=3D"$(CURDIR)/debian/tmp-libs/lib/pkgconfig"
DEB_CONFIGURE_EXTRA_FLAGS :=3D \
	--localstatedir=3D/var/games \
	--with-atlas-prefix=3D$(CURDIR)/debian/tmp-libs \
	--with-skstream-prefix=3D$(CURDIR)/debian/tmp-libs \
	--disable-psqltest

This can surely be made more generalized.


Michael