~raof/xserver-xgl/ubuntu-raof

2 by Christopher James Halse Rogers (RAOF)
Initial import of packaging
1
#!/usr/bin/make -f
2
# -*- makefile -*-
3
# Sample debian/rules that uses debhelper.
4
# This file was originally written by Joey Hess and Craig Small.
5
# As a special exception, when this file is copied by dh-make into a
6
# dh-make output file, you may use that output file without restriction.
7
# This special exception was added by Craig Small in version 0.37 of dh-make.
8
9
# Uncomment this to turn on verbose mode.
10
#export DH_VERBOSE=1
11
12
# These are used for cross-compiling and for saving the configure script
13
# from having to guess our platform (since we know it already)
14
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
15
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16
17
18
CFLAGS = -Wall -g
19
20
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
21
	CFLAGS += -O0
22
else
23
	CFLAGS += -O2
24
endif
25
26
config.status: configure
27
	dh_testdir
28
	chmod a+x configure
29
	# Add here commands to configure the package.
30
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mesa-source=/usr/share/mesa-source --enable-xgl --enable-xglx --enable-glx --disable-xorg --disable-xvfb --disable-xnest --disable-dmx --with-fontdir=\$${prefix}/share/fonts/X11
31
32
5 by Christopher James Halse Rogers (RAOF)
Fix build rule typo in debian/rules
33
build: config.status
2 by Christopher James Halse Rogers (RAOF)
Initial import of packaging
34
	dh_testdir
35
36
	# Add here commands to compile the package.
37
	$(MAKE)
38
	#docbook-to-man debian/xserver-xgl.sgml > xserver-xgl.1
39
40
	touch build-stamp
41
42
clean: 
43
	dh_testdir
44
	dh_testroot
45
	rm -f build-stamp 
46
47
	# Add here commands to clean up after the build process.
17 by Christopher James Halse Rogers (RAOF)
Only run distclean when Makefile exists - the right way (thanks StevenK)
48
	if [ -f Makefile ] ; then $(MAKE) distclean ; fi
2 by Christopher James Halse Rogers (RAOF)
Initial import of packaging
49
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
50
	cp -f /usr/share/misc/config.sub config.sub
51
endif
52
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
53
	cp -f /usr/share/misc/config.guess config.guess
54
endif
55
56
57
	dh_clean 
58
59
install: build
60
	dh_testdir
61
	dh_testroot
62
	dh_clean -k 
63
	dh_installdirs
64
65
	# Add here commands to install the package into debian/xserver-xgl.
66
	$(MAKE) install DESTDIR=$(CURDIR)/debian/xserver-xgl
67
	# Don't distribute aclocal macros, we're not a devel package.
68
	rm -rf $(CURDIR)/debian/xserver-xgl/usr/share/aclocal
69
	rm -rf $(CURDIR)/debian/xserver-xgl/usr/share/man/man1/Xserver.1x
70
	rm -rf $(CURDIR)/debian/xserver-xgl/usr/share/man/man1/Xserver.1
71
	rm -rf $(CURDIR)/debian/xserver-xgl/usr/lib/pkgconfig/
72
73
	dh_install
74
75
# Build architecture-independent files here.
76
binary-indep: build install
77
# We have nothing to do by default.
78
79
# Build architecture-dependent files here.
80
binary-arch: build install
81
	dh_testdir
82
	dh_testroot
83
	dh_installchangelogs ChangeLog
84
	dh_installdocs
85
	dh_installexamples
86
	dh_installman
87
	dh_link
88
	dh_strip
89
	dh_compress
90
	dh_fixperms
91
	dh_installdeb
92
	dh_shlibdeps
93
	dh_gencontrol
94
	dh_md5sums
95
	dh_builddeb
96
97
binary: binary-indep binary-arch
98
.PHONY: build clean binary-indep binary-arch binary install