Do the Debian package build in a _debian subdirectory.
authorBen Pfaff <blp@nicira.com>
Mon, 21 Jul 2008 22:44:18 +0000 (15:44 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 21 Jul 2008 22:45:35 +0000 (15:45 -0700)
This makes it easier to do a Debian build in the same source tree
also being used for other development.

debian/openflow-common.install
debian/openflow-common.manpages
debian/openflow-controller.install
debian/openflow-controller.manpages
debian/openflow-pki.install
debian/openflow-switch.install
debian/openflow-switch.manpages
debian/rules

index 4175c301140ee07da55b3d304697b3d65f87214b..624bc34430de159fc867885859f838cfdefeb345 100644 (file)
@@ -1,2 +1,2 @@
-utilities/ofp-pki usr/sbin
-utilities/vlogconf usr/sbin
+_debian/utilities/ofp-pki usr/sbin
+_debian/utilities/vlogconf usr/sbin
index 282ec32956c58f78bd6224bdb07b600ede6da507..ee20d1ea954cc90a854e379c0dfe11f228becba0 100644 (file)
@@ -1,2 +1,2 @@
 utilities/vlogconf.8
-utilities/ofp-pki.8
+_debian/utilities/ofp-pki.8
index 75ab43568499fb5becd50b07c8d20740db136830..3932ab6a67eda12d48f2720795023195e46ee3a6 100644 (file)
@@ -1 +1 @@
-controller/controller usr/sbin
+_debian/controller/controller usr/sbin
index c30c912b225408b7b448457a916fd1383d49386b..3fbaaeaf4e1f177cdf1fa95ba4cf762e3a7db6a5 100644 (file)
@@ -1 +1 @@
-controller/controller.8
+_debian/controller/controller.8
index 58cfb4e902f567ee2bafb82ef390ee313bf18142..cd530ca4a56608f0887dd39b09fbb85937ed1a23 100644 (file)
@@ -1 +1 @@
-utilities/ofp-pki-cgi usr/lib/cgi-bin
+_debian/utilities/ofp-pki-cgi usr/lib/cgi-bin
index 96db7278b26dc45f0612f65d94b8c8fad228b816..77ea13af00ea6f6e979cc1db5e87df30e5ec0fba 100644 (file)
@@ -1,4 +1,4 @@
-switch/switch usr/sbin
-secchan/secchan usr/sbin
-utilities/dpctl usr/sbin
+_debian/switch/switch usr/sbin
+_debian/secchan/secchan usr/sbin
+_debian/utilities/dpctl usr/sbin
 debian/ofp-switch-setup usr/sbin
index 905d0606dc4034963a0d6e2f3ac26268bb310f9a..9f4c4ff89f22920ad4d7e882935b81db6a74f07e 100644 (file)
@@ -1,4 +1,4 @@
 debian/ofp-switch-setup.8
-secchan/secchan.8
-switch/switch.8
+_debian/secchan/secchan.8
+_debian/switch/switch.8
 utilities/dpctl.8
index ab44b77f667ea0d4bd17d0351666e40d77d7fdd4..d7300e6fcc4f9088d2894d59f1747a829c700b30 100755 (executable)
@@ -29,8 +29,10 @@ configure: configure-stamp
 configure-stamp:
        dh_testdir
        test -e configure || ./boot.sh
-       test -e Makefile || \
-               ./configure --prefix=/usr --localstatedir=/var --enable-ssl
+       test -d _debian || mkdir _debian
+       cd _debian && ( \
+               test -e Makefile || \
+               ../configure --prefix=/usr --localstatedir=/var --enable-ssl)
        touch configure-stamp
 
 #Architecture 
@@ -38,18 +40,19 @@ build: build-arch build-indep
 
 build-arch: build-arch-stamp
 build-arch-stamp: configure-stamp 
-       $(MAKE)
+       $(MAKE) -C _debian
        touch $@
 
 build-indep: build-indep-stamp
 build-indep-stamp: configure-stamp 
-       $(MAKE) dist distdir=openflow
+       $(MAKE) -C _debian dist distdir=openflow
        touch $@
 
 clean:
        dh_testdir
        dh_testroot
        rm -f build-arch-stamp build-indep-stamp configure-stamp
+       rm -rf _debian
        [ ! -f Makefile ] || $(MAKE) distclean
        dh_clean 
        debconf-updatepo
@@ -97,7 +100,7 @@ install-indep: build-indep
        dh_testroot
        dh_clean -k -i 
        dh_installdirs -i
-       cp openflow.tar.gz $(MODDIR)
+       cp _debian/openflow.tar.gz $(MODDIR)
        cd debian; cp changelog control compat *.modules.in rules $(MODDIR)/debian
        cd debian/openflow-datapath-source/usr/src && tar -c modules | bzip2 -9 > openflow-datapath.tar.bz2 && rm -rf modules
        install -m644 debian/openflow-pki.apache2 debian/openflow-pki/etc/apache2/sites-available/openflow-pki
@@ -108,7 +111,7 @@ install-arch: build-arch
        dh_testroot
        dh_clean -k -s 
        dh_installdirs -s
-       $(MAKE) DESTDIR=$(CURDIR)/debian/openflow install
+       $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/openflow install
        cp debian/openflow-switch.overrides debian/openflow-switch/usr/share/lintian/overrides/openflow-switch
        dh_install -s