~medibuntu-maintainers/mplayer/medibuntu.natty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Gauvain Pocentek
  • Date: 2010-09-25 09:39:02 UTC
  • mfrom: (66.1.6 maverick)
  • Revision ID: gauvain@images-20100925093902-9q2akz3ls3qzhaaw
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* merge from debian, remaining changes:
  - build depend against, lame, x264, xvid
* debian/patches/60eval-api.patch, backport patch from upstream to
  unbreak compilation for eval.h move not yet in 0.6
* gmplayer is gone now, please see smplayer as alternative frontend.
  LP: #503537, #493088, #467534, #467524, #460326, #390399, #285570,
      #208680, #118709, #513065, #459595, #455913, #179918, #65165.
* enable the mencoder package
* sort build depends alphabetically
* enable dvdnav support, Closes: #582508, #488226, LP: #611749
* prepare new upload
* no longer build mplayer-gui, it doesn't build anymore with shared
  swscale
* merge from debian/experimental, remaining changes:
  - build depend against, lame, x264, xvid
  - enable mencoder and mplayer-gui
* ensure that quilt patches are actually applied
* New Upstream Version, LP: #539315
* Build (against) again the System FFmpeg 
* tighten dependency on FFmpeg 0.6
* remove patches merged upstream
* remove 22disable-xscreensaver.patch
* refresh patches
* readd x264, xvid and mp3lame support, LP: #606125
* remove old parallel building mechanism, fixes FTBFS
* New upstream version
* compile against internal ffmpeg for now, LP: #587203, #588097
* recompile for directfb transtion, LP: #587163
* remove patches that were merged upstream
* avoid removing DOCS/html directory. it is included in release
  tarball
* convert to source Format: 3.0 (quilt)
* refreshed patches
* remove files that are included in upstream tarball
* rework debian/rules file
  - support parallel building
  - merge build rules for mplayer and mencoder package
  - remove unreferenced COMMON_CONFIGURE_FLAGS macro
  - rename DEB_BUILD_CONFIGURE -> CONFIGURE_FLAGS
  - don't build documentation - release tarballs have them prebuilt
  - build HTML documentation only if not already avaiable in the build
    tree
  - remove remaining references to debian/strip.sh from debian/rules
