X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=rules;fp=rules;h=6c0179ee10419704490d20a99848ef66bd92254e;hb=051e3b1cda71a079d148b5e5bf51194454a6be93;hp=d95f0ce8bee5419a70897793de099765feee1919;hpb=f9d5e861b250654107c2c8a32704f408b7352711;p=tinyos-2.x.git 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