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

Re: announcing apt-src



Matt Zimmerman wrote:
> On Tue, Jun 18, 2002 at 11:24:24PM -0400, Joey Hess wrote:
> 
> > Let me know what you think.
> 
> Sounds fantastic.  Are you planning to add the capability to build kernel
> modules with it?  That seems like one of the more common source-build tasks.
> I assume this would mean handling kernel source as a source package, instead
> of a binary package.

Here is a rules file for a source-only kernel module package. For a
modules package rules file, this is rather more comprehensible than
most, I think:

(untested much)

#!/usr/bin/make -f

# This rules file is invoked in two ways. Either I am building a
# source-only release of the package to upload to the debian archive, or
# the package is being built as a kernel module by make-kpkg.

# Remove any epoch from kvers, as an epoch is not allowed in a package
# name. This variable is passed in by make-kpkg.
KVERS:=$(shell echo $(KVERS) | perl -pe 's/^\d+://')

# These targets are used when building the source package:
clean:
	dh_testdir
	dh_testroot
	-$(MAKE) clean
	dh_clean

# Nothing to do as only a source package is made.
build:

# Have to stub in a debian/files here to keep dpkg-genchanges happy.
binary-arch:
	touch debian/files

binary-indep:
binary: binary-indep binary-arch

# These targets are used by make-kpkg:
kdist_config:
	./Configure -n --kernel=$(KSRC) --target=`pwd`/debian/poldhu-$(KVERS)

kdist_build:
	dh_testdir
	$(MAKE) all

kdist_clean: clean

# Make debhelper use the right package name.
export DH_OPTIONS
kdist_image: DH_OPTIONS=-p poldhu-$(KVERS)
kdist_image: kdist_config kdist_build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs etc/pcmcia
	$(MAKE) install
	dh_installchangelogs
	dh_installdocs README TODO
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	# Set kvers so substitutions in control file work. Also, use the -D
	# to override the Package: line in the control file, with the real
	# versioned package name. The -p is there to override the wrong -p
	# debhelper gives it..
	dh_gencontrol -- -Vkvers=$(KVERS) -ppoldhu -DPackage=poldhu-$(KVERS)
	dh_md5sums
	dh_builddeb

.PHONY: build clean binary-indep binary-arch binary
.PHONY: kdist_config kdist_build kdist_clean kdist_image

-- 
see shy jo


-- 
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: