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

Re: debian/files with multiple packages



On Sun, Jul 25, 1999 at 10:49:45AM -0500, Alexander Shinn wrote:
> I just split my package into three, seperating the info documentation
> and the library, and I'm having trouble building the .changes file.
> At the end of debuild, debian/files represents only the third package
> built.  What creates this file, and is there a special way of handling
> it for multiple packages with the same source?  Attached is my
> debian/rules.

Okay, there are a couple of problems:

The library can't be called 'libgst', it has to have the soname in the
package name, e.g. 'libgst1' or whatever is appropriate. This requires
you to change both rules and control file, and possibly other files thaat
reference it, if any. This is a policy requirement.

When you use debhelper, please use it, don't complicate stuff when you
can easily use dh_* tools to do it :) Instead of saying install -d ``cat
dirs`, simply make the "dirs" file which will contain directories you
need for the first package, the libgst0.dirs which will contain dirs that
libgst0 needs, and gst-doc.dirs which will... you know :)

That method works for the postinst and postrm scripts, too, i.e. you
should have postinst (for gnu-smalltalk package), gst-doc.postinst and
libgst0.postinst (obvious), and the same scheme for the postrm files.
Almost everything can be set up this way, and dh_* tools will read it
automagically.

Use dh_clean to clean the source tree completely from debhelper and
cruft - but when you use it in binary-* rules, then add th e"-k" option,
that will preserve the debian/files file, and fix your problem instantly.

I'm also attaching a modified copy of your rules file in case you didn't
understand how to apply any of the above. :) It may still have errors,
though, check it out.

If you have any more questions, just ask.

-- 
enJoy -*/\*- pronounced 'iosip', or simply 'joseph'
#!/usr/bin/make -f
# Based loosely on the debian/rules file used by vim.

package=gnu-smalltalk

build: build-stamp
build-stamp:
# Include blox until there is a seperate shlib module
	./modules blox
	./configure --prefix=/usr --with-readline --with-x
	$(MAKE) clean && $(MAKE) gst CFLAGS="-O2 -g -Wall"
# Create the documentation
	cd docs && $(MAKE) all
	touch build-stamp

clean:
	rm -f build-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean

binary-indep: build
#
# Create the gst-doc package
#
#   Initialize the building procedure
	dh_testdir
	dh_clean -k
#   Setup the directory structure
	dh_installdirs -pgst-doc
#   Install the info documentation
	cd docs && $(MAKE) install prefix=../debian/gst-doc/usr
#   Install the HTML documentation and build the package
	cp debian/dhelp debian/gst-doc/usr/doc/gnu-smalltalk/.dhelp
	dh_installdocs -pgst-doc docs/*.html
	dh_installchangelogs -pgst-doc
	dh_installdeb -pgst-doc
	dh_gencontrol -pgst-doc
	dh_md5sums -pgst-doc
	dh_builddeb -pgst-doc

binary-arch: build
#
# Create the gnu-smalltalk package
#
#   Initialize the building procedure
	dh_testdir
	dh_clean -k
#   Setup the directory structure
	dh_installdirs
	$(MAKE) install prefix=`pwd`/debian/tmp/usr
#   Install the other (Debian) stuff
	dh_installdocs
	dh_installchangelogs
	cp docs/gst.1 debian/tmp/usr/man/man1
	dh_strip
	dh_compress
	dh_installmenu
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb
#
# Now create the libgst0 package
#
#   Initialize the building procedure
	dh_testdir
	dh_clean -k
#   Setup the directory structure
	dh_installdirs -plibgst0
	cd lib && $(MAKE) install prefix=../debian/libgst0/usr
#   Install the other (Debian) stuff
	dh_installdocs -plibgst0
	dh_installchangelogs -plibgst0
	dh_compress -plibgst0
	dh_shlibdeps -plibgst0
	dh_installdeb -plibgst0
	dh_gencontrol -plibgst0
	dh_md5sums -plibgst0
	dh_builddeb -plibgst0

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean build

Reply to: