source: pkg/boss/main/virtualbox-ose/trunk/debian/rules @ 4744

Revision 4744, 5.0 KB checked in by alanbach-guest, 6 years ago (diff)
  • Added virtualbox-ose 2.0 to BOSS
  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2
3include /usr/share/dpatch/dpatch.make
4
5# some default definitions, important!
6#
7# Name of the source packages
8psource:=virtualbox-ose-source
9gsource:=virtualbox-ose-guest-source
10
11# The short upstream name
12sname:=virtualbox-ose
13gname:=virtualbox-ose-guest
14uname:=virtualbox-ose-guest-utils
15
16MAKE:=kmk
17
18upstreamversion := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
19
20DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
21
22# Generate README.Debian as text/html ...
23debian/README.Debian.html: debian/virtualbox-ose.README.Debian.xml
24        xsltproc --nonet --stringparam section.autolabel 1 \
25            -o $@ \
26            /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl \
27            $<
28
29# ... and text/plain
30debian/virtualbox-ose.README.Debian: debian/README.Debian.html
31        chmod 755 debian/lynx-dump-postprocess
32        export LC_ALL=C; lynx -force_html -dump $< | ./debian/lynx-dump-postprocess > $@.tmp
33        mv $@.tmp $@
34
35env.sh: patch-stamp
36        dh_testdir
37        ./configure \
38            --with-linux="/usr" \
39            --disable-kmods \
40            --disable-qt3 \
41            --with-gcc=/usr/bin/gcc-4.2 \
42            --with-g++=/usr/bin/g++-4.2
43
44build: build-stamp
45build-stamp: env.sh
46        dh_testdir
47        # Building package
48        . ./env.sh; $(MAKE) \
49                BUILD_TYPE=release \
50                PATH_OUT=$(abspath out)
51        # make sure VBoxAddIF.sh is built, too
52        $(MAKE) -C src/VBox/Installer/linux $(abspath out/bin/VBoxAddIF.sh) \
53                PATH_OUT=$(abspath out)
54        # and vboxnet.sh
55        $(MAKE) -C src/VBox/Installer/linux $(abspath out/obj/src/VBox/Installer/linux/vboxnet.sh) \
56                PATH_OUT=$(abspath out)
57        touch $@
58
59clean: unpatch
60        dh_testdir
61        dh_testroot
62        # Cleaning package
63        rm -rf out
64        rm -f AutoConfig.kmk configure.log env.sh LocalConfig.kmk
65        rm -f debian/$(sname).init
66        rm -f debian/virtualbox-ose.README.Debian debian/README.Debian.html
67        dh_clean
68
69#Rebuild the orig.tar.gz
70dfsg-free: clean
71        rm -rf ./kBuild
72        rm -rf ./tools
73        rm -rf ./src/VBox/Additions/os2
74        rm -rf ./src/VBox/Additions/WINNT
75        rm -f ./src/VBox/HostDrivers/VBoxTAP/VBoxTAP.rc
76        rm -f ./src/VBox/HostDrivers/Support/darwin/load.sh
77        rm -f ./include/VBox/VBoxGuest.inc
78        rm -f ./include/VBox/VBoxGuest16.h
79        rm -f ./include/VBox/VBoxGuest.mac
80        rm -f ./src/libs/xpcom18a4/xpcom/MoreFiles/FSCopyObject.c
81        rm -f ./src/libs/xpcom18a4/xpcom/MoreFiles/FSCopyObject.h
82        rm -rf ./src/libs/ffmpeg-20060710
83        rm -rf ./src/libs/libpng*
84        rm -rf ./src/libs/libxml2*
85        rm -rf ./src/libs/libxslt*
86        rm -rf ./src/libs/zlib*
87        rm -f ./src/VBox/HostServices/SharedClipboard/linux-stub.cpp
88        rm -f ./src/VBox/Additions/linux/xmouse/Imakefile
89        rm -rf ./src/VBox/Additions/linux/selinux-fedora
90        cd ..; mv $(CURDIR) virtualbox-ose-$(upstreamversion)-dfsg; \
91            tar --exclude .svn --exclude '.git*' --exclude debian \
92                -czf virtualbox-ose_$(upstreamversion)-dfsg.orig.tar.gz \
93                virtualbox-ose-$(upstreamversion)-dfsg
94
95# install: DH_OPTIONS=
96install: build debian/virtualbox-ose.README.Debian debian/README.Debian.html
97        dh_testdir
98        dh_testroot
99        dh_clean -k
100        dh_installdirs
101        # This will get installed into the package by dh_installinit
102        install -m 644 out/obj/src/VBox/Installer/linux/vboxnet.sh debian/$(sname).init
103        # Install helper scripts for vbox* interfaces
104        dh_installifupdown -p$(sname)
105
106binary-arch: build install
107        dh_testdir -s
108        dh_testroot -s
109        dh_installchangelogs -s
110        dh_installdocs -s
111        dh_installmenu -s
112        dh_install -s
113        chmod 755 debian/$(sname)/usr/share/virtualbox/VBox.sh
114        -chmod 755 debian/$(uname)/usr/share/virtualbox/x11config.pl
115        -install -m 644 out/bin/additions/vboxvideo_drv_14.so debian/$(uname)/usr/lib/xorg/modules/drivers/vboxvideo_drv.so
116        -install -m 644 out/bin/additions/vboxmouse_drv_14.so debian/$(uname)/usr/lib/xorg/modules/input/vboxmouse_drv.so
117        -install -m 755 out/bin/additions/mountvboxsf debian/$(uname)/sbin/mount.vboxsf
118        -install -m 755 src/VBox/Additions/x11/installer/VBoxRandR.sh debian/$(uname)/usr/bin/VBoxRandR
119        dh_strip -s --dbg-package=$(sname)-dbg -X/usr/share/virtualbox/sdk/bin/xpidl
120        dh_link -s
121        dh_compress -s
122        dh_fixperms -s
123        chmod +s debian/$(sname)/usr/lib/virtualbox/VirtualBox
124        chmod +s debian/$(sname)/usr/lib/virtualbox/VBoxSDL
125        chmod +s debian/$(sname)/usr/lib/virtualbox/VBoxBFE
126        chmod +s debian/$(sname)/usr/lib/virtualbox/VBoxHeadless
127        dh_installudev -s
128        dh_installdebconf -s
129        dh_installinit -s
130        dh_installdeb -s
131        dh_shlibdeps -s
132        dh_gencontrol -s
133        dh_md5sums -s
134        dh_builddeb -s
135
136binary-indep: build install
137        dh_testdir -i
138        dh_testroot -i
139        dh_installchangelogs -i
140        dh_installdocs -i
141        dh_install -i
142        # These files have incorrect permissions, fixing it.
143        chmod 755 debian/$(psource)/usr/src/modules/$(sname)/debian/rules
144        chmod 755 debian/$(gsource)/usr/src/modules/$(gname)/debian/rules
145        dh_link -i
146        # Create .tar.bz2 for virtualbox*source
147        cd debian/$(psource)/usr/src && \
148            tar -cjf $(sname).tar.bz2 modules && \
149            rm -rf modules
150        cd debian/$(gsource)/usr/src && \
151            tar -cjf $(gname).tar.bz2 modules && \
152            rm -rf modules
153        dh_compress -i
154        dh_fixperms -i
155        dh_gencontrol -i
156        dh_md5sums -i
157        dh_builddeb -i
158
159binary: binary-arch binary-indep
160.PHONY: patch unpatch \
161        build clean binary-arch binary-indep binary install \
162        binary-modules kdist kdist_configure kdist_image kdist_clean
Note: See TracBrowser for help on using the repository browser.