* remove copied vdpau headers
* copy in mencoder.c from upstream
* enable mplayer-gui (Closes: #579925) and mencoder packages. 
  (Closes: #396954, #400940, #580168)
* Fix rtsp vulnerability. Patch applied by DSA. Closes: #581245
* Fix another integer overflow, Closes: #524805
* prepare new upload
* sync libao2/ao_pulse.c with svn r30062, Closes: #558196, #580113
* make configure use pkg-config for fribidi checks. Closes: #582784,
  LP: #556200
* document 23mplayer-debug-printf.patch
* avoid mentioning of GTK frontend in mplayer description
* improve package descriptions of mplayer-doc and mplayer-dbg
* medium urgency because of fixed security issue
* fix SVN_VERION regex in debian rules to unbreak get-orig-source
  target. Closes: #582369
* forcefully disable arts support. Closes: #581225
* Remove mencoder from Depends in mplayer-dbg package.
* new upstream snapshot from rc3 branch.
* remove patches applied upstream:
  
  - 24_enable_fontconfig_by_default.diff
  - 30_add_gmplayer_man_rules.diff
  - 40_improve_desktop_file.patch
  - 41_fix_forcedsubsonly.patch
  - 50_fix_crashes_with_invalid_SDPs.patch
  - 50_fix_initial_volume_setting_pulse_output.patch
  - 61-malloc-bsd.patch
  - 62-disable-vidix-on-kfreebsd-amd64.patch
  - 63-sys-kd-include.patch
* don't install apport hook
* gross hack to avoid building mplayer-nogui and mplayer-gui packages
* add md5sum to remove to avoid spurious conffile prompt, Closes: #568272
* Make mplayer build on kFreeBSD (backports from upstream), Closes: #578622
  - Revert obscure hack that disables the malloc.h check on certain BSD
    platforms. 
  - disable vidix on kFreeBSD-amd64
  - rename 'struct keypad' -> 'struct m_keypad' to avoid FTBFS on
    kFreeBSD/amd64
* enable fontconfig by default. (Closes: #573257)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
include /usr/share/quilt/quilt.make
4
 
 
5
3
# This has to be exported to make some magic below work.
6
4
export DH_OPTIONS
7
5
 
 
6
# Support multiple makes at once
 
7
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
8
NUMJOBS = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
9
else
 
10
# on i386 and amd64, we query the system unless overriden by DEB_BUILD_OPTIONS
 
11
ifeq      ($(DEB_BUILD_ARCH),i386)
 
12
NUMJOBS := -j$(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
 
13
else ifeq ($(DEB_BUILD_ARCH),amd64)
 
14
NUMJOBS := -j$(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
 
15
endif
 
16
endif
 
17
 
 
18
 
8
19
# do not run the actual rules of this makefile in parallel. sub-makes
9
20
# can go in parallel
10
21
.NOTPARALLEL:
14
25
DEB_SOURCE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
15
26
DEB_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
16
27
UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -r 's/[^:]+://; s/-[^-]+$$//')
17
 
SVN_VERSION := $(shell echo $(UPSTREAM_VERSION) | sed -nr 's/^[0-9.:-~]+svn([0-9]+)$$/\1/p')
 
28
SVN_VERSION := $(shell echo $(UPSTREAM_VERSION) | sed -nr 's/^[0-9.:-~]+\+svn([0-9]+)$$/\1/p')
18
29
 
19
30
 
20
31
#UPSTREAMSOURCE := upstream SVN repository
28
39
 
29
40
 
30
41
# XXX enable-menu is frowned upon by upstream
31
 
DEB_BUILD_CONFIGURE = \
 
42
CONFIGURE_FLAGS = \
32
43
        --prefix=/usr \
33
44
        --confdir=/etc/mplayer \
34
45
        --enable-xvmc \
35
46
        --enable-menu \
 
47
        --disable-arts \
36
48
        --enable-largefiles \
37
49
        --language=all \
38
50
        --disable-libdvdcss-internal \
48
60
#configure optimizes for the cpu detected at ./configure time
49
61
#in order to build a generic binary, avoid non-standard opcodes through gcc
50
62
  archconf += --target=i586-linux
51
 
  DEB_BUILD_CONFIGURE += --enable-runtime-cpudetection
 
63
  CONFIGURE_FLAGS += --enable-runtime-cpudetection
52
64
endif
53
65
ifeq ($(DEB_HOST_ARCH),amd64)
54
 
  DEB_BUILD_CONFIGURE += --enable-runtime-cpudetection
 
66
  CONFIGURE_FLAGS += --enable-runtime-cpudetection
55
67
endif
56
68
ifeq ($(DEB_HOST_ARCH),kfreebsd-i386)
57
 
  DEB_BUILD_CONFIGURE += --enable-runtime-cpudetection
 
69
  CONFIGURE_FLAGS += --enable-runtime-cpudetection
58
70
endif
59
71
ifeq ($(DEB_HOST_ARCH),kfreebsd-amd64)
60
 
  DEB_BUILD_CONFIGURE += --enable-runtime-cpudetection
 
72
  CONFIGURE_FLAGS += --enable-runtime-cpudetection
61
73
endif
62
74
ifeq ($(DEB_HOST_ARCH),powerpc)
63
 
  DEB_BUILD_CONFIGURE += --enable-runtime-cpudetection
 
75
  CONFIGURE_FLAGS += --enable-runtime-cpudetection
64
76
endif
65
77
ifeq ($(DEB_HOST_ARCH),alpha)
66
78
#Avoid high optimization through gcc.
71
83
# generate debugging symbols for mplayer-dbg for all archs but mipsen,
72
84
# see bug #520113
73
85
ifeq (,$(findstring mips,$(DEB_HOST_ARCH)))
74
 
DEB_BUILD_CONFIGURE += --enable-debug
75
 
endif
76
 
 
77
 
 
78
 
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
79
 
         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
80
 
         MAKEFLAGS += -j$(NUMJOBS)
81
 
endif
82
 
 
 
86
CONFIGURE_FLAGS += --enable-debug
 
87
endif
83
88
 
84
89
ifeq (linux,$(DEB_HOST_ARCH_OS))
85
 
    DEB_BUILD_CONFIGURE += --enable-mga --enable-3dfx --enable-tdfxfb
 
90
    CONFIGURE_FLAGS += --enable-mga --enable-3dfx --enable-tdfxfb
86
91
endif
87
92
 
88
 
####### build-arch
89
 
 
90
 
 
91
93
# See http://wiki.debian.org/Teams/Dpkg/DebianRules; #465282  and
92
94
# https://wiki.ubuntu.com/DistCompilerFlags
93
95
CLEAN_ENV=env -u CFLAGS -u CPPFLAGS -u LDFLAGS -u FFLAGS -u CXXFLAGS
94
96
 
 
97
build: build-arch build-indep
95
98
 
96
 
install-arch: $(QUILT_STAMPFN)
 
99
####### build-arch
 
100
build-arch:
97
101
        dh_testdir
98
102
        dh_prep -a
99
 
        [ ! -f config.mak ] || $(MAKE) distclean
100
 
        echo "$(UPSTREAM_VERSION)" > snapshot_version
101
 
        $(CLEAN_ENV) \
102
 
        ./configure $(COMMON_CONFIGURE_FLAGS) $(DEB_BUILD_CONFIGURE) --disable-gui
103
 
        $(CLEAN_ENV) \
104
 
        $(MAKE)
105
 
        # build non-gui version
 
103
        $(CLEAN_ENV) \
 
104
        ./configure $(CONFIGURE_FLAGS) --disable-gui
 
105
        $(CLEAN_ENV) \
 
106
        $(MAKE) $(NUMJOBS) mplayer mencoder
106
107
        $(MAKE) install-mplayer DESTDIR=$(CURDIR)/debian/mplayer
107
108
        $(MAKE) install-mplayer-man DESTDIR=$(CURDIR)/debian/mplayer
 
109
        $(MAKE) install-mencoder DESTDIR=$(CURDIR)/debian/mencoder
108
110
        $(MAKE) install-mencoder-man DESTDIR=$(CURDIR)/debian/mplayer
109
111
        install -D -m 644 debian/mplayer.conf \
110
112
                          $(CURDIR)/debian/mplayer/etc/mplayer/mplayer.conf
111
 
        install -D -m 644 debian/apport-hook.py \
112
 
                          $(CURDIR)/debian/mplayer/usr/share/apport/package-hooks/source_mplayer.py
113
 
        #install mencoder
114
 
        $(MAKE) install-mencoder DESTDIR=$(CURDIR)/debian/mencoder
115
 
        # build gui version
116
 
        [ ! -f config.mak ] || $(MAKE) distclean
117
 
        $(CLEAN_ENV) \
118
 
        ./configure $(COMMON_CONFIGURE_FLAGS) $(DEB_BUILD_CONFIGURE) --enable-gui
119
 
        $(CLEAN_ENV) \
120
 
        $(MAKE)
121
 
        install -D -m 755 mplayer $(CURDIR)/debian/mplayer-gui/usr/bin/gmplayer
122
 
        install -D -m 644 etc/mplayer.desktop \
123
 
                          $(CURDIR)/debian/mplayer-gui/usr/share/applications/mplayer.desktop
124
 
        install -D -m 644 etc/mplayer.xpm \
125
 
                          $(CURDIR)/debian/mplayer-gui/usr/share/pixmaps/mplayer.xpm
 
113
 
 
114
 
 
115
# binaries already installed via build rules as we have to build several flavors
 
116
install-arch: build-arch
126
117
 
127
118
###### build-indep
128
 
 
129
 
# commands to compile the documentation
130
 
install-indep: install-indep-stamp
131
 
install-indep-stamp:
132
 
        dh_testdir
 
119
DOCS/HTML/en/index.html:
133
120
        sh debian/all-lang-config-mak.sh > config.mak
134
121
        cd DOCS/xml && ./configure
135
122
        $(MAKE) -C DOCS/xml html-chunked
 
123
 
 
124
build-indep:
 
125
        dh_testdir
 
126
        dh_prep -i
 
127
        test ! -f DOCS/HTML/en/index.html || $(MAKE) -f debian/rules DOCS/HTML/en/index.html
 
128
 
 
129
# commands to compile the documentation
 
130
install-indep: build-indep
136
131
        dh_installchangelogs -i
137
132
        dh_installdocs -i
138
133
        dh_compress -i
139
134
        dh_fixperms -i
140
 
        touch $@
141
135
 
142
136
################ clean
143
137
 
144
 
clean: clean-real unpatch
145
 
clean-real:
 
138
clean:
146
139
        dh_testdir
147
140
        dh_testroot
148
 
        [ ! -f config.mak ] || $(MAKE) -C DOCS/xml distclean || true
149
 
        [ ! -f config.mak ] || $(MAKE) distclean
150
 
        dh_clean build-arch-stamp configure-arch-stamp snapshot_version
 
141
        [ ! -f config.mak ] || $(MAKE) -C DOCS/xml releaseclean && $(MAKE) distclean
 
142
        dh_clean snapshot_version
 
143
        ! test -d .git || quilt pop -a || test $$? = 2
151
144
 
152
145
# Build architecture-independent packages
153
146
binary-indep: install-indep
176
169
 
177
170
binary: binary-indep binary-arch
178
171
 
179
 
###############################################
180
 
##These targets generate the DFSG-free tar.gz.
181
 
## They are not automatically invoked.
182
 
 
183
172
get-orig-source:
184
173
        dh_testdir
185
 
        # strip patented code
186
 
        chmod +x debian/strip.sh
187
174
        sh debian/get-orig-source.sh -d $(SVN_VERSION)
188
175
 
189
176
PHONY += build clean binary-indep binary-arch binary-common binary 
190
177
PHONY += install binary binary-arch binary-indep clean checkroot get-orig-source
191
178
PHONY += autocontrol fix-orig-source copy-orig-from-svn download-and-unpack-orig
192
 
PHONY += build-gui build-nogui install-gui install-nogui
193
179
 
194
180
.PHONY: $(PHONY)