multiple binary packages from one source tree
Hi,
I am trying to make five binary packages out of one
Debian source tree. Also, I want to make a
meta-package which doesn't contain anything by itself
but only depends on the five binary packages.
The binary packages contain shared library - one
library per package.
I am try to make the source package so that all the
binary packages can be generated out of a single:
'debian/rules binary'.
The source tree is organised as below:
builddir/src
builddir/src/dir/module1/<sourcefiles>
builddir/src/dir/module2/<sourcefiles>
builddir/src/dir/module3/<sourcefiles>
builddir/src/dir/module4/<sourcefiles>
builddir/src/dir/module5/<sourcefiles>
builddir/debian/control
builddir/debian/rules
(and other files).
The control and rules files are attached with this
mail.
The problem is that I am not able to place/install
the files belonging to a package(module) in its
corresponding directory. eg. for module1 I want
builddir/debian/libmodule1/DEBIAN/usr/local/lib/libmodule1.so
(and the links) to be generated. However only the
control file is generated in DEBIAN. All the libraries
are placed in 'builddir/debian/tmp/usr/local/lib'.
Should I copy the libraries from debian/tmp
directory to their respective package directories in
'rules', say by using dh_movefiles? I am not sure how
the 'package to library mapping' can be specified in
the 'rules' when there are multiple packages.
Please help me out.
Regards,
Venkat.
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
Source: top-module
Maintainer: myname
Priority: optional
Build-Depends: libglib2.0-0, debhelper
Standards-Version: 3.5.9
Package: top-module
Section: misc
Architecture: i386
Description: Meta package.
Priority: optional
Depends: glib2.0-0, libmodule1, libmodule2, libmodule3, libmodule4, libmodule5
Package: libmodule1
Section: libs
Architecture: i386
Description: module1 is the base module used by all others.
Priority: optional
Depends: libglib2.0-0
Package: libmodule2
Section: libs
Architecture: i386
Description: module2
Priority: optional
Depends: libglib2.0-0, libmodule1
Package: libmodule3
Section: libs
Architecture: i386
Description: module3
Priority: optional
Depends: libglib2.0-0, libmodule1
Package: libmodule4
Section: libs
Architecture: i386
Description: module4
Priority: optional
Depends: libglib2.0-0, libmodule1
Package: libmodule5
Section: libs
Architecture: i386
Description: module5 depends on all other modules
Priority: optional
Depends: libglib2.0-0, libmodule1, libmodule2, libmodule3, libmodule4
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#export DH_OPTIONS
export DEB_BUILD_ARCH = i386-linux
export DEB_BUILD_GNU_SYSTEM = i386-linux
libpath=src/dir/module1/.libs:src/dir/module2/.libs:src/dir/module3/.libs:src/dir/module4/.libs:src/dir/module4/.libs
configure: configure-stamp
configure-stamp:
$(CURDIR)/configure
touch configure-stamp
build: configure build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
$(MAKE) \
LD_LIBRARY_PATH=$(libpath):$(LD_LIBRARY_PATH)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f configure-stamp build-stamp
# Add here commands to clean up after the build process.
$(MAKE) clean
$(MAKE) dist-clean
-rm -rf ${PACKAGE}
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/<packagename>
#$(MAKE) prefix=debian/`dh_listpackages` install
cd src/dir/module1
$(MAKE) install DESTDIR=$(CURDIR)debian/libmodule1
cd ../../../
cd src/dir/module2
$(MAKE) install DESTDIR=$(CURDIR)debian/libmodule2
cd ../../../
cd src/dir/module3
$(MAKE) install DESTDIR=$(CURDIR)/debian/libmodule3
cd ../../../
cd src/dir/module4
$(MAKE) install DESTDIR=$(CURDIR)/debian/libmodule4
cd ../../../
cd src/dir/module5
$(MAKE) install DESTDIR=$(CURDIR)/debian/libmodule5
cd ../../../
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_makeshlibs -plibmodule1 -plibmodule2 -plibmodule3 -plibmodule4 -plibmodule5
dh_shlibdeps -l$(libpath) -a
dh_gencontrol -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
Reply to: