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
52 # Glide is only for x86
53 ifeq ($(DEB_BUILD_ARCH),i386)
54 CONFIG_FLAGS += --enable-glide
55 CONFIG_FLAGS += --enable-svgalib
57 ARCH_EXCLUDE += -Nvlc-plugin-glide -Nvlc-glide
58 ARCH_EXCLUDE += -Nvlc-plugin-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
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 \
108 ./configure --mandir=$${prefix}/share/man \
109 --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
111 # Build only VLC, with the non-PIC libs
114 ifneq ($(DEB_BUILD_ARCH),i386)
115 # Hackety hackety hack
116 if test ! -d CVS; then \
117 cd extras/ffmpeg/libavcodec \
119 && rm -f Makefile.pic \
120 && sed 's/^CFLAGS *=/&-fPIC -DPIC /' <Makefile >Makefile.pic \
121 && $(MAKE) -f Makefile.pic \
122 && rm -f Makefile.pic; \
125 # HACKETY HACKETY HACK
126 if test ! -d CVS; then \
127 cd extras/faad/libfaad \
129 && $(MAKE) AM_CFLAGS=-fPIC; \
133 # Build all the rest, with the PIC libs
143 # Check that we have an ffmpeg tree in here (can be a symlink)
144 test -d extras/ffmpeg
145 -if test ! -d CVS; then cd extras/ffmpeg && $(MAKE) distclean; fi
146 # Check that we have an faad tree in here (can be a symlink)
148 -if test ! -d CVS; then cd extras/faad && $(MAKE) distclean; fi
150 # Remove spurious autotools stuff
151 rm -f config.log confdefs.h
163 DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
166 mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
167 mv debian/vlc/$(VIDDIR)/vlc32x32.xpm debian/vlc/$(VIDDIR)/vlc.xpm
168 cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
169 cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
171 cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc
172 strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat
174 # Package: libvlc0-dev
175 mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
176 mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
177 mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
178 mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
179 rm -Rf debian/vlc/usr/include
180 ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
183 mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
184 ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
185 mv debian/vlc/usr/lib/vlc/misc/libgnome_main_plugin.so \
186 debian/gnome-vlc/usr/lib/vlc/gui/
187 mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
188 debian/gnome-vlc/usr/lib/vlc/gui/
189 ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
190 mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
191 mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
194 mkdir -p debian/vlc-gnome/usr/share/doc/
195 ln -s vlc debian/vlc-gnome/usr/share/doc/vlc-gnome
198 mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
199 ln -s vlc debian/gvlc/usr/share/doc/gvlc
200 mv debian/vlc/usr/lib/vlc/misc/libgtk_main_plugin.so \
201 debian/gvlc/usr/lib/vlc/gui/
202 mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
203 debian/gvlc/usr/lib/vlc/gui/
204 mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
205 debian/gvlc/usr/lib/vlc/gui/
206 ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
207 mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
208 mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
211 mkdir -p debian/vlc-gtk/usr/share/doc/
212 ln -s vlc debian/vlc-gtk/usr/share/doc/vlc-gtk
214 # Package: vlc-plugin-esd
215 ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
216 mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \
217 debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
220 mkdir -p debian/vlc-esd/usr/share/doc/
221 ln -s vlc debian/vlc-esd/usr/share/doc/vlc-esd
223 # Package: vlc-plugin-alsa
224 ln -s vlc debian/vlc-plugin-alsa/usr/share/doc/vlc-plugin-alsa
225 mv debian/vlc/usr/lib/vlc/audio_output/libalsa_plugin.so \
226 debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/
229 mkdir -p debian/vlc-alsa/usr/share/doc/
230 ln -s vlc debian/vlc-alsa/usr/share/doc/vlc-alsa
232 # Package: vlc-plugin-sdl
233 ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
234 mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \
235 debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
236 mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \
237 debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
240 mkdir -p debian/vlc-sdl/usr/share/doc/
241 ln -s vlc debian/vlc-sdl/usr/share/doc/vlc-sdl
243 # Package: vlc-plugin-ggi
244 ln -s vlc debian/vlc-plugin-ggi/usr/share/doc/vlc-plugin-ggi
245 mv debian/vlc/usr/lib/vlc/video_output/libggi_plugin.so \
246 debian/vlc-plugin-ggi/usr/lib/vlc/video_output/
249 mkdir -p debian/vlc-ggi/usr/share/doc/
250 ln -s vlc debian/vlc-ggi/usr/share/doc/vlc-ggi
252 # Package: vlc-plugin-glide
253 ifeq ($(DEB_BUILD_ARCH),i386)
254 ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
255 mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \
256 debian/vlc-plugin-glide/usr/lib/vlc/video_output/
259 mkdir -p debian/vlc-glide/usr/share/doc/
260 ln -s vlc debian/vlc-glide/usr/share/doc/vlc-glide
264 mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
265 ln -s vlc debian/qvlc/usr/share/doc/qvlc
266 mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
267 debian/qvlc/usr/lib/vlc/gui/
268 ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
269 mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
270 mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
273 mkdir -p debian/vlc-qt/usr/share/doc/
274 ln -s vlc debian/vlc-qt/usr/share/doc/vlc-qt
276 # Package: vlc-plugin-arts
277 ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
278 mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \
279 debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
281 # Package: mozilla-plugin-vlc
282 ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
283 mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
286 mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
287 ln -s vlc debian/kvlc/usr/share/doc/kvlc
288 mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
289 debian/kvlc/usr/lib/vlc/gui/
290 mv debian/vlc/usr/share/vlc/ui.rc \
291 debian/kvlc/usr/share/vlc
292 ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
293 mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
294 mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
296 # Package: vlc-plugin-svgalib
297 ifeq ($(DEB_BUILD_ARCH),i386)
298 ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
299 mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
300 debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
304 mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
305 ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
306 mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
307 debian/wxvlc/usr/lib/vlc/gui/
308 ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz
311 rm -f debian/vlc/$(VIDDIR)/*.png
313 #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
315 # Build architecture-independent files here.
316 binary-indep: build install
317 # We have nothing to do by default.
319 # Build architecture-dependent files here.
320 binary-arch: build install
325 dh_installdocs -p vlc
328 dh_installman doc/vlc.1 -p vlc
329 dh_installman doc/vlc-config.1 -p libvlc0-dev
330 # dh_installchangelogs ChangeLog -p vlc
331 cp ChangeLog debian/vlc/usr/share/doc/vlc/changelog
332 cp debian/changelog debian/vlc/usr/share/doc/vlc/changelog.Debian
340 dh_shlibdeps $(ARCH_EXCLUDE)
341 dh_gencontrol $(ARCH_EXCLUDE)
342 dh_md5sums $(ARCH_EXCLUDE)
343 dh_builddeb $(ARCH_EXCLUDE)
345 binary: binary-indep binary-arch
346 .PHONY: build clean binary-indep binary-arch binary install