[Pkg-octave-commit] r1264 - in octave-pkg-dev/trunk: . debian

Rafael Laboissiere rafael at alioth.debian.org
Mon Feb 25 15:32:13 UTC 2008


Author: rafael
Date: 2008-02-25 15:32:13 +0000 (Mon, 25 Feb 2008)
New Revision: 1264

Added:
   octave-pkg-dev/trunk/octave-pkg-dev.mk.in
   octave-pkg-dev/trunk/octave-pkg-dev.pl.in
   octave-pkg-dev/trunk/postinst.in
   octave-pkg-dev/trunk/prerm.in
Removed:
   octave-pkg-dev/trunk/octave-pkg-dev.mk
Modified:
   octave-pkg-dev/trunk/debian/install
   octave-pkg-dev/trunk/debian/rules
Log:
* Add template files for the debian/rules scrap (octave-pkg-dev.mk.in)
  and for the postinst (postinst.in) and prerm (prerm.in)
  scripts. This templates are processed by a pattern rule in
  debian/rules.
* Add a "debhelper" script (octave-pkg-dev.pl.in) which:
  + generates the octave:Depends variable for debian/control
  + adds postinst and prerm scripts to the package
* octave-pkg-dev.mk.in (renamed from octave-pkg-dev.mk):
  + call octave-pkg-dev.pl in build rule
  + code cleanup

Modified: octave-pkg-dev/trunk/debian/install
===================================================================
--- octave-pkg-dev/trunk/debian/install	2008-02-25 09:32:01 UTC (rev 1263)
+++ octave-pkg-dev/trunk/debian/install	2008-02-25 15:32:13 UTC (rev 1264)
@@ -1 +1,4 @@
-octave-pkg-dev.mk usr/share/octave/debian/
+octave-pkg-dev.mk	usr/share/octave/debian/
+octave-pkg-dev.pl	usr/share/octave/debian/
+postinst		usr/share/octave/debian/
+prerm			usr/share/octave/debian/

Modified: octave-pkg-dev/trunk/debian/rules
===================================================================
--- octave-pkg-dev/trunk/debian/rules	2008-02-25 09:32:01 UTC (rev 1263)
+++ octave-pkg-dev/trunk/debian/rules	2008-02-25 15:32:13 UTC (rev 1264)
@@ -3,4 +3,16 @@
 #
 # debian/rules for the octave-pkg-dev Debian package
 
+OCTPKG = octave3.0
+OCTVER = 3.0.0
+FILES = octave-pkg-dev.mk octave-pkg-dev.pl postinst prerm
+
 include /usr/share/cdbs/1/rules/debhelper.mk
+
+%: %.in
+	sed 's/@PACKAGE@/$(OCTPKG)/;s/@VERSION@/$(OCTVER)/' < $< > $@
+
+build/octave-pkg-dev:: $(FILES)
+
+clean::
+	rm -f $(FILES)

Deleted: octave-pkg-dev/trunk/octave-pkg-dev.mk
===================================================================
--- octave-pkg-dev/trunk/octave-pkg-dev.mk	2008-02-25 09:32:01 UTC (rev 1263)
+++ octave-pkg-dev/trunk/octave-pkg-dev.mk	2008-02-25 15:32:13 UTC (rev 1264)
@@ -1,20 +0,0 @@
-# -*- makefile -*-
-
-include /usr/share/cdbs/1/rules/debhelper.mk
-
-filename = $(wildcard *.gz)
-package = $(shell awk '/^Package:/ {print tolower($$2)}' debian/control)
-mpath = usr/share/octave/packages
-bpath = usr/lib/octave/packages
-pkgname = $(filename:.tar.gz=)
-
-build/$(package)::
-	mkdir -p $(CURDIR)/debian/$(package)/$(mpath)
-	mkdir -p $(CURDIR)/debian/$(package)/$(bpath)
-	octave -f -H -q --no-site-file --eval \
-	"pkg('prefix',[pwd(),'/debian/$(package)/$(mpath)'], \
-	 [pwd(),'/debian/$(package)/$(bpath)']); \
-	 pkg('local_list',[pwd(),'.']); \
-	 pkg('global_list',[pwd(),'.']); \
-	 pkg install $(filename)"
-	rm -f $(CURDIR)/debian/$(package)/$(mpath)/$(pkgname)/packinfo/COPYING

