]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Working on a solution for allowing multiple tinyos-source packages to be installed...
authorR. Steve McKown <rsmckown@gmail.com>
Fri, 4 Dec 2009 00:17:25 +0000 (17:17 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Fri, 4 Dec 2009 00:17:25 +0000 (17:17 -0700)
control
rules

diff --git a/control b/control
index 4578b842ad500c517b51429fa87177a651e49567..a06581033ae412128af45c8e78e641281f254e7d 100644 (file)
--- 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 d95f0ce8bee5419a70897793de099765feee1919..6c0179ee10419704490d20a99848ef66bd92254e 100755 (executable)
--- 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