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

Revision 4946, 4.9 KB checked in by alanbach-guest, 5 years ago (diff)
  • Sync'd with Debian 2.1.2-dfsg-1
  • 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.files/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            --enable-webservice
44
45build: build-stamp
46build-stamp: env.sh
47        dh_testdir
48        # Building package
49        . ./env.sh; $(MAKE) \
50                BUILD_TYPE=release \
51                PATH_OUT=$(abspath out)
52        # and vboxdrv.sh
53        $(MAKE) -C src/VBox/Installer/linux $(abspath out/obj/Installer/linux/vboxdrv.sh) \
54                PATH_OUT=$(abspath out)
55        touch $@
56
57clean: unpatch
58        dh_testdir
59        dh_testroot
60        # Cleaning package
61        rm -rf out
62        rm -f AutoConfig.kmk configure.log env.sh LocalConfig.kmk
63        rm -f debian/$(sname).init
64        rm -f debian/virtualbox-ose.README.Debian debian/README.Debian.html
65        dh_clean
66
67#Rebuild the orig.tar.gz
68dfsg-free: clean
69        rm -rf ./kBuild
70        rm -rf ./tools
71        rm -rf ./src/VBox/Additions/os2
72        rm -rf ./src/VBox/Additions/WINNT
73        rm -f ./src/VBox/HostDrivers/VBoxTAP/VBoxTAP.rc
74        rm -f ./src/VBox/HostDrivers/Support/darwin/load.sh
75        rm -f ./include/VBox/VBoxGuest.inc
76        rm -f ./include/VBox/VBoxGuest16.h
77        rm -f ./include/VBox/VBoxGuest.mac
78        rm -f ./src/libs/xpcom18a4/xpcom/MoreFiles/FSCopyObject.c
79        rm -f ./src/libs/xpcom18a4/xpcom/MoreFiles/FSCopyObject.h
80        rm -rf ./src/libs/ffmpeg-20060710
81        rm -rf ./src/libs/libpng*
82        rm -rf ./src/libs/libxml2*
83        rm -rf ./src/libs/libxslt*
84        rm -rf ./src/libs/zlib*
85        rm -f ./src/VBox/HostServices/SharedClipboard/linux-stub.cpp
86        rm -f ./src/VBox/Additions/linux/xmouse/Imakefile
87        rm -rf ./src/VBox/Additions/linux/selinux-fedora
88        cd ..; mv $(CURDIR) virtualbox-ose-$(upstreamversion)-dfsg; \
89            tar --exclude .svn --exclude '.git*' --exclude debian \
90                -czf virtualbox-ose_$(upstreamversion)-dfsg.orig.tar.gz \
91                virtualbox-ose-$(upstreamversion)-dfsg
92
93# install: DH_OPTIONS=
94install: build debian/virtualbox-ose.README.Debian debian/README.Debian.html
95        dh_testdir
96        dh_testroot
97        dh_clean -k
98        dh_installdirs
99        # This will get installed into the package by dh_installinit
100        install -m 644 out/obj/Installer/linux/vboxdrv.sh debian/$(sname).init
101        # Install helper scripts for vbox* interfaces
102        dh_installifupdown -p$(sname)
103
104binary-arch: build install
105        dh_testdir -s
106        dh_testroot -s
107        dh_installchangelogs -s
108        dh_installdocs -s
109        dh_installmenu -s
110        dh_install -s
111        chmod 755 debian/$(sname)/usr/share/virtualbox/VBox.sh
112        -chmod 755 debian/$(uname)/usr/share/virtualbox/x11config.pl
113        -install -m 644 out/bin/additions/vboxvideo_drv_14.so debian/$(uname)/usr/lib/xorg/modules/drivers/vboxvideo_drv.so
114        -install -m 644 out/bin/additions/vboxmouse_drv_14.so debian/$(uname)/usr/lib/xorg/modules/input/vboxmouse_drv.so
115        -install -m 755 out/bin/additions/mountvboxsf debian/$(uname)/sbin/mount.vboxsf
116        -install -m 755 src/VBox/Additions/x11/installer/VBoxRandR.sh debian/$(uname)/usr/bin/VBoxRandR
117        dh_strip -s --dbg-package=$(sname)-dbg
118        dh_link -s
119        dh_compress -s
120        dh_fixperms -s
121        chmod +s debian/$(sname)/usr/lib/virtualbox/VirtualBox
122        chmod +s debian/$(sname)/usr/lib/virtualbox/VBoxSDL
123        chmod +s debian/$(sname)/usr/lib/virtualbox/VBoxBFE
124        chmod +s debian/$(sname)/usr/lib/virtualbox/VBoxHeadless
125        dh_installudev -s
126        dh_installdebconf -s
127        dh_installinit -s
128        dh_installdeb -s
129        dh_shlibdeps -s
130        dh_gencontrol -s
131        dh_md5sums -s
132        dh_builddeb -s
133
134binary-indep: build install
135        dh_testdir -i
136        dh_testroot -i
137        dh_installchangelogs -i
138        dh_installdocs -i
139        dh_install -i
140        # These files have incorrect permissions, fixing it.
141        chmod 755 debian/$(psource)/usr/src/modules/$(sname)/debian/rules
142        chmod 755 debian/$(gsource)/usr/src/modules/$(gname)/debian/rules
143        dh_link -i
144        # Create .tar.bz2 for virtualbox*source
145        cd debian/$(psource)/usr/src && \
146            tar -cjf $(sname).tar.bz2 modules && \
147            rm -rf modules
148        cd debian/$(gsource)/usr/src && \
149            tar -cjf $(gname).tar.bz2 modules && \
150            rm -rf modules
151        dh_compress -i
152        dh_fixperms -i
153        dh_gencontrol -i
154        dh_md5sums -i
155        dh_builddeb -i
156
157binary: binary-arch binary-indep
158.PHONY: patch unpatch \
159        build clean binary-arch binary-indep binary install \
160        binary-modules kdist kdist_configure kdist_image kdist_clean
Note: See TracBrowser for help on using the repository browser.