r136 - unstable/rt73/debian

benh at alioth.debian.org benh at alioth.debian.org
Mon Jun 23 03:41:44 UTC 2008


Author: benh
Date: 2008-06-23 03:41:43 +0000 (Mon, 23 Jun 2008)
New Revision: 136

Added:
   unstable/rt73/debian/control.modules.in
   unstable/rt73/debian/rules.modules
Removed:
   unstable/rt73/debian/modules.packages
Modified:
   unstable/rt73/debian/packages
Log:
Use debhelper and m-a makefile to build modules, avoiding the need to rebuild debian/rules. Closes: #464407.
(Sorry Piotr, I think you will need to extend yada to make it handle this properly.)


Added: unstable/rt73/debian/control.modules.in
===================================================================
--- unstable/rt73/debian/control.modules.in	                        (rev 0)
+++ unstable/rt73/debian/control.modules.in	2008-06-23 03:41:43 UTC (rev 136)
@@ -0,0 +1,18 @@
+Source: rt73
+Section: net
+Priority: extra
+Build-Depends: debhelper (>= 4.0.0)
+Maintainer: Debian Ralink packages maintainers <pkg-ralink-maintainers at lists.alioth.debian.org>
+Uploaders: Piotr Roszatycki <dexter at debian.org>
+Standards-Version: 3.7.2
+Homepage: http://rt2x00.serialmonkey.com/
+
+Package: rt73-modules-_KVERS_
+Architecture: any
+Recommends: linux-image-_KVERS_, wireless-tools, firmware-ralink
+Suggests: rutilt
+Description: rt73 wireless network driver
+ This package contains the rt73 driver for Linux _KVERS_.
+ .
+ This driver supports USB wireless network cards with the Ralink
+ RT2501USB chipset.

Deleted: unstable/rt73/debian/modules.packages
===================================================================
--- unstable/rt73/debian/modules.packages	2008-06-23 03:28:56 UTC (rev 135)
+++ unstable/rt73/debian/modules.packages	2008-06-23 03:41:43 UTC (rev 136)
@@ -1,78 +0,0 @@
-%define KSRC %{?$KSRC:%{$KSRC}}%{!?$KSRC:/usr/src/linux}
-%define KVERS %{?$KVERS:%{$KVERS}}%{!?$KVERS:%`sed -n -e '/UTS_RELEASE/s/^[^"]*"\([^"]*\)".*$/\1/p' %{KSRC}/include/linux/version.h 2>/dev/null || echo "UNKNOWN"`}
-%define KDREV %{?$KDREV:%{$KDREV}}%{!?$KDREV:UNKNOWN}
-
-Source: rt73-source
-Section: net
-Priority: extra
-Maintainer: Debian Ralink packages maintainers <pkg-ralink-maintainers at lists.alioth.debian.org>
-Uploaders: Piotr Roszatycki <dexter at debian.org>
-Standards-Version: 3.7.2
-Upstream-Source: http://rt2x00.serialmonkey.com/wiki/index.php?title=Downloads
-%if %`dpkg --compare-versions %{YADA_VERSION} ge 0.54 && echo 1`
-Homepage: http://rt2x00.serialmonkey.com/
-Vcs-Browser: http://svn.debian.org/wsvn/pkg-ralink/unstable/rt73/trunk
-Vcs-Svn: svn://svn.debian.org/pkg-ralink/unstable/rt73/trunk
-%endif
-Description: RT73(RT2571W) Wireless Lan Linux Driver - kernel module sources
- This is a Linux device driver for Ralink RT73 a/b/g WLAN Card.
-Copyright: GPL
- RT2x00 SourceForge Project - http://rt2x00.serialmonkey.com
- .
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- .
- Licensed under the GNU GPL
- Original code supplied under license from RaLink Inc, 2004.
-Build-Depends: module-assistant, bzip2
-%if %`test -x debian/yada || echo 1`
-Build-Depends: yada
-%endif
-Build: sh
- CC=${CC:-gcc}
- make -C %{KSRC} SUBDIRS=$(pwd) modules
-Clean: sh
- make clean || true
-
-Package: rt73-modules-%{KVERS}
-Architecture: any
-Depends: rt73-common
-Recommends: firmware-ralink
-%if %{KDREV}
-Recommends: linux-image-%{KVERS} (= %{KDREV})
-%else
-Recommends: linux-image-%{KVERS}
-%endif
-Recommends: wireless-tools
-Suggests: rutilt
-Provides: rt73-modules
-Description: RT73(RT2571W) Wireless Lan Linux Driver - kernel module
- This package provides kernel module for Linux %{KVERS}
-Install: sh
- if [ -f %{KSRC}/scripts/Makefile.modinst ]; then
-     MODEXT=ko
- else
-     MODEXT=o
- fi
- .
- yada install -lib -unstripped -into /lib/modules/%{KVERS}/kernel/drivers/net/wireless \
-    -as rt73.$MODEXT rt73.ko
- yada install -doc -as README.Debian debian/README
-Postinst: sh
- if [ "$1" = "configure" ]; then
-     if [ -e /boot/System.map-%{KVERS} ]; then
-         depmod -a -F /boot/System.map-%{KVERS} %{KVERS} || true
-     fi
- fi
-Postrm: sh
- if [ -e /boot/System.map-%{KVERS} ]; then
-     depmod -a -F /boot/System.map-%{KVERS} %{KVERS} || true
- fi
-Contains: unstripped kernel-modules
-
-# Debug:
-#   KSRC=%{KSRC}
-#   KVERS=%{KVERS}
-#   KDREV=%{KDREV}

