~ubuntu-branches/ubuntu/raring/xserver-xorg-video-sis/raring

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2011-02-05 14:55:47 UTC
  • mfrom: (4.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20110205145547-ni0uqf5nk53n2682
Tags: 1:0.10.3-3
* Switch to dh:
  - Use debhelper 8.
  - Use dh-autoreconf.
  - Bump xserver-xorg-dev build-dep for dh_xsf_substvars and xsf
    debhelper sequence.
* Remove xsfbs accordingly.
* Update Uploaders list. Thanks, David & Brice!
* Remove long obsolete Replaces/Conflicts.
* Wrap Depends/Provides.
* Bump Standards-Version to 3.9.1 (no changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# debian/rules for the Debian xserver-xorg-driver-sis package.
3
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>
4
 
# Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
5
 
# Copyright © 2005 David Nusinow <dnusinow@debian.org>
6
 
 
7
 
# Uncomment this to turn on verbose mode.
8
 
#export DH_VERBOSE=1
9
 
 
10
 
include debian/xsfbs/xsfbs.mk
11
 
 
12
 
CFLAGS = -Wall -g
13
 
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
14
 
        CFLAGS += -O0
15
 
else
16
 
        CFLAGS += -O2
17
 
endif
18
 
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
19
 
        NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
20
 
        MAKEFLAGS += -j$(NUMJOBS)
21
 
endif
22
 
 
23
 
DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
24
 
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
25
 
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
26
 
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
27
 
        confflags += --build=$(DEB_HOST_GNU_TYPE)
28
 
else
29
 
        confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
30
 
endif
31
 
 
32
 
NEED_FUNCTIONSECTIONS := hppa mips mipsel
33
 
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),$(NEED_FUNCTIONSECTIONS)))
34
 
    CFLAGS += -ffunction-sections
35
 
endif
36
 
 
37
 
# kbd_drv.a isn't phenomenally useful; kbd_drv.so more so
38
 
confflags += --disable-static
39
 
 
40
 
configure: $(STAMP_DIR)/patch
41
 
        autoreconf -vfi
42
 
 
43
 
build/config.status: configure
44
 
        mkdir -p build
45
 
        cd build && \
46
 
        ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
47
 
                     --infodir=\$${prefix}/share/info $(confflags) \
48
 
                     CFLAGS="$(CFLAGS)" 
49
 
 
50
 
build: build-stamp
51
 
build-stamp: build/config.status
52
 
        dh_testdir
53
 
        cd build && $(MAKE)
54
 
        >$@
55
 
 
56
 
clean: xsfclean
57
 
        dh_testdir
58
 
        dh_testroot
59
 
        rm -f build-stamp
60
 
 
61
 
        rm -f config.cache config.log config.status
62
 
        rm -f */config.cache */config.log */config.status
63
 
        rm -f conftest* */conftest*
64
 
        rm -rf autom4te.cache */autom4te.cache
65
 
        rm -rf build
66
 
        rm -f $$(find -name Makefile.in)
67
 
        rm -f aclocal.m4 config.guess config.h.in config.sub configure
68
 
        rm -f depcomp install-sh ltmain.sh missing mkinstalldirs
69
 
 
70
 
        dh_clean
71
 
 
72
 
install: build
73
 
        dh_testdir
74
 
        dh_testroot
75
 
        dh_clean -k
76
 
        dh_installdirs
77
 
 
78
 
        cd build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
79
 
 
80
 
# Build architecture-dependent files here.
81
 
binary-arch: build install serverabi
82
 
        dh_testdir
83
 
        dh_testroot
84
 
 
85
 
        dh_installdocs
86
 
        dh_installchangelogs ChangeLog
87
 
        dh_install --sourcedir=debian/tmp --list-missing
88
 
        dh_link
89
 
        dh_strip
90
 
        dh_compress
91
 
        dh_fixperms
92
 
        dh_installdeb
 
2
 
 
3
# Install in debian/tmp to retain control through dh_install:
 
4
override_dh_auto_install:
 
5
        dh_auto_install --destdir=debian/tmp
 
6
 
 
7
# Kill *.la files, and forget no-one:
 
8
override_dh_install:
 
9
        find debian/tmp -name '*.la' -delete
 
10
        dh_install --fail-missing
 
11
 
 
12
# That's a plugin, use appropriate warning level:
 
13
override_dh_shlibdeps:
93
14
        dh_shlibdeps -- --warnings=6
94
 
        dh_gencontrol
95
 
        dh_md5sums
96
 
        dh_builddeb
97
 
 
98
 
# Build architecture-independent files here.
99
 
binary-indep: build install
100
 
# Nothing to do
101
 
 
102
 
binary: binary-indep binary-arch
103
 
.PHONY: build clean binary-indep binary-arch binary install
 
15
 
 
16
%:
 
17
        dh $@ --with quilt,autoreconf,xsf --builddirectory=build/