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
53 build-indep: build-indep-stamp
54 build-indep-stamp: configure-stamp
55 $(MAKE) -C _debian dist distdir=openvswitch
61 rm -f build-arch-stamp build-indep-stamp configure-stamp
63 [ ! -f Makefile ] || $(MAKE) distclean
71 kdist_config: prep-deb-files
73 binary-modules: DSTDIR = $(CURDIR)/debian/$(PKGNAME)/lib/modules/$(KVERS)
74 binary-modules: prep-deb-files
78 tar xzf openvswitch.tar.gz
79 cd openvswitch && ./configure --with-l26=$(KSRC) $(DATAPATH_CONFIGURE_OPTS) --with-build-number=$(BUILD_NUMBER)
80 cd openvswitch && $(MAKE) -C datapath/linux-2.6
81 install -d -m755 $(DSTDIR)
82 install -m644 openvswitch/datapath/linux-2.6/*_mod.ko $(DSTDIR)/
90 dh_builddeb --destdir=$(DEB_DESTDIR)
92 install: install-indep install-arch
93 install-indep: build-indep
99 cd debian/openvswitch-datapath-source/usr/src && tar -c modules | bzip2 -9 > openvswitch-datapath.tar.bz2 && rm -rf modules
100 install -m644 debian/openvswitch-pki-server.apache2 debian/openvswitch-pki-server/etc/apache2/sites-available/openvswitch-pki
101 install -m1777 -d debian/corekeeper/var/log/core
103 install-arch: build-arch
108 $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/openvswitch install
109 cp debian/openvswitch-switch-config.overrides debian/openvswitch-switch-config/usr/share/lintian/overrides/openvswitch-switch-config
110 cp debian/openvswitch-switch.template debian/openvswitch-switch/usr/share/openvswitch/switch/default.template
112 env TERMINFO=debian/openvswitch-switchui/usr/share/terminfo tic -x extras/ezio/ezio3.ti
114 # Must not depend on anything. This is to be called by
115 # binary-arch/binary-indep
116 # in another 'make' thread.
129 dh_strip --dbg-package=openvswitch-dbg
131 dh_fixperms -X var/log/core
139 binary-indep: install-indep
140 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
141 binary-arch: install-arch
142 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
144 binary: binary-arch binary-indep
145 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure