[Pkg-cli-apps-commits] r4369 - in /packages/nant/trunk/debian: patches/000-fix_build_system.dpatch rules

hanska-guest at users.alioth.debian.org hanska-guest at users.alioth.debian.org
Tue Dec 30 23:23:45 UTC 2008


Author: hanska-guest
Date: Tue Dec 30 23:23:45 2008
New Revision: 4369

URL: http://svn.debian.org/wsvn/pkg-cli-apps/?sc=1&rev=4369
Log:
Still working on the DESTDIR feature
Updated debian/rules

Modified:
    packages/nant/trunk/debian/patches/000-fix_build_system.dpatch
    packages/nant/trunk/debian/rules

Modified: packages/nant/trunk/debian/patches/000-fix_build_system.dpatch
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/nant/trunk/debian/patches/000-fix_build_system.dpatch?rev=4369&op=diff
==============================================================================
--- packages/nant/trunk/debian/patches/000-fix_build_system.dpatch (original)
+++ packages/nant/trunk/debian/patches/000-fix_build_system.dpatch Tue Dec 30 23:23:45 2008
@@ -5,76 +5,87 @@
 ## DP: add support for DESTDIR makefile variable.
 
 @DPATCH@
-diff -urNad nant-0.85~/Makefile nant-0.85/Makefile
---- nant-0.85~/Makefile	2008-12-30 22:40:45.000000000 +0100
-+++ nant-0.85/Makefile	2008-12-30 22:42:26.000000000 +0100
-@@ -1,7 +1,8 @@
- #NAnt make file for *nix
--MONO=mono
--MCS=mcs
-+MONO=cli
-+MCS=csc
+diff -urNad nant-0.85.dfsg1~/Makefile nant-0.85.dfsg1/Makefile
+--- nant-0.85.dfsg1~/Makefile	2008-12-31 00:21:18.000000000 +0100
++++ nant-0.85.dfsg1/Makefile	2008-12-31 00:21:19.000000000 +0100
+@@ -2,6 +2,7 @@
+ MONO=mono
+ MCS=mcs
  RESGEN=resgen
 +DESTDIR=
  
  ifndef DIRSEP
  ifeq ($(OS),Windows_NT)
-@@ -18,13 +19,8 @@
+@@ -18,13 +19,13 @@
  endif
  endif
  
 -ifeq ($(MONO),mono)
++#ifeq ($(MONO),mono)
  FRAMEWORK_DIR = mono
  DEFINE = MONO
 -else
 -FRAMEWORK_DIR = net
 -DEFINE= NET
 -endif
++#else
++#FRAMEWORK_DIR = net
++#DEFINE= NET
++#endif
  
  
  
-@@ -40,7 +36,7 @@
+@@ -40,7 +41,7 @@
  	rm -fR build bootstrap
  
  install: bootstrap
 -	$(NANT) -f:NAnt.build install -D:install.prefix="$(prefix)"
-+	$(NANT) -f:NAnt.build install -D:install.prefix="$(prefix)" -D:install.destdir="$(DESTDIR)"
++	$(NANT) -f:NAnt.build install -D:install.prefix="$(prefix)" -D:install.destdir="$(DESTDIR)"
  
  run-test: bootstrap
  	$(NANT) -f:NAnt.build test
-diff -urNad nant-0.85~/NAnt.build nant-0.85/NAnt.build
---- nant-0.85~/NAnt.build	2008-12-30 22:40:45.000000000 +0100
-+++ nant-0.85/NAnt.build	2008-12-30 22:40:55.000000000 +0100
-@@ -778,13 +778,14 @@
+diff -urNad nant-0.85.dfsg1~/NAnt.build nant-0.85.dfsg1/NAnt.build
+--- nant-0.85.dfsg1~/NAnt.build	2008-12-31 00:21:18.000000000 +0100
++++ nant-0.85.dfsg1/NAnt.build	2008-12-31 00:21:51.000000000 +0100
+@@ -778,12 +778,27 @@
          <if test="${property::exists('install.prefix') and string::get-length(install.prefix) != 0}">
              <property name="install.realprefix" value="${install.prefix}" />
          </if>
--        <property name="install.bindir" value="${path::combine(install.realprefix, 'bin')}"/>
--        <property name="install.share" value="${path::combine(install.realprefix, 'share')}"/>
++        <property name="install.destdir.isempty" value="true" />
++        <if test="${property::exists('install.destdir') and string::get-length(install.destdir) != 0}">
++            <property name="install.destdir.isempty" value="false" />
++        </if>
+         <property name="install.bindir" value="${path::combine(install.realprefix, 'bin')}"/>
+         <property name="install.share" value="${path::combine(install.realprefix, 'share')}"/>
 -        <property name="install.copylocation" value="${path::combine (install.share, 'NAnt')}"/>
-+        <property name="install.bindir" value="${path::combine(install.prefix, 'bin')}"/>
-+        <property name="install.share" value="${path::combine(install.prefix, 'share')}"/>
 +        <property name="install.libdir" value="${path::combine(install.prefix, 'lib')}"/>
