Author: domibel-guest
Date: 2008-10-31 11:41:59 +0000 (Fri, 31 Oct 2008)
New Revision: 2601

Modified:
   trunk/packages/sofa-framework/trunk/debian/rules
Log:
binary-arch binary-indep


Modified: trunk/packages/sofa-framework/trunk/debian/rules
===================================================================
--- trunk/packages/sofa-framework/trunk/debian/rules    2008-10-31 00:10:08 UTC 
(rev 2600)
+++ trunk/packages/sofa-framework/trunk/debian/rules    2008-10-31 11:41:59 UTC 
(rev 2601)
@@ -1,24 +1,15 @@
 #!/usr/bin/make -f
 
-PACKAGE=sofa
+PACKAGE=sofa-framework
+DEB_SOURCE_PACKAGE:=$(PACKAGE)
 
 # DPatch
-DEB_SOURCE_PACKAGE:=$(PACKAGE)
 include /usr/share/dpatch/dpatch.make
 
 # Uncomment this to turn on verbose mode.
 export DH_VERBOSE=1
 
 
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-else
-       CFLAGS += -O2
-endif
-
-
 get-orig-source:
        . debian/get-orig-source
 
@@ -28,24 +19,17 @@
        dh_testdir
        # Add here commands to configure the package.
        qmake
-       touch configure-stamp
-
+       
        # create a folder without object files
        cp -r $(CURDIR)/applications/tutorials $(CURDIR)/tutorials
 
+       touch $@
 
 
-build: build-stamp
-build-stamp: configure
-       dh_testdir
+build: build-arch build-indep
 
-       # Add here commands to compile the package.
-       $(MAKE)
-
-       touch $@
-
-build-docs: build-stamp docs-stamp
-docs-stamp:
+build-indep: build-indep-stamp
+build-indep-stamp: configure
        dh_testdir
 
        # Create the documentation files
@@ -58,6 +42,17 @@
 
        touch $@
 
+
+build-arch: build-arch-stamp
+build-arch-stamp: configure
+       dh_testdir
+
+        # Add here commands to compile the package.
+       $(MAKE)
+
+       touch $@
+
+
 clean: clean-patched unpatch
 
 clean-patched:
@@ -71,8 +66,39 @@
        dh_clean 
 
 
-install: build
+install: install-indep install-arch
+
+install-indep: build-indep
        dh_testdir
+
+       mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/sofa-doc
+
+       dh_install -psofa-apps   debian/sofa.desktop                      
usr/share/applications
+       dh_install -psofa-apps   debian/sofa.xpm                          
usr/share/pixmaps
+
+        # because of a lintian warning
+       find tutorials -name "*.kdevelop" | xargs chmod 644
+
+        # install the source code of the example applications
+       dh_install -psofa-tutorials    tutorials     usr/share/sofa
+
+       find share -type f -exec chmod 644 \{\} \;
+       find share -name "*.sh" | xargs chmod 755
+
+       find examples -type f -exec chmod 644 \{\} \;
+       find examples -name "*.sh" | xargs chmod 755
+
+       dh_install -psofa-data   share                                
usr/share/sofa
+       dh_install -psofa-data   examples                             
usr/share/sofa
+
+        # Documentation
+       dh_install -psofa-doc     doc/doxygen/html                    
usr/share/doc/sofa-doc
+
+       dh_installexamples
+
+
+install-arch: build-arch
+       dh_testdir
        dh_testroot
        dh_installdirs
 
@@ -127,44 +153,13 @@
        install -p -D -m644 debian/sofa-apps.lintian 
debian/sofa-apps/usr/share/lintian/overrides/sofa-apps
 
 
-
-# Build architecture-independent files here.
-binary-indep: build build-docs install
-
-       mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/sofa-doc
-
-       dh_install -psofa-apps   debian/sofa.desktop                      
usr/share/applications
-       dh_install -psofa-apps   debian/sofa.xpm                          
usr/share/pixmaps
-
-        # because of a lintian warning
-       find tutorials -name "*.kdevelop" | xargs chmod 644
-
-        # install the source code of the example applications
-       dh_install -psofa-tutorials    tutorials     usr/share/sofa
-
-       find share -type f -exec chmod 644 \{\} \;
-       find share -name "*.sh" | xargs chmod 755
-
-       find examples -type f -exec chmod 644 \{\} \;
-       find examples -name "*.sh" | xargs chmod 755
-
-       dh_install -psofa-data   share                                
usr/share/sofa
-       dh_install -psofa-data   examples                             
usr/share/sofa
-
-        # Documentation
-       dh_install -psofa-doc     doc/doxygen/html                    
usr/share/doc/sofa-doc
-
-
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
+# called by binary-indep and binary-arch
+binary-common:
        dh_testdir
        dh_testroot
        dh_install
        dh_installchangelogs 
        dh_installdocs
-       dh_installexamples
        dh_installmenu
        dh_installman -psofa-apps debian/sofa.1
        dh_desktop
@@ -179,5 +174,16 @@
        dh_md5sums
        dh_builddeb
 
+
+# Build architecture independant packages using the common target.
+binary-indep: build-indep install-indep
+       $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+
+# Build architecture dependant packages using the common target.
+binary-arch: build-arch install-arch
+       $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
+
+
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install install-indep 
install-arch configure


_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-med-commit

Reply via email to