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.
17 CONFIG_FLAGS = --enable-release --prefix=/usr
48 # These ones are currently shipped with VLC
49 CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg
50 CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad
51 CONFIG_FLAGS += --enable-libmpeg2 --with-libmpeg2-tree=extras/mpeg2dec
53 # Glide is only for x86
54 ifeq ($(DEB_BUILD_ARCH),i386)
55 CONFIG_FLAGS += --enable-glide
56 CONFIG_FLAGS += --enable-svgalib
58 ARCH_EXCLUDE += -Nvlc-plugin-glide -Nvlc-glide
59 ARCH_EXCLUDE += -Nvlc-plugin-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
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 # Build only VLC, with the non-PIC libs
130 ifneq ($(DEB_BUILD_ARCH),i386)
131 # Hackety hackety hack
132 if test ! -d CVS; then \
133 cd extras/ffmpeg/libavcodec \
135 && rm -f Makefile.pic \
136 && sed 's/^CFLAGS *=/&-fPIC -DPIC /' <Makefile >Makefile.pic \
137 && $(MAKE) -f Makefile.pic \
138 && rm -f Makefile.pic; \
141 # HACKETY HACKETY HACK
142 if test ! -d CVS; then \
143 cd extras/faad/libfaad \
145 && $(MAKE) AM_CFLAGS=-fPIC; \
148 # HACK ME PLENTY MORE!!!
149 if test ! -d CVS; then \
150 cd extras/mpeg2dec/libmpeg2 \
152 && $(MAKE) LIBMPEG2_CFLAGS=-fPIC; \
156 # Build all the rest, with the PIC libs
166 # Check that we have an ffmpeg tree in here (can be a symlink)
167 test -d extras/ffmpeg
168 -if test ! -d CVS; then cd extras/ffmpeg && $(MAKE) distclean; fi
169 # Check that we have an faad tree in here (can be a symlink)
171 -if test ! -d CVS; then cd extras/faad && $(MAKE) distclean; fi
172 # Check that we have an mpeg2dec tree in here (can be a symlink)
173 test -d extras/mpeg2dec
174 -if test ! -d CVS; then cd extras/mpeg2dec && $(MAKE) distclean; fi
176 # Remove spurious autotools stuff
177 rm -f config.log confdefs.h
189 DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
192 mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
193 mv debian/vlc/$(VIDDIR)/vlc32x32.xpm debian/vlc/$(VIDDIR)/vlc.xpm
194 cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
195 cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
197 cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc
198 strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat
200 # Package: libvlc0-dev
201 mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
202 mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
203 mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
204 mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
205 rm -Rf debian/vlc/usr/include
206 ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
209 mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
210 ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
211 mv debian/vlc/usr/lib/vlc/misc/libgnome_main_plugin.so \
212 debian/gnome-vlc/usr/lib/vlc/gui/
213 mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
214 debian/gnome-vlc/usr/lib/vlc/gui/
215 ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
216 mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
217 mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
220 mkdir -p debian/vlc-gnome/usr/share/doc/
221 ln -s vlc debian/vlc-gnome/usr/share/doc/vlc-gnome
224 mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
225 ln -s vlc debian/gvlc/usr/share/doc/gvlc
226 mv debian/vlc/usr/lib/vlc/misc/libgtk_main_plugin.so \
227 debian/gvlc/usr/lib/vlc/gui/
228 mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
229 debian/gvlc/usr/lib/vlc/gui/
230 mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
231 debian/gvlc/usr/lib/vlc/gui/
232 ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
233 mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
234 mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
237 mkdir -p debian/vlc-gtk/usr/share/doc/
238 ln -s vlc debian/vlc-gtk/usr/share/doc/vlc-gtk
240 # Package: vlc-plugin-esd
241 ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
242 mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \
243 debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
246 mkdir -p debian/vlc-esd/usr/share/doc/
247 ln -s vlc debian/vlc-esd/usr/share/doc/vlc-esd
249 # Package: vlc-plugin-alsa
250 ln -s vlc debian/vlc-plugin-alsa/usr/share/doc/vlc-plugin-alsa
251 mv debian/vlc/usr/lib/vlc/audio_output/libalsa_plugin.so \
252 debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/
255 mkdir -p debian/vlc-alsa/usr/share/doc/
256 ln -s vlc debian/vlc-alsa/usr/share/doc/vlc-alsa
258 # Package: vlc-plugin-sdl
259 ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
260 mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \
261 debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
262 mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \
263 debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
266 mkdir -p debian/vlc-sdl/usr/share/doc/
267 ln -s vlc debian/vlc-sdl/usr/share/doc/vlc-sdl
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/
275 mkdir -p debian/vlc-ggi/usr/share/doc/
276 ln -s vlc debian/vlc-ggi/usr/share/doc/vlc-ggi
278 # Package: vlc-plugin-glide
279 ifeq ($(DEB_BUILD_ARCH),i386)
280 ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
281 mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \
282 debian/vlc-plugin-glide/usr/lib/vlc/video_output/
285 mkdir -p debian/vlc-glide/usr/share/doc/
286 ln -s vlc debian/vlc-glide/usr/share/doc/vlc-glide
290 mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
291 ln -s vlc debian/qvlc/usr/share/doc/qvlc
292 mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
293 debian/qvlc/usr/lib/vlc/gui/
294 ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
295 mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
296 mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
299 mkdir -p debian/vlc-qt/usr/share/doc/
300 ln -s vlc debian/vlc-qt/usr/share/doc/vlc-qt
302 # Package: vlc-plugin-arts
303 ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
304 mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \
305 debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
307 # Package: mozilla-plugin-vlc
308 ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
309 mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
312 mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
313 ln -s vlc debian/kvlc/usr/share/doc/kvlc
314 mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
315 debian/kvlc/usr/lib/vlc/gui/
316 mv debian/vlc/usr/share/vlc/ui.rc \
317 debian/kvlc/usr/share/vlc
318 ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
319 mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
320 mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
322 # Package: vlc-plugin-svgalib
323 ifeq ($(DEB_BUILD_ARCH),i386)
324 ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
325 mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
326 debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
330 mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
331 ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
332 mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
333 debian/wxvlc/usr/lib/vlc/gui/
334 ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz
337 rm -f debian/vlc/$(VIDDIR)/*.png
339 #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
341 # Build architecture-independent files here.
342 binary-indep: build install
343 # We have nothing to do by default.
345 # Build architecture-dependent files here.
346 binary-arch: build install
351 dh_installdocs -p vlc
355 dh_installman doc/vlc.1 -p vlc
356 dh_installman doc/vlc-config.1 -p libvlc0-dev
357 # dh_installchangelogs ChangeLog -p vlc
358 cp ChangeLog debian/vlc/usr/share/doc/vlc/changelog
359 cp debian/changelog debian/vlc/usr/share/doc/vlc/changelog.Debian
367 dh_shlibdeps $(ARCH_EXCLUDE)
368 dh_gencontrol $(ARCH_EXCLUDE)
369 dh_md5sums $(ARCH_EXCLUDE)
370 dh_builddeb $(ARCH_EXCLUDE)
372 binary: binary-indep binary-arch
373 .PHONY: build clean binary-indep binary-arch binary install