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 \
50 # These ones are currently shipped with VLC
51 CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg
52 CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad
53 CONFIG_FLAGS += --enable-libmpeg2 --with-libmpeg2-tree=extras/mpeg2dec
55 # Glide is only for x86
56 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
57 CONFIG_FLAGS += --enable-glide
58 CONFIG_FLAGS += --enable-svgalib
61 # Remove --without-dvdcss in non-totalitarian countries
62 CONFIG_FLAGS += --enable-dvd --without-dvdcss
65 VIDDIR = usr/share/vlc
66 PIXDIR = usr/share/pixmaps
67 GNOMEDIR = usr/share/gnome/apps/Multimedia
73 configure: configure-stamp
81 && touch config.h.in \
82 && touch `find . -name Makefile.in`
84 # Check that we have an ffmpeg tree in here (can be a symlink)
86 if test ! -d CVS; then \
93 # Check that we have an faad tree in here (can be a symlink)
95 if test ! -d CVS; then \
97 && touch `find . -name configure.in` \
98 && touch `find . -name aclocal.m4` \
99 && touch `find . -name configure` \
100 && touch `find . -name config.h.in` \
101 && touch `find . -name Makefile.in` \
102 && ./configure --disable-shared \
107 # Check that we have an mpeg2dec tree in here (can be a symlink)
108 test -d extras/mpeg2dec
109 if test ! -d CVS; then \
111 && touch configure.in \
112 && touch aclocal.m4 \
113 && touch acinclude.m4 \
115 && touch `find . -name config.h.in` \
116 && touch `find . -name Makefile.in` \
117 && ./configure --disable-shared \
123 ./configure --mandir=$${prefix}/share/man \
124 --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
126 touch configure-stamp
128 build: configure-stamp build-stamp
132 # Build only VLC, with the non-PIC libs
135 ifneq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
136 # Hackety hackety hack
137 if test ! -d CVS; then \
138 cd extras/ffmpeg/libavcodec \
140 && rm -f Makefile.pic \
141 && sed 's/^CFLAGS *=/&-fPIC -DPIC /' <Makefile >Makefile.pic \
142 && $(MAKE) -f Makefile.pic \
143 && rm -f Makefile.pic; \
146 # HACKETY HACKETY HACK
147 if test ! -d CVS; then \
148 cd extras/faad/libfaad \
150 && $(MAKE) AM_CFLAGS=-fPIC; \
153 # HACK ME PLENTY MORE!!!
154 if test ! -d CVS; then \
155 cd extras/mpeg2dec/libmpeg2 \
157 && $(MAKE) LIBMPEG2_CFLAGS=-fPIC; \
161 # Build all the rest, with the PIC libs
169 rm -f configure-stamp build-stamp
171 # Check that we have an ffmpeg tree in here (can be a symlink)
172 test -d extras/ffmpeg
173 -if test ! -d CVS; then cd extras/ffmpeg && $(MAKE) distclean; fi
174 # Check that we have an faad tree in here (can be a symlink)
176 -if test ! -d CVS; then cd extras/faad && $(MAKE) distclean; fi
177 # Check that we have an mpeg2dec tree in here (can be a symlink)
178 test -d extras/mpeg2dec
179 -if test ! -d CVS; then cd extras/mpeg2dec && $(MAKE) distclean; fi
181 # Remove spurious autotools stuff
182 rm -f config.log confdefs.h
194 DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
197 mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
198 mv debian/vlc/$(VIDDIR)/vlc32x32.xpm debian/vlc/$(VIDDIR)/vlc.xpm
199 cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
200 cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
202 cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc
203 strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat
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
317 mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
318 ln -s vlc debian/kvlc/usr/share/doc/kvlc
319 mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
320 debian/kvlc/usr/lib/vlc/gui/
321 mv debian/vlc/usr/share/vlc/ui.rc \
322 debian/kvlc/usr/share/vlc
323 ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
324 mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
325 mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
327 # Package: vlc-plugin-svgalib
328 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
329 ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
330 mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
331 debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
335 mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
336 ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
337 mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
338 debian/wxvlc/usr/lib/vlc/gui/
339 mv debian/vlc/usr/lib/vlc/gui/libskins_plugin.so \
340 debian/wxvlc/usr/lib/vlc/gui/
341 mv debian/vlc/usr/share/vlc/skins \
342 debian/wxvlc/usr/share/vlc/
343 ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz
346 rm -f debian/vlc/$(VIDDIR)/*.png
348 #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
350 # Build architecture-independent files here.
351 binary-indep: build install
352 # We have nothing to do by default.
354 # Build architecture-dependent files here.
355 binary-arch: build install
360 dh_installdocs -p vlc
364 dh_installman doc/vlc.1 -p vlc
365 dh_installman doc/vlc-config.1 -p libvlc0-dev
366 # dh_installchangelogs ChangeLog -p vlc
367 cp ChangeLog debian/vlc/usr/share/doc/vlc/changelog
368 for x in doc/ChangeLog-* ; do cp "doc/ChangeLog-$${x\#*/\#*-}" "debian/vlc/usr/share/doc/vlc/changelog-$$x\#*/\#*-}" ; done
369 cp debian/changelog debian/vlc/usr/share/doc/vlc/changelog.Debian
382 binary: binary-indep binary-arch
383 .PHONY: build clean binary-indep binary-arch binary install