Modified: unstable/rt73/debian/packages
===================================================================
--- unstable/rt73/debian/packages	2008-06-23 03:28:56 UTC (rev 135)
+++ unstable/rt73/debian/packages	2008-06-23 03:41:43 UTC (rev 136)
@@ -47,16 +47,10 @@
  cp -a Module/* modules/rt73
  chmod -x modules/rt73/*
  mkdir -p modules/rt73/debian
- sed 's/^rt73/rt73-source/' debian/changelog > modules/rt73/debian/changelog
- cp -a debian/modules.packages modules/rt73/debian/packages
+ cp -a debian/changelog debian/*.modules.in modules/rt73/debian/
+ cp -a debian/rules.modules modules/rt73/debian/rules
+ chmod a+rx modules/rt73/debian/rules
  cp -a debian/README.modules modules/rt73/debian/README
-%if %{is_yada_bundled}
- cp -a debian/yada modules/rt73/debian
-%endif
- pushd modules/rt73
-     %{YADA_COMMAND} rebuild
-     debian/rules clean
- popd
  tar jcf rt73.tar.bz2 modules
  eval pod2man $(grep '^# pod2man ' debian/scripts/update-rt73-firmware.sh | sed 's/^# pod2man //') \
      debian/scripts/update-rt73-firmware.sh \
@@ -68,10 +62,7 @@
 
 Package: rt73-source
 Architecture: all
-Depends: module-assistant, bzip2
-%if %{!?is_yada_bundled:1}
-Depends: yada
-%endif
+Depends: module-assistant, bzip2, debhelper
 Recommends: rt73-common
 Recommends: firmware-ralink
 Recommends: wireless-tools

Added: unstable/rt73/debian/rules.modules
===================================================================
--- unstable/rt73/debian/rules.modules	                        (rev 0)
+++ unstable/rt73/debian/rules.modules	2008-06-23 03:41:43 UTC (rev 136)
@@ -0,0 +1,43 @@
+#!/usr/bin/make -f
+
+export DH_COMPAT := 4
+
+MA_DIR ?= /usr/share/modass
+# load generic variable handling
+include $(MA_DIR)/include/generic.make
+# load default rules
+include $(MA_DIR)/include/common-rules.make
+
+.PHONY: kdist_config
+kdist_config: prep-deb-files
+
+.PHONY: binary_modules binary-modules
+binary-modules: binary_modules
+binary_modules: kdist_config
+
+	# Install module
+	dh_installdirs lib/modules/$(KVERS)/kernel/drivers/net/wireless
+
+	# Build modules
+	$(MAKE) KERNDIR=$(KSRC) PATCHLEVEL=6
+	install -m 0644 rt73.ko $(CURDIR)/debian/rt73-modules-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/net/wireless
+
+	dh_testdir
+	dh_testroot
+	dh_installdocs 
+	dh_installmodules
+	dh_installchangelogs CHANGELOG
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol -- -v$(VERSION)
+	dh_md5sums
+	dh_builddeb --destdir=$(DEB_DESTDIR)
+
+.PHONY: kdist_clean
+kdist_clean:
+	touch config.mk \
+		&& $(MAKE) clean
+	-dh_clean




More information about the Pkg-ralink-commits mailing list