From 051e3b1cda71a079d148b5e5bf51194454a6be93 Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Thu, 3 Dec 2009 17:17:25 -0700 Subject: [PATCH] Working on a solution for allowing multiple tinyos-source packages to be installed at the same time, but ensuring that at least one is installed. --- control | 15 ++++++++++----- rules | 28 ++++++++++++++++++---------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/control b/control index 4578b842..a0658103 100644 --- a/control +++ b/control @@ -10,7 +10,8 @@ Build-Depends: dpkg-dev (>= 1.13.9), autoconf (>= 2.13), automake, bison, flex, Package: tinyos Architecture: all -Depends: tinyos-tools (>= 1.3.0), deputy-tinyos (>= 1.1), tinyos-root, tinyos-toolchain +Depends: tinyos-tools (>= 1.3.0), deputy-tinyos (>= 1.1), tinyos-source-2.1.0-2, + tinyos-toolchain Conflicts: Priority: extra Description: Main TinyOS package @@ -26,18 +27,22 @@ Description: Development support tools for TinyOS nesdoc. The source for these tools is found in the TinyOS CVS repository under tinyos-2.x/tools. -Package: tinyos-source +Package: tinyos-source-2.1.0-2 Architecture: all Depends: -Provides: tinyos-root +Provides: tinyos-source Conflicts: Priority: extra Description: TinyOS source code tree - TinyOS source is required to compile TinyOS applications. + TinyOS source is required to compile TinyOS applications. This package + provides TinyOS release 2.1.0 enhanced with TMI updates, version + 2. You may have multiple tinyos-source packages installed at one + time. Package: tinyos-avr Architecture: all -Depends: avr-tinyos-base, avr-binutils-tinyos, avr-gcc-tinyos, avr-libc-tinyos, avrdude-tinyos +Depends: avr-tinyos-base, avr-binutils-tinyos, avr-gcc-tinyos, avr-libc-tinyos, + avrdude-tinyos Provides: tinyos-toolchain Conflicts: Priority: extra diff --git a/rules b/rules index d95f0ce8..6c0179ee 100755 --- a/rules +++ b/rules @@ -33,6 +33,13 @@ dtmp := debian/tmp # build directory before running configure. tempdir := $(shell tempfile $(PACKAGE)) version := $(shell head -1 debian/changelog | sed -e s'|^.*(\(.*\)-.*).*$$|\1|') +tosver := $(shell echo $(version) | sed -e s'|-.*||') +tmiver := $(shell echo $(version) | sed -e s'|^.*-||') + +debian-control: debian/control.in + sed -e 's/RELEASE-VERSION/$(version)/g' < $^ | \ + sed -e 's/TOS-VERSION/$(tosver)/g' | \ + sed -e 's/TMI-VERSION/$(tmiver)/g' > debian/control configure-stamp: $(checkdir) @@ -105,18 +112,19 @@ binary-arch: checkroot build install tools/release/extractor $(dtmp)/$(srcpkg)/opt/tinyos/$(version) < \ tools/release/tinyos.files >/dev/null $(install_dir) $(dtmp)/$(srcpkg)/usr/share/lintian/overrides - $(install_file) debian/$(srcpkg).lintian-overrides \ - $(dtmp)/$(srcpkg)/usr/share/lintian/overrides/$(srcpkg) - $(install_dir) $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)/ + sed -e 's/RELEASE-VERSION/$(version)/g' \ + < debian/$(srcpkg).lintian-overrides \ + > $(dtmp)/$(srcpkg)/usr/share/lintian/overrides/$(srcpkg)-$(version) + $(install_dir) $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)-$(version)/ $(install_file) debian/changelog \ - $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)/changelog.Debian + $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)-$(version)/changelog.Debian $(install_file) debian/copyright \ - $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)/ + $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)-$(version)/ $(install_file) tools/README debian/README.Debian \ - $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)/ - find $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg) -type f \ + $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)-$(version)/ + find $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)-$(version) -type f \ ! -name copyright | xargs gzip -9 - dpkg-gencontrol -isp -P$(dtmp)/$(srcpkg) -p$(srcpkg) + dpkg-gencontrol -isp -P$(dtmp)/$(srcpkg) -p$(srcpkg)-$(version) chown -R root:root $(dtmp)/$(srcpkg) chmod -R go=rX $(dtmp)/$(srcpkg) dpkg --build $(dtmp)/$(srcpkg) .. @@ -175,7 +183,7 @@ binary-arch: checkroot build install binary: binary-indep binary-arch -clean: +clean: debian-control $(checkdir) -rm -rf $(dtmp) -rm -fr debian/files* debian/substvars @@ -192,4 +200,4 @@ checkroot: test root = "`whoami`" -.PHONY: binary clean checkroot +.PHONY: binary clean checkroot debian-control -- 2.39.2