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

Re: Intend to package, create OSS/Free



Hi,
>>"Hamish" == Hamish Moffatt <hamish@debian.org> writes:


 >> /usr/src/modules/<mod-name>/, and runs ./debian/rules <target>. 
 >> Additionally, the following information is provided in the
 >> environment:
 >> a) KVERS  Contains the kernel version
 >> b) KSRC   Contains the location of the kernel sources 
 >> c) KMAINT Contains the Name of the maintainer to pass to PGP
 >> d) KEMAIL Caontains the email address of the maintainer

 Hamish> How is the package version number passed?

	<confused> What package are you talking about here? 

 Hamish> Also, I'm terrible with make. Is there an easy way to test that
 Hamish> the four variables above have been provided and abort if not?

	Hmm, there are several ways. Off the top of my head:

______________________________________________________________________
VAR_DEFINED=(shell if test "X$$KVERS" = "X" -o "X$$KSRC" = "X" ... \
                   ; then echo NO; fi)

ifeq ($(strip $(VAR_DEFINED)),)
# Hah! No variable defined!!
build configure clean binary modules modules_image modules_config\
other target:
        @echo "You need to define the env variables KVERS ...
else
all build: configure
# Builds the binary package.
# debian.config contains the current idea of what the image should
# have.

	SNIP

endif
______________________________________________________________________

	Look at /usr/lib/kernel-package/rules for other tricks.

	manoj

-- 
 What is mind?  No matter.  What is matter?  Never mind. Thomas Hewitt
 Key, 1799-1875
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


Reply to: