]> git.sesse.net Git - vlc/blob - debian/rules
debian/*: temporarely disable the xosd plugin
[vlc] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for the VLC media player - uses debhelper.
3 # $Id$
4 # based on Joey Hess's one.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8 include /usr/share/dpatch/dpatch.make
9
10 # These are used for cross-compiling and for saving the configure script
11 # from having to guess our platform (since we know it already)
12 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 confflags = --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) 
15
16 #
17 # Compilation options
18 #
19 vlc_confflags = --enable-release --prefix=/usr
20 vlc_confflags += \
21         --disable-gnome \
22         --disable-gtk \
23         --disable-familiar \
24         --disable-fb \
25         --enable-ggi \
26         --enable-sdl \
27         --enable-esd \
28         --disable-qt \
29         --enable-mad \
30         --enable-arts \
31         --enable-alsa \
32         --enable-lirc \
33         --enable-a52 \
34         --enable-aa \
35         --enable-dvbpsi \
36         --enable-mozilla \
37         --disable-kde \
38         --enable-mp4 \
39         --enable-dvb \
40         --enable-dv \
41         --disable-satellite \
42         --enable-ogg \
43         --enable-vorbis \
44         --enable-wxwidgets \
45         --with-wx-config=wx-config \
46         --disable-slp \
47         --enable-flac \
48         --disable-skins \
49         --disable-basic-skins \
50         --enable-skins2 \
51         --enable-freetype \
52         --enable-mkv \
53         --enable-v4l \
54         --enable-pvr \
55         --disable-speex \
56         --enable-caca \
57         --enable-livedotcom \
58         --enable-libmpeg2 \
59         --enable-dts \
60         --enable-fribidi \
61         --enable-cdio \
62         --enable-mod \
63         --enable-theora \
64         --enable-modplug \
65         --enable-dvdnav \
66         --enable-gnutls \
67         --enable-ffmpeg \
68         --enable-ncurses \
69         --enable-smb \
70         --disable-gnomevfs \
71         --enable-bonjour \
72         --enable-mpc \
73         --enable-vcd \
74         --enable-vcdx \
75         $(NULL)
76
77 #       --enable-xosd \
78
79 # These ones are currently shipped with VLC
80 vlc_confflags += --enable-faad --with-faad-tree=extras/faad2
81 vlc_confflags += --enable-x264 --with-x264-tree=extras/x264
82
83 # Glide and svgalib are only for x86
84 ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386)
85 vlc_confflags += --enable-glide
86 vlc_confflags += --enable-svgalib
87 endif
88
89 # We need this hack for i386 and amd64
90 ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386)
91 CC = $(shell pwd)/debian/gcc-snapshot
92 export CC
93 endif
94 ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),amd64)
95 CC = $(shell pwd)/debian/gcc-snapshot
96 export CC
97 endif
98
99 # Remove --without-dvdcss in non-totalitarian countries
100 vlc_confflags += --enable-dvd --without-dvdcss
101
102 # A few shortcuts
103 VIDDIR = usr/share/vlc
104 PIXDIR = usr/share/pixmaps
105 APPDIR = usr/share/applications
106
107
108 #
109 # Build rules
110 #
111
112 configure: configure-stamp
113 configure-stamp:
114         dh_testdir
115
116         # Touch stuff
117         touch configure.ac
118         touch aclocal.m4
119         touch configure
120         touch config.h.in
121         touch `find . -name Makefile.in`
122
123         # Check that we have an x264 tree in here (can be a symlink)
124         test -d extras/x264
125         cd extras/x264 \
126          && ./configure $(confflags) --extra-cflags='$$(ECFLAGS)' \
127                                      --extra-asflags='$$(EASFLAGS)' \
128          && $(MAKE)
129
130         # Check that we have an faad2 tree in here (can be a symlink)
131         test -d extras/faad2
132         cd extras/faad2 \
133          && touch `find . -name configure.in` \
134          && touch `find . -name aclocal.m4` \
135          && touch `find . -name configure` \
136          && touch `find . -name config.h.in` \
137          && touch `find . -name Makefile.in` \
138          && ./configure $(confflags) --disable-shared \
139          && cd libfaad \
140          && $(MAKE)
141
142         # Configure VLC
143         ./configure --mandir=$${prefix}/share/man \
144           --infodir=$${prefix}/share/info $(confflags) $(vlc_confflags)
145
146         touch configure-stamp
147
148 build: build-stamp
149 build-stamp: patch configure-stamp
150         dh_testdir
151
152         # Build only VLC, with the non-PIC libs
153         $(MAKE) include/vlc_symbols.h
154         cd modules && AM_MAKEFLAGS='plugin=no pic=no' $(MAKE)
155         $(MAKE) vlc
156
157         # Hackety hackety hack
158         cd extras/x264 && $(MAKE) clean && $(MAKE) ECFLAGS=-fPIC EASFLAGS=-D__PIC__
159
160         # HACKETY HACKETY HACK
161         cd extras/faad2/libfaad && $(MAKE) clean && $(MAKE) AM_CFLAGS=-fPIC
162
163         # Build all the rest, with the PIC libs
164         AM_MAKEFLAGS='builtin=no' $(MAKE)
165
166         # Minor test, to see which plugins were built and whether they load
167         # properly.
168 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
169         ./vlc --reset-plugins-cache -l -I rc vlc:quit
170 endif
171
172         touch build-stamp
173
174 clean: unpatch
175         dh_testdir
176         dh_testroot
177         rm -f configure-stamp build-stamp
178
179         # Check that we have an x264 tree in here (can be a symlink)
180         test -d extras/x264
181         -cd extras/x264 && $(MAKE) distclean
182         # Check that we have an faad2 tree in here (can be a symlink)
183         test -d extras/faad2
184         -cd extras/faad2 && $(MAKE) distclean
185
186         # Clean zsh completion stuff
187         rm -f extras/zsh
188
189         # Removed ugly cruft
190         rm -f src/misc/modules_builtin.h
191         rm -f mozilla/vlcintf.xpt mozilla/vlcintf.h
192
193         # Remove spurious autotools stuff
194         rm -f config.log confdefs.h
195
196         -$(MAKE) distclean
197
198         dh_clean
199
200 install: build
201         dh_testdir
202         dh_testroot
203         dh_clean -k
204         dh_installdirs
205
206         DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
207
208         # Package: vlc
209         mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
210         mv debian/vlc/$(VIDDIR)/vlc32x32.xpm debian/vlc/$(VIDDIR)/vlc.xpm
211         cp debian/gvlc.desktop debian/gvlc/$(APPDIR)
212         cp debian/gnome-vlc.desktop debian/gnome-vlc/$(APPDIR)
213
214         #cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc
215         #strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat
216
217         rm -Rf debian/vlc/$(VIDDIR)/skins
218         ln -s vlc.1.gz debian/vlc/usr/share/man/man1/svlc.1.gz
219
220         # Package: libvlc0-dev
221         mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
222         mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
223         mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
224         mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
225         rm -Rf debian/vlc/usr/include
226         ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
227
228         # Package: gnome-vlc
229         #mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
230         ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
231         #mv debian/vlc/usr/lib/vlc/misc/libgnome_main_plugin.so \
232         #  debian/gnome-vlc/usr/lib/vlc/gui/
233         #mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
234         #  debian/gnome-vlc/usr/lib/vlc/gui/
235         #ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
236         #mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
237         #mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
238
239         # Package: gvlc
240         #mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
241         ln -s vlc debian/gvlc/usr/share/doc/gvlc
242         #mv debian/vlc/usr/lib/vlc/misc/libgtk_main_plugin.so \
243         #  debian/gvlc/usr/lib/vlc/gui/
244         #mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
245         #  debian/gvlc/usr/lib/vlc/gui/
246         #mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
247         #  debian/gvlc/usr/lib/vlc/gui/
248         #ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
249         #mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
250         #mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
251
252         # Package: vlc-plugin-esd
253         ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
254         mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \
255           debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
256
257         # Package: vlc-plugin-alsa
258         ln -s vlc debian/vlc-plugin-alsa/usr/share/doc/vlc-plugin-alsa
259         mv debian/vlc/usr/lib/vlc/audio_output/libalsa_plugin.so \
260           debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/
261
262         # Package: vlc-plugin-sdl
263         ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
264         mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \
265           debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
266         mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \
267           debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
268
269         # Package: vlc-plugin-ggi
270         ln -s vlc debian/vlc-plugin-ggi/usr/share/doc/vlc-plugin-ggi
271         mv debian/vlc/usr/lib/vlc/video_output/libggi_plugin.so \
272           debian/vlc-plugin-ggi/usr/lib/vlc/video_output/
273
274         # Package: vlc-plugin-glide
275 ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386)
276         ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
277         mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \
278           debian/vlc-plugin-glide/usr/lib/vlc/video_output/
279 endif
280
281         # Package: qvlc
282         #mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
283         ln -s vlc debian/qvlc/usr/share/doc/qvlc
284         #mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
285         #  debian/qvlc/usr/lib/vlc/gui/
286         #ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
287         #mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
288         #mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
289
290         # Package: vlc-plugin-arts
291         ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
292         mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \
293           debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
294
295         # Package: mozilla-plugin-vlc
296         ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
297         mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
298         # links for firefox
299         mkdir -p debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/plugins/
300         ln -s ../../mozilla/plugins/libvlcplugin.so debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/plugins/
301         mkdir -p debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/components/
302         ln -s ../../mozilla/components/vlcintf.xpt debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/components/
303
304         # Package: kvlc
305         #mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
306         ln -s vlc debian/kvlc/usr/share/doc/kvlc
307         #mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
308         #  debian/kvlc/usr/lib/vlc/gui/
309         #mv debian/vlc/$(VIDDIR)/ui.rc debian/kvlc/$(VIDDIR)
310         #ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
311         #mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
312         #mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
313
314         # Package: vlc-plugin-svgalib
315 ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386)
316         ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
317         mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
318           debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
319 endif
320
321         # Package: wxvlc
322         mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
323         ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
324         cp debian/vlc/$(VIDDIR)/vlc.xpm debian/wxvlc/$(VIDDIR)/wxvlc.xpm
325         cp debian/vlc.desktop debian/wxvlc/$(APPDIR)
326         mv debian/vlc/usr/lib/vlc/gui/libwxwidgets_plugin.so \
327           debian/wxvlc/usr/lib/vlc/gui/
328         ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz
329
330         # Clean up
331         rm -f debian/vlc/$(VIDDIR)/*.png
332
333         #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
334
335 # Build architecture-independent files here.
336 binary-indep: build install
337 # We have nothing to do by default.
338
339 # Build architecture-dependent files here.
340 binary-arch: build install
341 #       dh_testversion
342         dh_testdir
343         dh_testroot
344 #       dh_installdebconf       
345         dh_installdocs -p vlc
346         dh_buildinfo -p vlc
347 #       dh_installexamples
348         dh_installmenu -s
349         dh_installmime -s
350         dh_installman doc/vlc.1 -p vlc
351         dh_installman doc/vlc-config.1 -p libvlc0-dev
352         dh_installchangelogs ChangeLog -p vlc
353         for x in doc/ChangeLog-* ; do cp "doc/ChangeLog-$${x#*-}" "debian/vlc/usr/share/doc/vlc/changelog$${x#*-}" ; done
354         dh_link -s
355         dh_strip -s
356         dh_compress -s
357         dh_fixperms -s
358         dh_makeshlibs -s
359         dh_installdeb -s
360 #       dh_perl
361         dh_shlibdeps -s
362         dh_gencontrol -s
363         dh_md5sums -s
364         dh_builddeb -s
365
366 binary: binary-indep binary-arch
367 .PHONY: build clean binary-indep binary-arch binary install
368