2 # debian/rules for the VLC media player - uses debhelper.
4 # based on Joey Hess's one.
6 # Uncomment this to turn on verbose mode.
8 include /usr/share/dpatch/dpatch.make
14 CONFIG_FLAGS = --enable-release --prefix=/usr
41 --with-wx-config=wxgtk-2.4-config \
45 --disable-basic-skins \
67 # These ones are currently shipped with VLC
68 CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad2
69 CONFIG_FLAGS += --enable-x264 --with-x264-tree=extras/x264
71 # Glide and svgalib are only for x86
72 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
73 CONFIG_FLAGS += --enable-glide
74 CONFIG_FLAGS += --enable-svgalib
77 # Remove --without-dvdcss in non-totalitarian countries
78 CONFIG_FLAGS += --enable-dvd --without-dvdcss
81 VIDDIR = usr/share/vlc
82 PIXDIR = usr/share/pixmaps
83 GNOMEDIR = usr/share/gnome/apps/Multimedia
89 configure: configure-stamp
98 touch `find . -name Makefile.in`
100 # Check that we have an x264 tree in here (can be a symlink)
102 if test ! '(' -d CVS -o -d .svn ')'; then \
104 && jam -dx libx264.a; \
107 # Check that we have an faad2 tree in here (can be a symlink)
109 if test ! '(' -d CVS -o -d .svn ')'; then \
111 && touch `find . -name configure.in` \
112 && touch `find . -name aclocal.m4` \
113 && touch `find . -name configure` \
114 && touch `find . -name config.h.in` \
115 && touch `find . -name Makefile.in` \
116 && ./configure --disable-shared \
122 ./configure --mandir=$${prefix}/share/man \
123 --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
125 touch configure-stamp
128 build-stamp: patch configure-stamp
131 # Build only VLC, with the non-PIC libs
132 $(MAKE) include/vlc_symbols.h
133 cd modules && AM_MAKEFLAGS='plugin=no pic=no' $(MAKE)
136 # Hackety hackety hack
137 if test ! '(' -d CVS -o -d .svn ')'; then \
140 && rm -f Jamfile.pic \
141 && sed 's/^CCFLAGS *=/& -fPIC -DPIC /' <Jamfile >Jamfile.pic \
142 && jam -dx -sJAMFILE=Jamfile.pic libx264.a \
143 && rm -f Jamfile.pic; \
146 # HACKETY HACKETY HACK
147 if test ! '(' -d CVS -o -d .svn ')'; then \
148 cd extras/faad2/libfaad \
150 && $(MAKE) AM_CFLAGS=-fPIC; \
153 # Build all the rest, with the PIC libs
154 AM_MAKEFLAGS='builtin=no' $(MAKE)
161 rm -f configure-stamp build-stamp
163 # Check that we have an x264 tree in here (can be a symlink)
165 -if test ! '(' -d CVS -o -d .svn ')'; then \
166 cd extras/x264 && jam -dx clean; \
168 # Check that we have an faad2 tree in here (can be a symlink)
170 -if test ! '(' -d CVS -o -d .svn ')'; then \
171 cd extras/faad2 && $(MAKE) distclean; \
175 rm -f src/misc/modules_builtin.h
176 rm -f mozilla/vlcintf.xpt mozilla/vlcintf.h
178 # Remove spurious autotools stuff
179 rm -f config.log confdefs.h
191 DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
194 mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
195 mv debian/vlc/$(VIDDIR)/vlc32x32.xpm debian/vlc/$(VIDDIR)/vlc.xpm
196 cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
197 cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
199 #cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc
200 #strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat
202 rm -Rf debian/vlc/$(VIDDIR)/skins
203 ln -s vlc.1.gz debian/vlc/usr/share/man/man1/svlc.1.gz
205 # Package: libvlc0-dev
206 mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
207 mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
208 mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
209 mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
210 rm -Rf debian/vlc/usr/include
211 ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
214 #mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
215 ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
216 #mv debian/vlc/usr/lib/vlc/misc/libgnome_main_plugin.so \
217 # debian/gnome-vlc/usr/lib/vlc/gui/
218 #mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
219 # debian/gnome-vlc/usr/lib/vlc/gui/
220 #ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
221 #mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
222 #mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
225 mkdir -p debian/vlc-gnome/usr/share/doc/
226 ln -s vlc debian/vlc-gnome/usr/share/doc/vlc-gnome
229 #mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
230 ln -s vlc debian/gvlc/usr/share/doc/gvlc
231 #mv debian/vlc/usr/lib/vlc/misc/libgtk_main_plugin.so \
232 # debian/gvlc/usr/lib/vlc/gui/
233 #mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
234 # debian/gvlc/usr/lib/vlc/gui/
235 #mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
236 # debian/gvlc/usr/lib/vlc/gui/
237 #ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
238 #mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
239 #mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
242 mkdir -p debian/vlc-gtk/usr/share/doc/
243 ln -s vlc debian/vlc-gtk/usr/share/doc/vlc-gtk
245 # Package: vlc-plugin-esd
246 ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
247 mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \
248 debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
251 mkdir -p debian/vlc-esd/usr/share/doc/
252 ln -s vlc debian/vlc-esd/usr/share/doc/vlc-esd
254 # Package: vlc-plugin-alsa
255 ln -s vlc debian/vlc-plugin-alsa/usr/share/doc/vlc-plugin-alsa
256 mv debian/vlc/usr/lib/vlc/audio_output/libalsa_plugin.so \
257 debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/
260 mkdir -p debian/vlc-alsa/usr/share/doc/
261 ln -s vlc debian/vlc-alsa/usr/share/doc/vlc-alsa
263 # Package: vlc-plugin-sdl
264 ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
265 mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \
266 debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
267 mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \
268 debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
271 mkdir -p debian/vlc-sdl/usr/share/doc/
272 ln -s vlc debian/vlc-sdl/usr/share/doc/vlc-sdl
274 # Package: vlc-plugin-ggi
275 ln -s vlc debian/vlc-plugin-ggi/usr/share/doc/vlc-plugin-ggi
276 mv debian/vlc/usr/lib/vlc/video_output/libggi_plugin.so \
277 debian/vlc-plugin-ggi/usr/lib/vlc/video_output/
280 mkdir -p debian/vlc-ggi/usr/share/doc/
281 ln -s vlc debian/vlc-ggi/usr/share/doc/vlc-ggi
283 # Package: vlc-plugin-glide
284 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
285 ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
286 mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \
287 debian/vlc-plugin-glide/usr/lib/vlc/video_output/
290 mkdir -p debian/vlc-glide/usr/share/doc/
291 ln -s vlc debian/vlc-glide/usr/share/doc/vlc-glide
295 #mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
296 ln -s vlc debian/qvlc/usr/share/doc/qvlc
297 #mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
298 # debian/qvlc/usr/lib/vlc/gui/
299 #ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
300 #mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
301 #mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
304 mkdir -p debian/vlc-qt/usr/share/doc/
305 ln -s vlc debian/vlc-qt/usr/share/doc/vlc-qt
307 # Package: vlc-plugin-arts
308 ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
309 mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \
310 debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
312 # Package: mozilla-plugin-vlc
313 ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
314 mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
316 mkdir -p debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/plugins/
317 ln -s ../../mozilla/plugins/libvlcplugin.so debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/plugins/
318 mkdir -p debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/components/
319 ln -s ../../mozilla/components/vlcintf.xpt debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/components/
322 #mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
323 ln -s vlc debian/kvlc/usr/share/doc/kvlc
324 #mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
325 # debian/kvlc/usr/lib/vlc/gui/
326 #mv debian/vlc/$(VIDDIR)/ui.rc debian/kvlc/$(VIDDIR)
327 #ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
328 #mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
329 #mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
331 # Package: vlc-plugin-svgalib
332 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
333 ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
334 mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
335 debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
339 mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
340 ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
341 cp debian/vlc/$(VIDDIR)/vlc.xpm debian/wxvlc/$(VIDDIR)/wxvlc.xpm
342 mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
343 debian/wxvlc/usr/lib/vlc/gui/
344 ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz
347 rm -f debian/vlc/$(VIDDIR)/*.png
349 #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
351 # Build architecture-independent files here.
352 binary-indep: build install
353 # We have nothing to do by default.
355 # Build architecture-dependent files here.
356 binary-arch: build install
361 dh_installdocs -p vlc
365 dh_installman doc/vlc.1 -p vlc
366 dh_installman doc/vlc-config.1 -p libvlc0-dev
367 dh_installchangelogs ChangeLog -p vlc
368 for x in doc/ChangeLog-* ; do cp "doc/ChangeLog-$${x#*-}" "debian/vlc/usr/share/doc/vlc/changelog$${x#*-}" ; done
381 binary: binary-indep binary-arch
382 .PHONY: build clean binary-indep binary-arch binary install