2 # debian/rules for the VideoLAN Client - uses debhelper.
3 # based on Joey Hess's one.
5 # Uncomment this to turn on verbose mode.
8 # This is the debhelper compatability version to use.
15 CONFIG_FLAGS = --enable-release --prefix=/usr
45 --disable-basic-skins \
51 # These ones are currently shipped with VLC
52 CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg
53 CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad
54 CONFIG_FLAGS += --enable-libmpeg2 --with-libmpeg2-tree=extras/mpeg2dec
56 # Glide is only for x86
57 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
58 CONFIG_FLAGS += --enable-glide
59 CONFIG_FLAGS += --enable-svgalib
62 # Remove --without-dvdcss in non-totalitarian countries
63 CONFIG_FLAGS += --enable-dvd --without-dvdcss
66 VIDDIR = usr/share/vlc
67 PIXDIR = usr/share/pixmaps
68 GNOMEDIR = usr/share/gnome/apps/Multimedia
74 configure: configure-stamp
82 && touch config.h.in \
83 && touch `find . -name Makefile.in`
85 # Check that we have an ffmpeg tree in here (can be a symlink)
87 if test ! -d CVS; then \
94 # Check that we have an faad tree in here (can be a symlink)
96 if test ! -d CVS; then \
98 && touch `find . -name configure.in` \
99 && touch `find . -name aclocal.m4` \
100 && touch `find . -name configure` \
101 && touch `find . -name config.h.in` \
102 && touch `find . -name Makefile.in` \
103 && ./configure --disable-shared \
108 # Check that we have an mpeg2dec tree in here (can be a symlink)
109 test -d extras/mpeg2dec
110 if test ! -d CVS; then \
112 && touch configure.in \
113 && touch aclocal.m4 \
114 && touch acinclude.m4 \
116 && touch `find . -name config.h.in` \
117 && touch `find . -name Makefile.in` \
118 && ./configure --disable-shared \
124 ./configure --mandir=$${prefix}/share/man \
125 --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
127 touch configure-stamp
129 build: configure-stamp build-stamp
133 # Build only VLC, with the non-PIC libs
136 ifneq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
137 # Hackety hackety hack
138 if test ! -d CVS; then \
139 cd extras/ffmpeg/libavcodec \
141 && rm -f Makefile.pic \
142 && sed 's/^CFLAGS *=/&-fPIC -DPIC /' <Makefile >Makefile.pic \
143 && $(MAKE) -f Makefile.pic \
144 && rm -f Makefile.pic; \
147 # HACKETY HACKETY HACK
148 if test ! -d CVS; then \
149 cd extras/faad/libfaad \
151 && $(MAKE) AM_CFLAGS=-fPIC; \
154 # HACK ME PLENTY MORE!!!
155 if test ! -d CVS; then \
156 cd extras/mpeg2dec/libmpeg2 \
158 && $(MAKE) LIBMPEG2_CFLAGS=-fPIC; \
162 # Build all the rest, with the PIC libs
170 rm -f configure-stamp build-stamp
172 # Check that we have an ffmpeg tree in here (can be a symlink)
173 test -d extras/ffmpeg
174 -if test ! -d CVS; then cd extras/ffmpeg && $(MAKE) distclean; fi
175 # Check that we have an faad tree in here (can be a symlink)
177 -if test ! -d CVS; then cd extras/faad && $(MAKE) distclean; fi
178 # Check that we have an mpeg2dec tree in here (can be a symlink)
179 test -d extras/mpeg2dec
180 -if test ! -d CVS; then cd extras/mpeg2dec && $(MAKE) distclean; fi
182 # Remove spurious autotools stuff
183 rm -f config.log confdefs.h
195 DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
198 mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
199 mv debian/vlc/$(VIDDIR)/vlc32x32.xpm debian/vlc/$(VIDDIR)/vlc.xpm
200 cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
201 cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
203 cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc
204 strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat
206 # Package: libvlc0-dev
207 mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
208 mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
209 mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
210 mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
211 rm -Rf debian/vlc/usr/include
212 ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
215 mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
216 ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
217 mv debian/vlc/usr/lib/vlc/misc/libgnome_main_plugin.so \
218 debian/gnome-vlc/usr/lib/vlc/gui/
219 mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
220 debian/gnome-vlc/usr/lib/vlc/gui/
221 ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
222 mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
223 mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
226 mkdir -p debian/vlc-gnome/usr/share/doc/
227 ln -s vlc debian/vlc-gnome/usr/share/doc/vlc-gnome
230 mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
231 ln -s vlc debian/gvlc/usr/share/doc/gvlc
232 mv debian/vlc/usr/lib/vlc/misc/libgtk_main_plugin.so \
233 debian/gvlc/usr/lib/vlc/gui/
234 mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
235 debian/gvlc/usr/lib/vlc/gui/
236 mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
237 debian/gvlc/usr/lib/vlc/gui/
238 ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
239 mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
240 mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
243 mkdir -p debian/vlc-gtk/usr/share/doc/
244 ln -s vlc debian/vlc-gtk/usr/share/doc/vlc-gtk
246 # Package: vlc-plugin-esd
247 ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
248 mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \
249 debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
252 mkdir -p debian/vlc-esd/usr/share/doc/
253 ln -s vlc debian/vlc-esd/usr/share/doc/vlc-esd
255 # Package: vlc-plugin-alsa
256 ln -s vlc debian/vlc-plugin-alsa/usr/share/doc/vlc-plugin-alsa
257 mv debian/vlc/usr/lib/vlc/audio_output/libalsa_plugin.so \
258 debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/
261 mkdir -p debian/vlc-alsa/usr/share/doc/
262 ln -s vlc debian/vlc-alsa/usr/share/doc/vlc-alsa
264 # Package: vlc-plugin-sdl
265 ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
266 mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \
267 debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
268 mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \
269 debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
272 mkdir -p debian/vlc-sdl/usr/share/doc/
273 ln -s vlc debian/vlc-sdl/usr/share/doc/vlc-sdl
275 # Package: vlc-plugin-ggi
276 ln -s vlc debian/vlc-plugin-ggi/usr/share/doc/vlc-plugin-ggi
277 mv debian/vlc/usr/lib/vlc/video_output/libggi_plugin.so \
278 debian/vlc-plugin-ggi/usr/lib/vlc/video_output/
281 mkdir -p debian/vlc-ggi/usr/share/doc/
282 ln -s vlc debian/vlc-ggi/usr/share/doc/vlc-ggi
284 # Package: vlc-plugin-glide
285 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
286 ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
287 mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \
288 debian/vlc-plugin-glide/usr/lib/vlc/video_output/
291 mkdir -p debian/vlc-glide/usr/share/doc/
292 ln -s vlc debian/vlc-glide/usr/share/doc/vlc-glide
296 mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
297 ln -s vlc debian/qvlc/usr/share/doc/qvlc
298 mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
299 debian/qvlc/usr/lib/vlc/gui/
300 ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
301 mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
302 mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
305 mkdir -p debian/vlc-qt/usr/share/doc/
306 ln -s vlc debian/vlc-qt/usr/share/doc/vlc-qt
308 # Package: vlc-plugin-arts
309 ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
310 mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \
311 debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
313 # Package: mozilla-plugin-vlc
314 ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
315 mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
318 mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
319 ln -s vlc debian/kvlc/usr/share/doc/kvlc
320 mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
321 debian/kvlc/usr/lib/vlc/gui/
322 mv debian/vlc/usr/share/vlc/ui.rc \
323 debian/kvlc/usr/share/vlc
324 ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
325 mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
326 mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
328 # Package: vlc-plugin-svgalib
329 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
330 ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
331 mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
332 debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
336 mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
337 ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
338 mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
339 debian/wxvlc/usr/lib/vlc/gui/
340 mv debian/vlc/usr/lib/vlc/gui/libskins_plugin.so \
341 debian/wxvlc/usr/lib/vlc/gui/
342 mv debian/vlc/usr/share/vlc/skins \
343 debian/wxvlc/usr/share/vlc/
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 cp ChangeLog debian/vlc/usr/share/doc/vlc/changelog
369 for x in doc/ChangeLog-* ; do cp "doc/ChangeLog-$${x\#*/\#*-}" "debian/vlc/usr/share/doc/vlc/changelog-$$x\#*/\#*-}" ; done
370 cp debian/changelog debian/vlc/usr/share/doc/vlc/changelog.Debian
383 binary: binary-indep binary-arch
384 .PHONY: build clean binary-indep binary-arch binary install