]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Update the debian build for smarter tinyos-source package handling.
authorR. Steve McKown <rsmckown@gmail.com>
Fri, 4 Dec 2009 21:09:33 +0000 (14:09 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Fri, 4 Dec 2009 21:10:12 +0000 (14:10 -0700)
control
control.in [new file with mode: 0644]
rules
tinyos-source.lintian-overrides

diff --git a/control b/control
index a06581033ae412128af45c8e78e641281f254e7d..7dfc559f65076d106c4d7f9da9c0271076622956 100644 (file)
--- a/control
+++ b/control
@@ -10,12 +10,13 @@ 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-source-2.1.0-2,
+Depends: tinyos-tools (>= 1.3.0), deputy-tinyos (>= 1.1), tinyos-source,
   tinyos-toolchain
 Conflicts:
 Priority: extra
 Description: Main TinyOS package
- To install TinyOS, install this package.
+ To install TinyOS, install this package.  To remove TinyOS, remove this
+ package.
 
 Package: tinyos-tools
 Architecture: any
@@ -27,17 +28,26 @@ 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
+Architecture: all
+Depends: tinyos-source-2.1.0-2
+Conflicts:
+Priority: extra
+Description: TinyOS source meta package
+ This package installs the latest tinyos source tree package,
+ tinyos-source-2.1.0-2, when you install or upgrade the tinyos package.
+ Command line users may need to issue 'apt-get dist-upgrade' if you see the
+ message that tinyos-source is being held back.
+
 Package: tinyos-source-2.1.0-2
 Architecture: all
-Depends:
 Provides: tinyos-source
+Depends: tinyos
 Conflicts:
 Priority: extra
 Description: TinyOS source code tree
- 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.
+ Provides the official TinyOS 2.1.0 release source tree with TMI version
+ 2 enhancements.
 
 Package: tinyos-avr
 Architecture: all
diff --git a/control.in b/control.in
new file mode 100644 (file)
index 0000000..b7e2cc5
--- /dev/null
@@ -0,0 +1,71 @@
+Source: tinyos
+Section: devel
+Priority: optional
+Maintainer: R. Steve McKown <rsmckown@gmail.com>
+Standards-Version: 3.7.2.0
+Build-Depends: dpkg-dev (>= 1.13.9), autoconf (>= 2.13), automake, bison, flex,
+  gettext, texinfo, binutils (>= 2.9.5.0.12), gcc (>= 4:4.2.2),
+  dejagnu (>= 1.4.2-1.1), dpatch, file, bzip2, lsb-release, nesc (>= 1.3.0),
+  libc6-dev-i386 [amd64], gcc-multilib [amd64], g++-multilib [amd64], emacs
+
+Package: tinyos
+Architecture: all
+Depends: tinyos-tools (>= 1.3.0), deputy-tinyos (>= 1.1), tinyos-source,
+  tinyos-toolchain
+Conflicts:
+Priority: extra
+Description: Main TinyOS package
+ To install TinyOS, install this package.  To remove TinyOS, remove this
+ package.
+
+Package: tinyos-tools
+Architecture: any
+Depends: python, python-serial, nesc (>= 1.3.0), ${shlibs:Depends}
+Conflicts:
+Priority: extra
+Description: Development support tools for TinyOS
+ Includes various support tools, including uisp, motelist, pybsl, mig, ncc and
+ nesdoc. The source for these tools is found in the TinyOS CVS repository
+ under tinyos-2.x/tools.
+
+Package: tinyos-source
+Architecture: all
+Depends: tinyos-source-RELEASE-VERSION
+Conflicts:
+Priority: extra
+Description: TinyOS source meta package
+ This package installs the latest tinyos source tree package,
+ tinyos-source-RELEASE-VERSION, when you install or upgrade the tinyos package.
+ Command line users may need to issue 'apt-get dist-upgrade' if you see the
+ message that tinyos-source is being held back.
+
+Package: tinyos-source-RELEASE-VERSION
+Architecture: all
+Provides: tinyos-source
+Depends: tinyos
+Conflicts:
+Priority: extra
+Description: TinyOS source code tree
+ Provides the official TinyOS TOS-VERSION release source tree with TMI version
+ TMI-VERSION enhancements.
+
+Package: tinyos-avr
+Architecture: all
+Depends: avr-tinyos-base, avr-binutils-tinyos, avr-gcc-tinyos, avr-libc-tinyos,
+  avrdude-tinyos
+Provides: tinyos-toolchain
+Conflicts:
+Priority: extra
+Description: TinyOS avr toolchain
+ This dummy package allows for easy installation of the avr toolchain
+ for building TinyOS applications for avr microprocessor based systems.
+
+Package: tinyos-msp430
+Architecture: all
+Depends: msp430-binutils, msp430-gcc, msp430-libc
+Provides: tinyos-toolchain
+Conflicts:
+Priority: extra
+Description: TinyOS msp430 toolchain
+ This dummy package allows for easy installation of the msp430 toolchain
+ for building TinyOS applications for msp430 microprocessor based systems.
diff --git a/rules b/rules
index 6c0179ee10419704490d20a99848ef66bd92254e..aaf038406dc7efd555b0c25f152a7cef848e4bf7 100755 (executable)
--- a/rules
+++ b/rules
@@ -9,9 +9,14 @@
 # paternity under the Copyright, Designs and Patents Act 1988.)
 # This file may have to be extensively modified
 
+version := $(shell head -1 debian/changelog | sed -e s'|^.*(\(.*\)-.*).*$$|\1|')
+tosver := $(shell echo $(version) | sed -e s'|-.*||')
+tmiver := $(shell echo $(version) | sed -e s'|^.*-||')
+
 package = tinyos
 toolspkg = $(package)-tools
-srcpkg = $(package)-source
+srcmetapkg = $(package)-source
+srcpkg = $(srcmetapkg)-$(version)
 msppkg = tinyos-msp430
 avrpkg = tinyos-avr
 
@@ -32,12 +37,9 @@ dtmp := debian/tmp
 # For now, the solution is quite hackish: copy the source directory to the
 # 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' < $^ | \
+debian/control: debian/control.in debian/changelog
+       sed -e 's/RELEASE-VERSION/$(version)/g' < $< | \
                sed -e 's/TOS-VERSION/$(tosver)/g' | \
                sed -e 's/TMI-VERSION/$(tmiver)/g' > debian/control
 
@@ -76,9 +78,27 @@ binary-indep: checkroot build install
 
 binary-arch: checkroot build install
        $(checkdir)
-       : # install maintainer scripts
+
+       : # Build the tinyos package too
+       rm -rf $(dtmp)/$(package)
+       $(install_dir) $(dtmp)/$(package)/DEBIAN
+       $(install_dir) $(dtmp)/$(package)/opt/tinyos
+       $(install_file) tinyos.sh $(dtmp)/$(package)/opt/tinyos
+       $(install_dir) $(dtmp)/$(package)/usr/share/lintian/overrides
+       $(install_file) debian/$(package).lintian-overrides \
+               $(dtmp)/$(package)/usr/share/lintian/overrides/$(package)
+       $(install_dir) $(dtmp)/$(package)/usr/share/doc/$(package)/
+       $(install_file) debian/copyright \
+               $(dtmp)/$(package)/usr/share/doc/$(package)/
+       $(install_file) tools/README debian/README.Debian \
+               $(dtmp)/$(package)/usr/share/doc/$(package)/
+       dpkg-gencontrol -isp -P$(dtmp)/$(package) -p$(package)
+       chown -R root:root $(dtmp)/$(package)
+       chmod -R go=rX  $(dtmp)/$(package)
+       dpkg --build $(dtmp)/$(package) ..
+
+       : # Build the tinyos-tools package
        $(install_dir) $(dtmp)/$(toolspkg)/DEBIAN
-       : # install docs
        $(install_dir) $(dtmp)/$(toolspkg)/usr/share/doc/$(toolspkg)/
        $(install_file) debian/changelog \
                $(dtmp)/$(toolspkg)/usr/share/doc/$(toolspkg)/changelog.Debian
@@ -86,17 +106,12 @@ binary-arch: checkroot build install
                $(dtmp)/$(toolspkg)/usr/share/doc/$(toolspkg)/
        $(install_file) tools/README debian/README.Debian \
                $(dtmp)/$(toolspkg)/usr/share/doc/$(toolspkg)/
-       : # Remove unnecessary files installed
-       : # Create links
-       : # Compress stuff that needs it
        gzip -9 $(dtmp)/$(toolspkg)/usr/share/man/man1/*
        find $(dtmp)/$(toolspkg)/usr/share/doc/$(toolspkg) -type f \
                ! -name copyright | xargs gzip -9
-       : # Set overrides
        $(install_dir) $(dtmp)/$(toolspkg)/usr/share/lintian/overrides
        $(install_file) debian/$(toolspkg).lintian-overrides \
                $(dtmp)/$(toolspkg)/usr/share/lintian/overrides/$(toolspkg)
-       : # Finish it all up
        find $(dtmp)/$(toolspkg) -type f | xargs file | grep ELF | \
                cut -d: -f 1 | xargs dpkg-shlibdeps
        dpkg-gencontrol -isp -P$(dtmp)/$(toolspkg) -p$(toolspkg)
@@ -104,7 +119,21 @@ binary-arch: checkroot build install
        chmod -R go=rX  $(dtmp)/$(toolspkg)
        dpkg --build $(dtmp)/$(toolspkg) ..
 
-       : # Build the tinyos-source package
+       : # Build the tinyos-source meta package
+       rm -rf $(dtmp)/$(srcmetapkg)
+       $(install_dir) $(dtmp)/$(srcmetapkg)/DEBIAN
+       $(install_dir) $(dtmp)/$(srcmetapkg)/usr/share/lintian/overrides
+       $(install_file) debian/$(srcmetapkg).lintian-overrides \
+               $(dtmp)/$(srcmetapkg)/usr/share/lintian/overrides/$(srcmetapkg)
+       $(install_dir) $(dtmp)/$(srcmetapkg)/usr/share/doc/$(srcmetapkg)/
+       $(install_file) debian/copyright \
+               $(dtmp)/$(srcmetapkg)/usr/share/doc/$(srcmetapkg)/
+       dpkg-gencontrol -isp -P$(dtmp)/$(srcmetapkg) -p$(srcmetapkg)
+       chown -R root:root $(dtmp)/$(srcmetapkg)
+       chmod -R go=rX  $(dtmp)/$(srcmetapkg)
+       dpkg --build $(dtmp)/$(srcmetapkg) ..
+
+       : # Build the tinyos-source-VERSION package
        rm -rf $(dtmp)/$(srcpkg)
        $(install_dir) $(dtmp)/$(srcpkg)/DEBIAN
        $(install_dir) $(dtmp)/$(srcpkg)/opt/tinyos
@@ -112,41 +141,22 @@ 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
-       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/$(srcmetapkg).lintian-overrides \
+               $(dtmp)/$(srcpkg)/usr/share/lintian/overrides/$(srcpkg)
+       $(install_dir) $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)/
        $(install_file) debian/changelog \
-               $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)-$(version)/changelog.Debian
+               $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)/changelog.Debian
        $(install_file) debian/copyright \
-               $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)-$(version)/
+               $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)/
        $(install_file) tools/README debian/README.Debian \
-               $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)-$(version)/
-       find $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)-$(version) -type f \
+               $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg)/
+       find $(dtmp)/$(srcpkg)/usr/share/doc/$(srcpkg) -type f \
                ! -name copyright | xargs gzip -9
-       dpkg-gencontrol -isp -P$(dtmp)/$(srcpkg) -p$(srcpkg)-$(version)
+       dpkg-gencontrol -isp -P$(dtmp)/$(srcpkg) -p$(srcpkg)
        chown -R root:root $(dtmp)/$(srcpkg)
        chmod -R go=rX  $(dtmp)/$(srcpkg)
        dpkg --build $(dtmp)/$(srcpkg) ..
 
-       : # Build the tinyos package too
-       rm -rf $(dtmp)/$(package)
-       $(install_dir) $(dtmp)/$(package)/DEBIAN
-       $(install_dir) $(dtmp)/$(package)/opt/tinyos
-       $(install_file) tinyos.sh $(dtmp)/$(package)/opt/tinyos
-       $(install_dir) $(dtmp)/$(package)/usr/share/lintian/overrides
-       $(install_file) debian/$(package).lintian-overrides \
-               $(dtmp)/$(package)/usr/share/lintian/overrides/$(package)
-       $(install_dir) $(dtmp)/$(package)/usr/share/doc/$(package)/
-       $(install_file) debian/copyright \
-               $(dtmp)/$(package)/usr/share/doc/$(package)/
-       $(install_file) tools/README debian/README.Debian \
-               $(dtmp)/$(package)/usr/share/doc/$(package)/
-       dpkg-gencontrol -isp -P$(dtmp)/$(package) -p$(package)
-       chown -R root:root $(dtmp)/$(package)
-       chmod -R go=rX  $(dtmp)/$(package)
-       dpkg --build $(dtmp)/$(package) ..
-
        : # Build tinyos-msp430 dummy package
        rm -rf $(dtmp)/$(msppkg)
        $(install_dir) $(dtmp)/$(msppkg)/DEBIAN
@@ -183,7 +193,7 @@ binary-arch: checkroot build install
 binary: binary-indep binary-arch
 
 
-clean: debian-control
+clean: debian/control
        $(checkdir)
        -rm -rf $(dtmp)
        -rm -fr debian/files* debian/substvars
@@ -200,4 +210,4 @@ checkroot:
        test root = "`whoami`"
 
 
-.PHONY: binary clean checkroot debian-control
+.PHONY: binary clean checkroot
index 5d9719c2396399e7b80b98e285756d3eff5575ea..3f9e5a38c672013bb07ff4e1c538f8d0a568d171 100644 (file)
@@ -1 +1,2 @@
 dir-or-file-in-opt
+debian-changelog-file-missing