~ubuntu-branches/ubuntu/precise/xorg-lts-raring/precise-updates

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Maarten Lankhorst
  • Date: 2013-05-08 09:06:14 UTC
  • Revision ID: package-import@ubuntu.com-20130508090614-2n1cmnq6ofw9nucc
Tags: 1:7.7+1ubuntu4~precise1
Initial lts-raring xserver stack upload, i386 and amd64 only. (LP:
#1177679)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# Debian rules file for xfree86 source package
 
3
# Originally by Stephen Early <sde1000@debian.org>
 
4
# Modified by Mark W. Eichin <eichin@kitten.gen.ma.us>
 
5
# Modified by Adam Heath <doogie@debian.org>
 
6
# Modified by Branden Robinson <branden@debian.org>
 
7
# Modified by Fabio Massimo Di Nitto <fabbione@fabbione.net>
 
8
# Modified by Daniel Stone <daniel.stone@ubuntu.com>
 
9
# Modified by David Nusinow <dnusinow@debian.org>
 
10
# Copyright 1996--2005 Software in the Public Interest, Inc.
 
11
# Licensed under the GNU General Public License, version 2.  See the file
 
12
# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
 
13
# Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava.
 
14
 
 
15
DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
16
DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
17
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 
18
CC=$(DEB_HOST_GNU_TYPE)-gcc
 
19
else
 
20
CC ?=gcc
 
21
endif
 
22
CFLAGS = \
 
23
        -Wall \
 
24
        $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CFLAGS)
 
25
CPPFLAGS = \
 
26
        $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CPPFLAGS)
 
27
LDFLAGS = \
 
28
        $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get LDFLAGS)
 
29
 
 
30
# debhelper
 
31
export DH_OPTIONS
 
32
 
 
33
include debian/xsfbs/xsfbs.mk
 
34
 
 
35
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
36
ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
37
 
 
38
# Read in architecture-specific variables of importance.
 
39
include debian/scripts/vars.$(ARCH)
 
40
 
 
41
clean: cleanscripts
 
42
        dh_testdir
 
43
        dh_clean debian/local/X debian/po/pothead
 
44
        -rm -rf stampdir
 
45
        -debconf-updatepo
 
46
 
 
47
 
 
48
SCRIPTS=$(shell ls debian/*.config.in debian/*.postinst.in debian/*.postrm.in debian/*.preinst.in debian/*.prerm.in)
 
49
 
 
50
scripts: scripts-stamp
 
51
scripts-stamp: genscripts
 
52
        touch $@
 
53
 
 
54
build: build-stamp
 
55
build-stamp: scripts-stamp
 
56
        dh_testdir
 
57
        # build Debian's X server wrapper
 
58
        $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o debian/local/X debian/local/xserver-wrapper.c
 
59
        touch $@
 
60
 
 
61
build-arch-only: build
 
62
build-all:
 
63
 
 
64
install: install-stamp
 
65
install-stamp: build-stamp
 
66
        dh_testdir
 
67
        dh_testroot
 
68
        dh_prep
 
69
        touch $@
 
70
 
 
71
binary-indep: DH_OPTIONS=-i
 
72
binary-indep: build install
 
73
        dh_testdir
 
74
        dh_testroot
 
75
        dh_install
 
76
        dh_installdebconf
 
77
        dh_installdirs
 
78
        dh_installdocs
 
79
        dh_installchangelogs
 
80
        dh_installman
 
81
        dh_lintian
 
82
        dh_link
 
83
        dh_compress
 
84
        set -e ;\
 
85
        for p in $$(dh_listpackages -i); do \
 
86
          ( \
 
87
            echo "# Undo doc-dir symlinking.  Leave this to pkgbinarymangler"; \
 
88
            echo "# This can be removed after the next LTS" ; \
 
89
            echo 'if [ "$$1" = upgrade ] && [ -L /usr/share/doc/'$$p' ]; then'; \
 
90
            echo "    rm -f /usr/share/doc/$$p"; \
 
91
            echo "fi"; \
 
92
          ) >> debian/$$p.preinst.debhelper; \
 
93
        done
 
94
        dh_fixperms
 
95
        dh_installdeb
 
96
        dh_gencontrol
 
97
        dh_md5sums
 
98
        dh_builddeb
 
99
        touch $@-stamp
 
100
 
 
101
binary-arch: DH_OPTIONS=-s
 
102
binary-arch: build install
 
103
        dh_testdir
 
104
        dh_testroot
 
105
        dh_install
 
106
ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
 
107
        install -d debian/xserver-xorg-lts-raring/usr/lib/hal
 
108
        install -d debian/xserver-xorg-lts-raring/usr/share/hal/fdi/policy/10osvendor
 
109
        install -m 755 debian/local/debian-setup-keyboard debian/xserver-xorg-lts-raring/usr/lib/hal
 
110
        install -m 644 debian/local/debian-x11-keymap.fdi debian/xserver-xorg-lts-raring/usr/share/hal/fdi/policy/10osvendor
 
111
endif
 
112
        dh_installdebconf
 
113
        dh_installdirs
 
114
        dh_installdocs
 
115
        dh_installexamples
 
116
        dh_installman
 
117
        dh_installchangelogs
 
118
        dh_lintian
 
119
        dh_link
 
120
        dh_strip
 
121
        dh_compress
 
122
        set -e ;\
 
123
        for p in $$(dh_listpackages -a); do \
 
124
          ( \
 
125
            echo "# Undo doc-dir symlinking.  Leave this to pkgbinarymangler."; \
 
126
            echo "# This can be removed after the next LTS" ; \
 
127
            echo 'if [ "$$1" = upgrade ] && [ -L /usr/share/doc/'$$p' ]; then'; \
 
128
            echo "    rm -f /usr/share/doc/$$p"; \
 
129
            echo "fi"; \
 
130
          ) >> debian/$$p.preinst.debhelper; \
 
131
        done
 
132
        dh_fixperms
 
133
        chown root:root debian/xserver-xorg-lts-raring/usr/bin/X
 
134
        chmod ug+s debian/xserver-xorg-lts-raring/usr/bin/X
 
135
        dh_installdeb
 
136
        dh_shlibdeps
 
137
        dh_gencontrol -- -VF:XServer-Xorg-Video-Depends=$(XSERVER_XORG_VIDEO_DEPENDS) \
 
138
                         -VF:XServer-Xorg-Input-Depends=$(XSERVER_XORG_INPUT_DEPENDS) \
 
139
                         -VF:XServer-Xorg-Video-Recommends=$(XSERVER_XORG_VIDEO_RECOMMENDS) \
 
140
                         -VF:XServer-Xorg-Input-Recommends=$(XSERVER_XORG_INPUT_RECOMMENDS)
 
141
        dh_md5sums
 
142
        dh_builddeb
 
143
        touch $@-stamp
 
144
 
 
145
binary: binary-indep binary-arch
 
146
 
 
147
.PHONY: default
 
148
.PHONY: genscripts cleanscripts scripts
 
149
.PHONY: updatepo
 
150
.PHONY: clean configure install
 
151
.PHONY: build build-arch-only build-all
 
152
.PHONY: binary binary-arch binary-indep
 
153
.PHONY: environment
 
154
 
 
155
# vim:set noet ai sts=8 sw=8 tw=0: