]> git.sesse.net Git - vlc/blob - debian/rules
a4a8a3079fbbbd408a4a8183c1561c12118838be
[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 CONFIG_FLAGS = --enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-familiar --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde --enable-mp4 --enable-dvb --enable-dv --enable-svgalib
16 CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg
17 CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad
18 ifeq ($(DEB_BUILD_ARCH),i386)
19 CONFIG_FLAGS += --enable-glide
20 else
21 ARCH_EXCLUDE = -Nvlc-plugin-glide
22 endif
23
24 # Remove --without-dvdcss here in non-totalitarian countries
25 CONFIG_FLAGS += --enable-dvd --without-dvdcss
26
27 VIDDIR = usr/share/vlc
28 PIXDIR = usr/share/pixmaps
29 GNOMEDIR = usr/share/gnome/apps/Multimedia
30
31 #
32 # Build rules
33 #
34
35 build: build-stamp
36 build-stamp:
37         dh_testdir
38
39         # Check that we have an ffmpeg tree in here (can be a symlink)
40         test -d extras/ffmpeg
41         (cd extras/ffmpeg ; ./configure ; make)
42
43         # Check that we have an faad tree in here (can be a symlink)
44         test -d extras/faad
45         (cd extras/faad ; ./configure ; make)
46
47         ./configure --mandir=$${prefix}/share/man \
48                 --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
49
50         $(MAKE)
51
52         touch build-stamp
53
54 clean:
55         dh_testdir
56         dh_testroot
57         rm -f build-stamp
58
59         # Check that we have an ffmpeg tree in here (can be a symlink)
60         test -d extras/ffmpeg
61         -(cd extras/ffmpeg ; make distclean)
62         # Check that we have an faad tree in here (can be a symlink)
63         test -d extras/faad
64         -(cd extras/faad ; make distclean)
65         -$(MAKE) distclean
66
67         dh_clean
68
69 install: build
70         dh_testdir
71         dh_testroot
72         dh_clean -k
73         dh_installdirs
74
75         DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
76
77         # Package: vlc
78         mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
79         cp debian/vlc.desktop debian/vlc/$(GNOMEDIR)
80         cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
81         cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
82
83         # Package: libvlc0-dev
84         mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
85         mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
86         mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
87         mv debian/vlc/usr/include/vlc/* debian/libvlc0-dev/usr/include/vlc/
88         ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
89
90         # Package: gnome-vlc
91         mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
92         ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
93         mv debian/vlc/usr/lib/vlc/gui/gnome.so debian/gnome-vlc/usr/lib/vlc/gui/
94         ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
95         mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
96         mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
97
98         # Package: gvlc
99         mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
100         ln -s vlc debian/gvlc/usr/share/doc/gvlc
101         mv debian/vlc/usr/lib/vlc/gui/gtk.so debian/gvlc/usr/lib/vlc/gui/
102         mv debian/vlc/usr/lib/vlc/gui/familiar.so debian/gvlc/usr/lib/vlc/gui/
103         ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
104         mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
105         mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
106
107         # Package: vlc-plugin-esd
108         ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
109         mv debian/vlc/usr/lib/vlc/audio_output/esd.so \
110                 debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
111
112         # Package: vlc-plugin-alsa
113         ln -s vlc debian/vlc-plugin-alsa/usr/share/doc/vlc-plugin-alsa
114         mv debian/vlc/usr/lib/vlc/audio_output/alsa.so \
115                 debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/
116
117         # Package: vlc-plugin-sdl
118         ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
119         mv debian/vlc/usr/lib/vlc/audio_output/sdl.so \
120                 debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
121         mv debian/vlc/usr/lib/vlc/video_output/sdl.so \
122                 debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
123
124         # Package: vlc-plugin-ggi
125         ln -s vlc debian/vlc-plugin-ggi/usr/share/doc/vlc-plugin-ggi
126         mv debian/vlc/usr/lib/vlc/video_output/ggi.so \
127                 debian/vlc-plugin-ggi/usr/lib/vlc/video_output/
128
129         # Package: vlc-plugin-glide
130 ifeq ($(DEB_BUILD_ARCH),i386)
131         ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
132         mv debian/vlc/usr/lib/vlc/video_output/glide.so \
133                 debian/vlc-plugin-glide/usr/lib/vlc/video_output/
134 endif
135
136         # Package: qvlc
137         mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
138         ln -s vlc debian/qvlc/usr/share/doc/qvlc
139         mv debian/vlc/usr/lib/vlc/gui/qt.so debian/qvlc/usr/lib/vlc/gui/
140         ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
141         mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
142         mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
143
144         # Package: vlc-plugin-mad
145         ln -s vlc debian/vlc-plugin-mad/usr/share/doc/vlc-plugin-mad
146         mv debian/vlc/usr/lib/vlc/codec/mad.so \
147                 debian/vlc-plugin-mad/usr/lib/vlc/codec/
148
149         # Package: vlc-plugin-arts
150         ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
151         mv debian/vlc/usr/lib/vlc/audio_output/arts.so \
152                 debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
153
154         # Package: vlc-plugin-lirc
155         ln -s vlc debian/vlc-plugin-lirc/usr/share/doc/vlc-plugin-lirc
156         mv debian/vlc/usr/lib/vlc/control/lirc.so \
157                 debian/vlc-plugin-lirc/usr/lib/vlc/control/
158
159         # Package: vlc-plugin-aa
160         ln -s vlc debian/vlc-plugin-aa/usr/share/doc/vlc-plugin-aa
161         mv debian/vlc/usr/lib/vlc/video_output/aa.so \
162                 debian/vlc-plugin-aa/usr/lib/vlc/video_output/
163
164         # Package: vlc-plugin-xosd
165         ln -s vlc debian/vlc-plugin-xosd/usr/share/doc/vlc-plugin-xosd
166         mv debian/vlc/usr/lib/vlc/visualization/xosd.so \
167                 debian/vlc-plugin-xosd/usr/lib/vlc/visualization/
168
169         # Package: mozilla-plugin-vlc
170         ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
171         mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
172
173         # Package: kvlc
174         mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
175         ln -s vlc debian/kvlc/usr/share/doc/kvlc
176         mv debian/vlc/usr/lib/vlc/gui/kde.so debian/kvlc/usr/lib/vlc/gui/
177         ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
178         mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
179         mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
180
181         # Package: vlc-plugin-svgalib
182         ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
183         mv debian/vlc/usr/lib/vlc/video_output/svgalib.so \
184                 debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
185
186         # Package: vlc-plugin-dv
187         ln -s vlc debian/vlc-plugin-dv/usr/share/doc/vlc-plugin-dv
188         mv debian/vlc/usr/lib/vlc/codec/dv.so \
189                 debian/vlc-plugin-dv/usr/lib/vlc/codec
190
191         # Clean up
192         rm -f debian/vlc/$(VIDDIR)/*.png
193
194         #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
195
196 # Build architecture-independent files here.
197 binary-indep: build install
198 # We have nothing to do by default.
199
200 # Build architecture-dependent files here.
201 binary-arch: build install
202 #       dh_testversion
203         dh_testdir
204         dh_testroot
205 #       dh_installdebconf       
206         dh_installdocs -p vlc
207 #       dh_installexamples
208         dh_installmenu
209         dh_installman doc/vlc.1 -p vlc
210         dh_installman doc/vlc-config.1 -p libvlc0-dev
211         dh_installchangelogs ChangeLog -p vlc
212         dh_link
213         dh_strip
214         dh_compress
215         dh_fixperms
216         dh_makeshlibs
217         dh_installdeb
218 #       dh_perl
219         dh_shlibdeps $(ARCH_EXCLUDE)
220         dh_gencontrol $(ARCH_EXCLUDE)
221         dh_md5sums $(ARCH_EXCLUDE)
222         dh_builddeb $(ARCH_EXCLUDE)
223
224 binary: binary-indep binary-arch
225 .PHONY: build clean binary-indep binary-arch binary install
226