* ./debian/control.woody, ./debian/rules.woody: placeholders for Debian
[vlc.git] / debian / rules.woody
1 #!/usr/bin/make -f
2 # debian/rules for the VideoLAN Client - uses debhelper.
3 # based on Joey Hess's one.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # This is the debhelper compatability version to use.
9 export DH_COMPAT=3
10
11 #
12 # Compilation options
13 #
14
15 CONFIG_FLAGS = --enable-release --prefix=/usr
16 CONFIG_FLAGS += \
17         --enable-gnome \
18         --enable-gtk \
19         --enable-familiar \
20         --enable-fb \
21         --enable-ggi \
22         --enable-sdl \
23         --enable-esd \
24         --enable-qt \
25         --enable-mad \
26         --enable-arts \
27         --enable-alsa \
28         --enable-lirc \
29         --enable-a52 \
30         --enable-aa \
31         --enable-dvbpsi \
32         --enable-xosd \
33         --enable-mozilla \
34         --enable-kde \
35         --enable-mp4 \
36         --enable-dvb \
37         --enable-dv \
38         --enable-svgalib \
39         --enable-satellite \
40         --enable-ogg \
41         --enable-vorbis \
42         --enable-wxwindows \
43         $(NULL)
44
45 # These ones are currently shipped with VLC
46 CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg
47 CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad
48
49 # Glide is only for x86
50 ifeq ($(DEB_BUILD_ARCH),i386)
51 CONFIG_FLAGS += --enable-glide
52 else
53 ARCH_EXCLUDE = -Nvlc-plugin-glide
54 endif
55
56 # Remove --without-dvdcss in non-totalitarian countries
57 CONFIG_FLAGS += --enable-dvd --without-dvdcss
58
59 # A few shortcuts
60 VIDDIR = usr/share/vlc
61 PIXDIR = usr/share/pixmaps
62 GNOMEDIR = usr/share/gnome/apps/Multimedia
63
64 #
65 # Build rules
66 #
67
68 build: build-stamp
69 build-stamp:
70         dh_testdir
71
72         # Check that we have an ffmpeg tree in here (can be a symlink)
73         test -d extras/ffmpeg
74         if test ! -d CVS; then cd extras/ffmpeg && ./configure && make; fi
75
76         # Check that we have an faad tree in here (can be a symlink)
77         test -d extras/faad
78         if test ! -d CVS; then cd extras/faad && ./configure --disable-shared && cd libfaad && make; fi
79
80         # Configure VLC and build it
81         ./configure --mandir=$${prefix}/share/man \
82                 --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
83         $(MAKE)
84
85         touch build-stamp
86
87 clean:
88         dh_testdir
89         dh_testroot
90         rm -f build-stamp
91
92         # Check that we have an ffmpeg tree in here (can be a symlink)
93         test -d extras/ffmpeg
94         -if test ! -d CVS; then cd extras/ffmpeg && make distclean; fi
95         # Check that we have an faad tree in here (can be a symlink)
96         test -d extras/faad
97         -if test ! -d CVS; then cd extras/faad && make distclean; fi
98
99         -$(MAKE) distclean
100
101         dh_clean
102
103 install: build
104         dh_testdir
105         dh_testroot
106         dh_clean -k
107         dh_installdirs
108
109         DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
110
111         # Package: vlc
112         mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
113         cp debian/vlc.desktop debian/vlc/$(GNOMEDIR)
114         cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
115         cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
116
117         # Package: libvlc0-dev
118         mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
119         mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
120         mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
121         mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
122         rm -Rf debian/vlc/usr/include
123         ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
124
125         # Package: gnome-vlc
126         mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
127         ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
128         mv debian/vlc/usr/lib/vlc/misc/libgnome_main_plugin.so \
129                 debian/gnome-vlc/usr/lib/vlc/gui/
130         mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
131                 debian/gnome-vlc/usr/lib/vlc/gui/
132         ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
133         mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
134         mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
135
136         # Package: gvlc
137         mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
138         ln -s vlc debian/gvlc/usr/share/doc/gvlc
139         mv debian/vlc/usr/lib/vlc/misc/libgtk_main_plugin.so \
140                 debian/gvlc/usr/lib/vlc/gui/
141         mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
142                 debian/gvlc/usr/lib/vlc/gui/
143         mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
144                 debian/gvlc/usr/lib/vlc/gui/
145         ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
146         mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
147         mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
148
149         # Package: vlc-plugin-esd
150         ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
151         mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \
152                 debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
153
154         # Package: vlc-plugin-alsa
155         ln -s vlc debian/vlc-plugin-alsa/usr/share/doc/vlc-plugin-alsa
156         mv debian/vlc/usr/lib/vlc/audio_output/libalsa_plugin.so \
157                 debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/
158
159         # Package: vlc-plugin-sdl
160         ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
161         mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \
162                 debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
163         mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \
164                 debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
165
166         # Package: vlc-plugin-ggi
167         ln -s vlc debian/vlc-plugin-ggi/usr/share/doc/vlc-plugin-ggi
168         mv debian/vlc/usr/lib/vlc/video_output/libggi_plugin.so \
169                 debian/vlc-plugin-ggi/usr/lib/vlc/video_output/
170
171         # Package: vlc-plugin-glide
172 ifeq ($(DEB_BUILD_ARCH),i386)
173         ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
174         mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \
175                 debian/vlc-plugin-glide/usr/lib/vlc/video_output/
176 endif
177
178         # Package: qvlc
179         mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
180         ln -s vlc debian/qvlc/usr/share/doc/qvlc
181         mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
182                 debian/qvlc/usr/lib/vlc/gui/
183         ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
184         mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
185         mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
186
187         # Package: vlc-plugin-mad
188         ln -s vlc debian/vlc-plugin-mad/usr/share/doc/vlc-plugin-mad
189         mv debian/vlc/usr/lib/vlc/audio_filter/libmpgatofixed32_plugin.so \
190                 debian/vlc-plugin-mad/usr/lib/vlc/audio_filter/
191
192         # Package: vlc-plugin-arts
193         ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
194         mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \
195                 debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
196
197         # Package: vlc-plugin-lirc
198         ln -s vlc debian/vlc-plugin-lirc/usr/share/doc/vlc-plugin-lirc
199         mv debian/vlc/usr/lib/vlc/control/liblirc_plugin.so \
200                 debian/vlc-plugin-lirc/usr/lib/vlc/control/
201
202         # Package: vlc-plugin-aa
203         ln -s vlc debian/vlc-plugin-aa/usr/share/doc/vlc-plugin-aa
204         mv debian/vlc/usr/lib/vlc/video_output/libaa_plugin.so \
205                 debian/vlc-plugin-aa/usr/lib/vlc/video_output/
206
207         # Package: vlc-plugin-xosd
208         ln -s vlc debian/vlc-plugin-xosd/usr/share/doc/vlc-plugin-xosd
209         mv debian/vlc/usr/lib/vlc/visualization/libxosd_plugin.so \
210                 debian/vlc-plugin-xosd/usr/lib/vlc/visualization/
211
212         # Package: mozilla-plugin-vlc
213         ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
214         mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
215
216         # Package: kvlc
217         mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
218         ln -s vlc debian/kvlc/usr/share/doc/kvlc
219         mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
220                 debian/kvlc/usr/lib/vlc/gui/
221         mv debian/vlc/usr/share/vlc/ui.rc \
222                 debian/kvlc/usr/share/vlc
223         ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
224         mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
225         mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
226
227         # Package: vlc-plugin-svgalib
228         ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
229         mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
230                 debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
231
232         # Package: vlc-plugin-dv
233         ln -s vlc debian/vlc-plugin-dv/usr/share/doc/vlc-plugin-dv
234         mv debian/vlc/usr/lib/vlc/codec/libdv_plugin.so \
235                 debian/vlc-plugin-dv/usr/lib/vlc/codec
236
237         # Package: vlc-plugin-a52
238         ln -s vlc debian/vlc-plugin-a52/usr/share/doc/vlc-plugin-a52
239         mv debian/vlc/usr/lib/vlc/audio_filter/liba52tofloat32_plugin.so \
240                 debian/vlc-plugin-a52/usr/lib/vlc/audio_filter
241
242         # Package: vlc-plugin-dvb
243         ln -s vlc debian/vlc-plugin-dvb/usr/share/doc/vlc-plugin-dvb
244         mv debian/vlc/usr/lib/vlc/access/libsatellite_plugin.so \
245                 debian/vlc-plugin-dvb/usr/lib/vlc/access
246
247         # Package: vlc-plugin-ogg
248         ln -s vlc debian/vlc-plugin-ogg/usr/share/doc/vlc-plugin-ogg
249         mv debian/vlc/usr/lib/vlc/demux/libogg_plugin.so \
250                 debian/vlc-plugin-ogg/usr/lib/vlc/demux
251         mv debian/vlc/usr/lib/vlc/codec/libvorbis_plugin.so \
252                 debian/vlc-plugin-ogg/usr/lib/vlc/codec
253
254         # Package: wxvlc
255         mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
256         ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
257         mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
258                 debian/wxvlc/usr/lib/vlc/gui/
259         ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz
260
261         # Clean up
262         rm -f debian/vlc/$(VIDDIR)/*.png
263
264         #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
265
266 # Build architecture-independent files here.
267 binary-indep: build install
268 # We have nothing to do by default.
269
270 # Build architecture-dependent files here.
271 binary-arch: build install
272 #       dh_testversion
273         dh_testdir
274         dh_testroot
275 #       dh_installdebconf       
276         dh_installdocs -p vlc
277 #       dh_installexamples
278         dh_installmenu
279         dh_installman doc/vlc.1 -p vlc
280         dh_installman doc/vlc-config.1 -p libvlc0-dev
281         dh_installchangelogs ChangeLog -p vlc
282         dh_link
283         dh_strip
284         dh_compress
285         dh_fixperms
286         dh_makeshlibs
287         dh_installdeb
288 #       dh_perl
289         dh_shlibdeps $(ARCH_EXCLUDE)
290         dh_gencontrol $(ARCH_EXCLUDE)
291         dh_md5sums $(ARCH_EXCLUDE)
292         dh_builddeb $(ARCH_EXCLUDE)
293
294 binary: binary-indep binary-arch
295 .PHONY: build clean binary-indep binary-arch binary install
296