Copied: octave-pkg-dev/trunk/octave-pkg-dev.mk.in (from rev 1263, octave-pkg-dev/trunk/octave-pkg-dev.mk)
===================================================================
--- octave-pkg-dev/trunk/octave-pkg-dev.mk.in	                        (rev 0)
+++ octave-pkg-dev/trunk/octave-pkg-dev.mk.in	2008-02-25 15:32:13 UTC (rev 1264)
@@ -0,0 +1,45 @@
+# -*- makefile -*-
+
+# Copyright (c) 2008  Olafur Jens Sigurðsson <ojsbug at gmail.com>
+# Copyright (c) 2008  Rafael Laboissiere <rafael at debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+filename = $(wildcard *.tar.gz)
+package = $(shell awk '/^Package:/ {print $$2; exit 0}' debian/control)
+debpkg = debian/$(package)
+shrpkg = /usr/share/octave/debian
+mpath = usr/share/octave/packages
+bpath = usr/lib/octave/packages
+pkgname = $(filename:.tar.gz=)
+
+build/$(package):: build-stamp
+build-stamp:
+	mkdir -p $(CURDIR)/$(debpkg)/$(mpath)	\
+		 $(CURDIR)/$(debpkg)/$(bpath)
+	@PACKAGE@ -f -H -q --no-site-file --eval		\
+		"pkg ('prefix', [pwd(),'/$(debpkg)/$(mpath)'],	\
+		      [pwd(),'/$(debpkg)/$(bpath)']);		\
+		 pkg ('local_list', [pwd(),'.']);		\
+		 pkg ('global_list', [pwd(),'.']);		\
+		 pkg install $(filename)"
+	rm -f $(CURDIR)/$(debpkg)/$(mpath)/$(pkgname)/packinfo/COPYING
+	DH_AUTOSCRIPTDIR=$(shrpkg) perl $(shrpkg)/octave-pkg-dev.pl
+	touch $@
+
+clean::
+	rm -f build-stamp

Added: octave-pkg-dev/trunk/octave-pkg-dev.pl.in
===================================================================
--- octave-pkg-dev/trunk/octave-pkg-dev.pl.in	                        (rev 0)
+++ octave-pkg-dev/trunk/octave-pkg-dev.pl.in	2008-02-25 15:32:13 UTC (rev 1264)
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -w
+
+# Copyright (c) 2008  Rafael Laboissiere <rafael at debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+init ();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+    delsubstvar ($package, 'octave:Depends');
+    addsubstvar ($package, 'octave:Depends', '@PACKAGE@', '>= @VERSION@');
+    autoscript ($package, 'postinst', 'postinst', 's/#PACKAGE#/@PACKAGE@/');
+    autoscript ($package, 'prerm', 'prerm', 's/#PACKAGE#/@PACKAGE@/');
+}

Added: octave-pkg-dev/trunk/postinst.in
===================================================================
--- octave-pkg-dev/trunk/postinst.in	                        (rev 0)
+++ octave-pkg-dev/trunk/postinst.in	2008-02-25 15:32:13 UTC (rev 1264)
@@ -0,0 +1,5 @@
+# -*- sh -*-
+
+if [ "$1" = configure ] ; then
+    #PACKAGE# -f -q -H --no-site-file --eval "pkg ('rebuild');"
+fi

Added: octave-pkg-dev/trunk/prerm.in
===================================================================
--- octave-pkg-dev/trunk/prerm.in	                        (rev 0)
+++ octave-pkg-dev/trunk/prerm.in	2008-02-25 15:32:13 UTC (rev 1264)
@@ -0,0 +1,6 @@
+# -*- sh -*-
+
+case "$1" in
+    upgrade|remove|purge)
+        #PACKAGE# -f -q -H --no-site-file --eval "pkg ('rebuild');"
+esac




More information about the Pkg-octave-commit mailing list