]> git.sesse.net Git - vlc/blob - debian/rules
* ./debian/rules: we now remove spurious woody build files in the clean rule.
[vlc] / debian / rules
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 ARCH_EXCLUDE =
16
17 CONFIG_FLAGS = --enable-release --prefix=/usr
18 CONFIG_FLAGS += \
19         --enable-gnome \
20         --enable-gtk \
21         --enable-familiar \
22         --enable-fb \
23         --enable-ggi \
24         --enable-sdl \
25         --enable-esd \
26         --enable-qt \
27         --enable-mad \
28         --enable-arts \
29         --enable-alsa \
30         --enable-lirc \
31         --enable-a52 \
32         --enable-aa \
33         --enable-dvbpsi \
34         --enable-xosd \
35         --enable-mozilla \
36         --enable-kde \
37         --enable-mp4 \
38         --enable-dvb \
39         --enable-dv \
40         --enable-satellite \
41         --enable-ogg \
42         --enable-vorbis \
43         --enable-wxwindows \
44         --enable-slp \
45         --enable-flac \
46         $(NULL)
47
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
52 # Glide is only for x86
53 ifeq ($(DEB_BUILD_ARCH),i386)
54 CONFIG_FLAGS += --enable-glide
55 CONFIG_FLAGS += --enable-svgalib
56 else
57 ARCH_EXCLUDE += -Nvlc-plugin-glide -Nvlc-glide
58 ARCH_EXCLUDE += -Nvlc-plugin-svgalib
59 endif
60
61 # Remove --without-dvdcss in non-totalitarian countries
62 CONFIG_FLAGS += --enable-dvd --without-dvdcss
63
64 # A few shortcuts
65 VIDDIR = usr/share/vlc
66 PIXDIR = usr/share/pixmaps
67 GNOMEDIR = usr/share/gnome/apps/Multimedia
68
69 #
70 # Build rules
71 #
72
73 build: build-stamp
74 build-stamp:
75         dh_testdir
76
77         # Touch stuff
78         touch configure.ac \
79         && touch aclocal.m4 \
80         && touch configure \
81         && touch config.h.in \
82         && touch `find . -name Makefile.in`
83
84         # Check that we have an ffmpeg tree in here (can be a symlink)
85         test -d extras/ffmpeg
86         if test ! -d CVS; then \
87                 cd extras/ffmpeg \
88                 && ./configure \
89                 && cd libavcodec \
90                 && make; \
91         fi
92
93         # Check that we have an faad tree in here (can be a symlink)
94         test -d extras/faad
95         if test ! -d CVS; then \
96                 cd extras/faad \
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 \
103                 && cd libfaad \
104                 && make; \
105         fi
106
107         # Configure VLC and build it
108         ./configure --mandir=$${prefix}/share/man \
109                 --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
110         $(MAKE)
111
112         touch build-stamp
113
114 clean:
115         dh_testdir
116         dh_testroot
117         rm -f build-stamp
118
119         # Check that we have an ffmpeg tree in here (can be a symlink)
120         test -d extras/ffmpeg
121         -if test ! -d CVS; then cd extras/ffmpeg && make distclean; fi
122         # Check that we have an faad tree in here (can be a symlink)
123         test -d extras/faad
124         -if test ! -d CVS; then cd extras/faad && make distclean; fi
125
126         # Remove spurious autotools stuff
127         rm -f config.log confdefs.h
128
129         # Remove spurious Debian files
130         rm -f debian/changelog.woody debian/control.woody debian/rules.woody
131
132         -$(MAKE) distclean
133
134         dh_clean
135
136 install: build
137         dh_testdir
138         dh_testroot
139         dh_clean -k
140         dh_installdirs
141
142         DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
143
144         # Package: vlc
145         mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
146         mv debian/vlc/$(VIDDIR)/vlc32x32.xpm debian/vlc/$(VIDDIR)/vlc.xpm
147         cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
148         cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
149
150         cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc
151         strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat
152
153         # Package: libvlc0-dev
154         mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
155         mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
156         mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
157         mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
158         rm -Rf debian/vlc/usr/include
159         ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
160
161         # Package: gnome-vlc
162         mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
163         ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
164         mv debian/vlc/usr/lib/vlc/misc/libgnome_main_plugin.so \
165                 debian/gnome-vlc/usr/lib/vlc/gui/
166         mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
167                 debian/gnome-vlc/usr/lib/vlc/gui/
168         ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
169         mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
170         mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
171
172         # Package: vlc-gnome
173         mkdir -p debian/vlc-gnome/usr/share/doc/
174         ln -s vlc debian/vlc-gnome/usr/share/doc/vlc-gnome
175
176         # Package: gvlc
177         mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
178         ln -s vlc debian/gvlc/usr/share/doc/gvlc
179         mv debian/vlc/usr/lib/vlc/misc/libgtk_main_plugin.so \
180                 debian/gvlc/usr/lib/vlc/gui/
181         mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
182                 debian/gvlc/usr/lib/vlc/gui/
183         mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
184                 debian/gvlc/usr/lib/vlc/gui/
185         ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
186         mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
187         mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
188
189         # Package: vlc-gtk
190         mkdir -p debian/vlc-gtk/usr/share/doc/
191         ln -s vlc debian/vlc-gtk/usr/share/doc/vlc-gtk
192
193         # Package: vlc-plugin-esd
194         ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
195         mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \
196                 debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
197
198         # Package: vlc-esd
199         mkdir -p debian/vlc-esd/usr/share/doc/
200         ln -s vlc debian/vlc-esd/usr/share/doc/vlc-esd
201
202         # Package: vlc-plugin-alsa
203         ln -s vlc debian/vlc-plugin-alsa/usr/share/doc/vlc-plugin-alsa
204         mv debian/vlc/usr/lib/vlc/audio_output/libalsa_plugin.so \
205                 debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/
206
207         # Package: vlc-alsa
208         mkdir -p debian/vlc-alsa/usr/share/doc/
209         ln -s vlc debian/vlc-alsa/usr/share/doc/vlc-alsa
210
211         # Package: vlc-plugin-sdl
212         ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
213         mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \
214                 debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
215         mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \
216                 debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
217
218         # Package: vlc-sdl
219         mkdir -p debian/vlc-sdl/usr/share/doc/
220         ln -s vlc debian/vlc-sdl/usr/share/doc/vlc-sdl
221
222         # Package: vlc-plugin-ggi
223         ln -s vlc debian/vlc-plugin-ggi/usr/share/doc/vlc-plugin-ggi
224         mv debian/vlc/usr/lib/vlc/video_output/libggi_plugin.so \
225                 debian/vlc-plugin-ggi/usr/lib/vlc/video_output/
226
227         # Package: vlc-ggi
228         mkdir -p debian/vlc-ggi/usr/share/doc/
229         ln -s vlc debian/vlc-ggi/usr/share/doc/vlc-ggi
230
231         # Package: vlc-plugin-glide
232 ifeq ($(DEB_BUILD_ARCH),i386)
233         ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
234         mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \
235                 debian/vlc-plugin-glide/usr/lib/vlc/video_output/
236
237         # Package: vlc-glide
238         mkdir -p debian/vlc-glide/usr/share/doc/
239         ln -s vlc debian/vlc-glide/usr/share/doc/vlc-glide
240 endif
241
242         # Package: qvlc
243         mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
244         ln -s vlc debian/qvlc/usr/share/doc/qvlc
245         mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
246                 debian/qvlc/usr/lib/vlc/gui/
247         ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
248         mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
249         mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
250
251         # Package: vlc-qt
252         mkdir -p debian/vlc-qt/usr/share/doc/
253         ln -s vlc debian/vlc-qt/usr/share/doc/vlc-qt
254
255         # Package: vlc-plugin-arts
256         ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
257         mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \
258                 debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
259
260         # Package: mozilla-plugin-vlc
261         ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
262         mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
263
264         # Package: kvlc
265         mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
266         ln -s vlc debian/kvlc/usr/share/doc/kvlc
267         mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
268                 debian/kvlc/usr/lib/vlc/gui/
269         mv debian/vlc/usr/share/vlc/ui.rc \
270                 debian/kvlc/usr/share/vlc
271         ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
272         mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
273         mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
274
275         # Package: vlc-plugin-svgalib
276 ifeq ($(DEB_BUILD_ARCH),i386)
277         ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
278         mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
279                 debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
280 endif
281
282         # Package: wxvlc
283         mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
284         ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
285         mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
286                 debian/wxvlc/usr/lib/vlc/gui/
287         ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz
288
289         # Clean up
290         rm -f debian/vlc/$(VIDDIR)/*.png
291
292         #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
293
294 # Build architecture-independent files here.
295 binary-indep: build install
296 # We have nothing to do by default.
297
298 # Build architecture-dependent files here.
299 binary-arch: build install
300 #       dh_testversion
301         dh_testdir
302         dh_testroot
303 #       dh_installdebconf       
304         dh_installdocs -p vlc
305 #       dh_installexamples
306         dh_installmenu
307         dh_installman doc/vlc.1 -p vlc
308         dh_installman doc/vlc-config.1 -p libvlc0-dev
309 #       dh_installchangelogs ChangeLog -p vlc
310         cp ChangeLog debian/vlc/usr/share/doc/vlc/changelog
311         cp debian/changelog debian/vlc/usr/share/doc/vlc/changelog.Debian
312         dh_link
313         dh_strip
314         dh_compress
315         dh_fixperms
316         dh_makeshlibs
317         dh_installdeb
318 #       dh_perl
319         dh_shlibdeps $(ARCH_EXCLUDE)
320         dh_gencontrol $(ARCH_EXCLUDE)
321         dh_md5sums $(ARCH_EXCLUDE)
322         dh_builddeb $(ARCH_EXCLUDE)
323
324 binary: binary-indep binary-arch
325 .PHONY: build clean binary-indep binary-arch binary install
326