-+        <property name="install.copylocation" value="${path::combine(install.libdir, 'NAnt')}"/>
          <property name="prefix" value="${pkg-config::get-variable('mono', 'prefix')}"/>
 -        <echo message="Installing NAnt to '${install.copylocation}' ..." />
-+        <echo message="Installing NAnt to '${path::combine(install.destdir, install.copylocation)}' ..." />
          
--        <copy todir="${install.copylocation}" overwrite="true">
-+        <copy todir="${path::combine(install.destdir, install.copylocation)}" overwrite="true">
++        <if test="${not install.destdir.isempty}">
++            <echo message="Using DESTDIR '${install.destdir}'..." />
++            <!-- TODO FIXME BUG XXX: check why the variables aren't correctly set -- maybe the test? -->
++            <property name="tmppath" value="${path::combine(install.libdir, 'NAnt')}" />
++            <property name="install.copylocation" value="${path::combine(install.destdir, tmppath)}" />
++            <property name="install.realbindir" value="${path::combine(install.destdir, install.bindir)}" />
++        </if>
++        <if test="${install.destdir.isempty}">
++            <property name="install.copylocation" value="${path::combine(install.libdir, 'NAnt')}" />
++            <property name="install.realbindir" value="${install.bindir}" />
++        </if>
++        <echo message="Installing NAnt to '${install.copylocation}' ..." />
+         <copy todir="${install.copylocation}" overwrite="true">
              <fileset basedir="${build.dir}">
                  <include name="bin/**/*" />
-                 <include name="doc/**/*" />
-@@ -793,17 +794,18 @@
+@@ -793,17 +808,17 @@
                  <exclude name="bin/*.Tests.*" />
              </fileset>
          </copy>
 -        <echo message="Installing NAnt wrapper script to '${install.bindir}' ..." />
-+        <property name="install.destbindir" value="${path::combine(install.destdir, install.bindir)}" />
-+        <echo message="Installing NAnt wrapper script to '${path::combine(install.destdir, install.bindir)}' ..." />
++        <echo message="Installing NAnt wrapper script to '${install.realbindir}' ..." />
          <!-- store filename of wrapper script in property -->
 -        <property name="wrapper" value="${path::combine(install.bindir, 'nant')}" />
-+        <property name="wrapper" value="${path::combine(install.destbindir, 'nant')}" />
++        <property name="wrapper" value="${path::combine(install.realbindir, 'nant')}" />
          <!-- 
              create wrapper file using separate echo tasks for each line to ensure
              the line endings of the generated file match the platform on which 
@@ -84,7 +95,7 @@
 -        <echo file="${wrapper}" append="true">exec ${path::combine(prefix, 'bin')}/mono ${path::combine(install.copylocation, 'bin')}/NAnt.exe "$@"</echo>
 -        <exec program="chmod" commandline="a+x ${path::combine(install.bindir, 'nant')}"/>
 +        <echo file="${wrapper}" append="true">exec ${path::combine(prefix, 'bin')}/cli ${install.libdir}/NAnt.exe "$@"</echo>
-+        <exec program="chmod" commandline="a+x ${path::combine(install.destbindir, 'nant')}"/>
++        <exec program="chmod" commandline="a+x ${path::combine(install.realbindir, 'nant')}"/>
      </target>
      
      <target name="rpm" depends="init, build">

Modified: packages/nant/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/nant/trunk/debian/rules?rev=4369&op=diff
==============================================================================
--- packages/nant/trunk/debian/rules (original)
+++ packages/nant/trunk/debian/rules Tue Dec 30 23:23:45 2008
@@ -13,25 +13,23 @@
 build-stamp: $(DPATCH_STAMPFN)
 	mkdir -p $(MONO_SHARED_DIR)/.wapi
 	dh build --before dh_auto_build
-	#$(MAKE) MONO=cli MCS=csc prefix=/usr
-	$(MAKE) prefix=/usr
+	$(MAKE) MONO=cli MCS=csc prefix=/usr DESTDIR=$(CURDIR)/debian/tmp
+	#$(MAKE) prefix=/usr
 	dh build --after dh_auto_build
 	touch $@
 
 install: install-stamp
 install-stamp: build
 	dh install --before dh_auto_install
-	#$(MAKE) MONO=cli MCS=csc DESTDIR=debian/tmp prefix=/usr install
-	$(MAKE) DESTDIR=debian/tmp prefix=/usr install
-	rmdir --ignore-fail-on-non-empty --parents debian/tmp
+	$(MAKE) MONO=cli MCS=csc DESTDIR=$(CURDIR)/debian/tmp prefix=/usr install
+	#$(MAKE) DESTDIR=debian/tmp prefix=/usr install
 	dh install --after dh_auto_install
+	rmdir --ignore-fail-on-non-empty --parents debian/nant
 	touch $@
 
 clean: realclean unpatch
 realclean: $(DPATCH_STAMPFN)
-	rm -rf $(MONO_SHARED_DIR)/.wapi
-	dh clean --before dh_auto_clean
-	dh clean --remaining
+	dh clean
 
 binary-arch:
 binary-indep: build




More information about the Pkg-cli-apps-commits mailing list