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
134 $(MAKE) include/vlc_symbols.h
135 cd modules && $(MAKE)
138 ifneq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
139 # Hackety hackety hack
140 if test ! -d CVS; then \
141 cd extras/ffmpeg/libavcodec \
143 && rm -f Makefile.pic \
144 && sed 's/^CFLAGS *=/&-fPIC -DPIC /' <Makefile >Makefile.pic \
145 && $(MAKE) -f Makefile.pic \
146 && rm -f Makefile.pic; \
149 # HACKETY HACKETY HACK
150 if test ! -d CVS; then \
151 cd extras/faad/libfaad \
153 && $(MAKE) AM_CFLAGS=-fPIC; \
156 # HACK ME PLENTY MORE!!!
157 if test ! -d CVS; then \
158 cd extras/mpeg2dec/libmpeg2 \
160 && $(MAKE) LIBMPEG2_CFLAGS=-fPIC; \
164 # Build all the rest, with the PIC libs
172 rm -f configure-stamp build-stamp
174 # Check that we have an ffmpeg tree in here (can be a symlink)
175 test -d extras/ffmpeg
176 -if test ! -d CVS; then cd extras/ffmpeg && $(MAKE) distclean; fi
177 # Check that we have an faad tree in here (can be a symlink)
179 -if test ! -d CVS; then cd extras/faad && $(MAKE) distclean; fi
180 # Check that we have an mpeg2dec tree in here (can be a symlink)
181 test -d extras/mpeg2dec
182 -if test ! -d CVS; then cd extras/mpeg2dec && $(MAKE) distclean; fi
184 # Remove spurious autotools stuff
185 rm -f config.log confdefs.h
197 DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
200 mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
201 mv debian/vlc/$(VIDDIR)/vlc32x32.xpm debian/vlc/$(VIDDIR)/vlc.xpm
202 cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
203 cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
205 cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc
206 strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat
208 # Package: libvlc0-dev
209 mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
210 mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
211 mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
212 mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
213 rm -Rf debian/vlc/usr/include
214 ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
217 mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
218 ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
219 mv debian/vlc/usr/lib/vlc/misc/libgnome_main_plugin.so \
220 debian/gnome-vlc/usr/lib/vlc/gui/
221 mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
222 debian/gnome-vlc/usr/lib/vlc/gui/
223 ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
224 mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
225 mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
228 mkdir -p debian/vlc-gnome/usr/share/doc/
229 ln -s vlc debian/vlc-gnome/usr/share/doc/vlc-gnome
232 mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
233 ln -s vlc debian/gvlc/usr/share/doc/gvlc
234 mv debian/vlc/usr/lib/vlc/misc/libgtk_main_plugin.so \
235 debian/gvlc/usr/lib/vlc/gui/
236 mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
237 debian/gvlc/usr/lib/vlc/gui/
238 mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
239 debian/gvlc/usr/lib/vlc/gui/
240 ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
241 mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
242 mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
245 mkdir -p debian/vlc-gtk/usr/share/doc/
246 ln -s vlc debian/vlc-gtk/usr/share/doc/vlc-gtk
248 # Package: vlc-plugin-esd
249 ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
250 mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \
251 debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
254 mkdir -p debian/vlc-esd/usr/share/doc/
255 ln -s vlc debian/vlc-esd/usr/share/doc/vlc-esd
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/
263 mkdir -p debian/vlc-alsa/usr/share/doc/
264 ln -s vlc debian/vlc-alsa/usr/share/doc/vlc-alsa
266 # Package: vlc-plugin-sdl
267 ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
268 mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \
269 debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
270 mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \
271 debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
274 mkdir -p debian/vlc-sdl/usr/share/doc/
275 ln -s vlc debian/vlc-sdl/usr/share/doc/vlc-sdl
277 # Package: vlc-plugin-ggi
278 ln -s vlc debian/vlc-plugin-ggi/usr/share/doc/vlc-plugin-ggi
279 mv debian/vlc/usr/lib/vlc/video_output/libggi_plugin.so \
280 debian/vlc-plugin-ggi/usr/lib/vlc/video_output/
283 mkdir -p debian/vlc-ggi/usr/share/doc/
284 ln -s vlc debian/vlc-ggi/usr/share/doc/vlc-ggi
286 # Package: vlc-plugin-glide
287 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
288 ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
289 mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \
290 debian/vlc-plugin-glide/usr/lib/vlc/video_output/
293 mkdir -p debian/vlc-glide/usr/share/doc/
294 ln -s vlc debian/vlc-glide/usr/share/doc/vlc-glide
298 mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
299 ln -s vlc debian/qvlc/usr/share/doc/qvlc
300 mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
301 debian/qvlc/usr/lib/vlc/gui/
302 ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
303 mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
304 mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
307 mkdir -p debian/vlc-qt/usr/share/doc/
308 ln -s vlc debian/vlc-qt/usr/share/doc/vlc-qt
310 # Package: vlc-plugin-arts
311 ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
312 mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \
313 debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
315 # Package: mozilla-plugin-vlc
316 ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
317 mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
320 mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
321 ln -s vlc debian/kvlc/usr/share/doc/kvlc
322 mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
323 debian/kvlc/usr/lib/vlc/gui/
324 mv debian/vlc/usr/share/vlc/ui.rc \
325 debian/kvlc/usr/share/vlc
326 ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
327 mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
328 mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
330 # Package: vlc-plugin-svgalib
331 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
332 ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
333 mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
334 debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
338 mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
339 ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
340 mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
341 debian/wxvlc/usr/lib/vlc/gui/
342 mv debian/vlc/usr/lib/vlc/gui/libskins_plugin.so \
343 debian/wxvlc/usr/lib/vlc/gui/
344 mv debian/vlc/usr/share/vlc/skins \
345 debian/wxvlc/usr/share/vlc/
346 ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz
349 rm -f debian/vlc/$(VIDDIR)/*.png
351 #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
353 # Build architecture-independent files here.
354 binary-indep: build install
355 # We have nothing to do by default.
357 # Build architecture-dependent files here.
358 binary-arch: build install
363 dh_installdocs -p vlc
367 dh_installman doc/vlc.1 -p vlc
368 dh_installman doc/vlc-config.1 -p libvlc0-dev
369 # dh_installchangelogs ChangeLog -p vlc
370 cp ChangeLog debian/vlc/usr/share/doc/vlc/changelog
371 for x in doc/ChangeLog-* ; do cp "doc/ChangeLog-$${x#*-}" "debian/vlc/usr/share/doc/vlc/changelog-$${x#*-}" ; done
372 cp debian/changelog debian/vlc/usr/share/doc/vlc/changelog.Debian
385 binary: binary-indep binary-arch
386 .PHONY: build clean binary-indep binary-arch binary install