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

Patches for xlibmesa4-drm-src



Hi,

        I changed the $(MODULES_LOC)/debian/rules to craft a version
 number, tasking into account possible epochs in KDREV, and used that
 in a new  $(MODULES_LOC)/debian/changelog.m4. These changes allow for
 the presence of a epoch in the KDVERS var when called by make-kpkg;
 and also have the kdist_image target clean up after itself. 

	These are changes to fix problems that bit me, and problems
 that I happened to notice. I suppose one should go through this rules
 file to see of there are other deficiencies; unfortunately, this uses
 debhelper, and I am not familiar enough with the system to determine
 style issues.

        manoj

--- debian/rules.dist	2003-06-04 08:07:21.000000000 -0500
+++ debian/rules	2003-06-04 09:20:47.000000000 -0500
@@ -8,7 +8,16 @@
 # package.
 
 M4 = m4
-M4DEFINES = -DKVERS="$(KVERS)" -DKSRC="$(KSRC)" -DKEMAIL="$(KEMAIL)" -DKMAINT="$(KMAINT)" -DKDREV="$(KDREV)" -DDEBDATE="$(shell date -R)"
+DRM_VERSION:=4.3.0-0ds4
+MY_VERSION:=$(shell if echo "$(KDREV)"  | grep '^[0-9][0-9]*:' >/dev/null  ; then \
+                      j=$$(echo "$(KDREV)" | sed -e 's/:.*$$//');                   \
+                      k=$$(echo "$(KDREV)" | sed -e 's/^.*://');                   \
+                      echo "$$j:$(DRM_VERSION)+$$k";                              \
+                   else                                                           \
+                      echo $(DRM_VERSION)+"$(KDREV)";                             \
+                   fi)
+
+M4DEFINES = -DMYVERSION="$(MY_VERSION)" -DKVERS="$(KVERS)" -DKSRC="$(KSRC)" -DKEMAIL="$(KEMAIL)" -DKMAINT="$(KMAINT)" -DKDREV="$(KDREV)" -DDEBDATE="$(shell date -R)"
 
 # We are called from make-kpkg through one of the targets kdist,
 # kdist_configure, kdist_changes or kdist_image
@@ -98,6 +107,8 @@
 	dh_gencontrol
 	dh_md5sums
 	dh_builddeb --destdir=$(KSRC)/..
+	dh_clean -k
+	$(MAKE) -f debian/rules clean
 
 kdist: kdist_image
 	@echo >&2 'kdist- not implemented'
--- debian/changelog.m4.dist	2003-06-04 08:24:57.000000000 -0500
+++ debian/changelog.m4	2003-06-04 08:30:42.000000000 -0500
@@ -1,4 +1,4 @@
-xlibmesa4-drm-module-KVERS (4.3.0-0ds4+KDREV) unstable; urgency=low
+xlibmesa4-drm-module-KVERS (MYVERSION) unstable; urgency=low
 
   * Built from xlibmesa4-drm-src.
 
-- 
The worst cliques are those which consist of one man. G.B. Shaw
Manoj Srivastava     <srivasta@acm.org>    <http://www.golden-gryphon.com/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

Reply to: