3 # Sample debian/rules that uses debhelper.
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets by Bill Allombert 2001
13 # Uncomment this to turn on verbose mode.
16 # This has to be exported to make some magic below work.
19 # prefix of the target package name
20 PACKAGE=openvswitch-datapath-module
21 # modifieable for experiments or debugging m-a
22 MA_DIR ?= /usr/share/modass
23 # load generic variable handling
24 -include $(MA_DIR)/include/generic.make
26 -include $(MA_DIR)/include/common-rules.make
28 DATAPATH_CONFIGURE_OPTS =
30 # Official build number. Leave set to 0 if not an official build.
33 configure: configure-stamp
36 test -e configure || ./boot.sh
37 test -d _debian || mkdir _debian
40 ../configure --prefix=/usr --localstatedir=/var --enable-ssl \
41 --with-build-number=$(BUILD_NUMBER) \
42 $(DATAPATH_CONFIGURE_OPTS))
46 build: build-arch build-indep
48 build-arch: build-arch-stamp
49 build-arch-stamp: configure-stamp
51 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
52 $(MAKE) -C _debian check
56 build-indep: build-indep-stamp
57 build-indep-stamp: configure-stamp
58 $(MAKE) -C _debian dist distdir=openvswitch
64 rm -f build-arch-stamp build-indep-stamp configure-stamp
66 [ ! -f Makefile ] || $(MAKE) distclean
74 kdist_config: prep-deb-files
76 binary-modules: DSTDIR = $(CURDIR)/debian/$(PKGNAME)/lib/modules/$(KVERS)
77 binary-modules: prep-deb-files
81 tar xzf openvswitch.tar.gz
82 cd openvswitch && ./configure --with-l26=$(KSRC) $(DATAPATH_CONFIGURE_OPTS) --with-build-number=$(BUILD_NUMBER)
83 cd openvswitch && $(MAKE) -C datapath/linux-2.6
84 install -d -m755 $(DSTDIR)
85 install -m644 openvswitch/datapath/linux-2.6/*_mod.ko $(DSTDIR)/
93 dh_builddeb --destdir=$(DEB_DESTDIR)
95 install: install-indep install-arch
96 install-indep: build-indep
102 cd debian/openvswitch-datapath-source/usr/src && tar -c modules | bzip2 -9 > openvswitch-datapath.tar.bz2 && rm -rf modules
103 install -m644 debian/openvswitch-pki-server.apache2 debian/openvswitch-pki-server/etc/apache2/sites-available/openvswitch-pki
104 install -m1777 -d debian/corekeeper/var/log/core
106 install-arch: build-arch
111 $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/openvswitch install
112 cp debian/openvswitch-switch-config.overrides debian/openvswitch-switch-config/usr/share/lintian/overrides/openvswitch-switch-config
113 cp debian/openvswitch-switch.template debian/openvswitch-switch/usr/share/openvswitch/switch/default.template
115 env TERMINFO=debian/openvswitch-switchui/usr/share/terminfo tic -x extras/ezio/ezio3.ti
117 # Must not depend on anything. This is to be called by
118 # binary-arch/binary-indep
119 # in another 'make' thread.
132 dh_strip --dbg-package=openvswitch-dbg
134 dh_fixperms -X var/log/core
142 binary-indep: install-indep
143 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
144 binary-arch: install-arch
145 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
147 binary: binary-arch binary-indep
148 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure