[Pkg-octave-commit] [octave-pkg-dev] 03/05: Install symlink for the NEWS file

Rafael Laboissière rlaboiss-guest at moszumanska.debian.org
Sun May 29 21:17:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

rlaboiss-guest pushed a commit to branch master
in repository octave-pkg-dev.

commit 295492f4b40dbe352b41383cfe800285688aef15
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Sun May 29 12:20:44 2016 -0300

    Install symlink for the NEWS file
    
    A new internal script caled "install-docs" is added in this commit.
    It is run by the make rule in octave-pkg.mk of the same name.  The
    NEWS file shipped in the Octave-Forge package, if it exists, is the
    target for the symbolic link place in /usr/share/doc/$package.
---
 debian/octave-pkg-dev.install |  1 +
 install-docs                  | 17 +++++++++++++++++
 octave-pkg.mk                 |  5 +----
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/debian/octave-pkg-dev.install b/debian/octave-pkg-dev.install
index a11536b..0b9b03a 100644
--- a/debian/octave-pkg-dev.install
+++ b/debian/octave-pkg-dev.install
@@ -4,3 +4,4 @@ make-octave-forge-debpkg        usr/bin
 check-version			usr/share/octave-pkg-dev
 install-pkg			usr/share/octave-pkg-dev
 check-pkg			usr/share/octave-pkg-dev
+install-docs			usr/share/octave-pkg-dev
diff --git a/install-docs b/install-docs
new file mode 100755
index 0000000..b3d83fb
--- /dev/null
+++ b/install-docs
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+### Install extra documentation
+if [ -d doc ] ; then
+    dh_installdocs -p$package;
+    rm -rf $debpkg/$mpath/*/doc
+fi
+
+### Install symlink for the NEWS file
+pkg_name=$(grep '^Name:' DESCRIPTION | cut -f2 -d: | sed 's/ //')
+pkg_version=$(grep '^Version:' DESCRIPTION | cut -f2 -d: | sed 's/ //')
+shr_dir=debian/$package/usr/share
+news=octave/packages/$pkg_name-$pkg_version/packinfo/NEWS
+if [ -f $shr_dir/$news ] ; then
+    dh_installdocs -p$package;
+    ln -fs ../../$news $shr_dir/doc/$package/
+fi
diff --git a/octave-pkg.mk b/octave-pkg.mk
index 1b39f16..8f785f9 100644
--- a/octave-pkg.mk
+++ b/octave-pkg.mk
@@ -97,10 +97,7 @@ clean-files::
 
 .PHONY: install-docs
 install-docs::
-	if [ -d doc ] ; then				\
-		dh_installdocs -p$(package);		\
-		rm -rf $(debpkg)/$(mpath)/*/doc ;	\
-	fi
+	$(libdir)/install-docs
 
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 # Compose the expression for exclusion of requested files from the find command

-- 
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-pkg-dev.git



More information about the Pkg-octave-commit mailing list