rules 9.33 KB
Newer Older
1 2 3 4 5 6 7 8
#!/usr/bin/make -f
# debian/rules for the VideoLAN Client - uses debhelper.
# based on Joey Hess's one.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
9
export DH_COMPAT=3
10

11
#
Sam Hocevar's avatar
 
Sam Hocevar committed
12
# Compilation options
13 14
#

15
CONFIG_FLAGS = --enable-release --prefix=/usr
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
CONFIG_FLAGS += \
	--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 \
	--enable-satellite \
	--enable-ogg \
	--enable-vorbis \
42
	--enable-wxwindows \
43 44 45
	$(NULL)

# These ones are currently shipped with VLC
46 47
CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg
CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad
48 49

# Glide is only for x86
50 51 52 53 54 55
ifeq ($(DEB_BUILD_ARCH),i386)
CONFIG_FLAGS += --enable-glide
else
ARCH_EXCLUDE = -Nvlc-plugin-glide
endif

56
# Remove --without-dvdcss in non-totalitarian countries
57 58
CONFIG_FLAGS += --enable-dvd --without-dvdcss

59
# A few shortcuts
60 61 62
VIDDIR = usr/share/vlc
PIXDIR = usr/share/pixmaps
GNOMEDIR = usr/share/gnome/apps/Multimedia
Sam Hocevar's avatar
 
Sam Hocevar committed
63

64 65 66
#
# Build rules
#
Sam Hocevar's avatar
 
Sam Hocevar committed
67

68 69 70 71
build: build-stamp
build-stamp:
	dh_testdir

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 77

	# Check that we have an faad tree in here (can be a symlink)
	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
Sam Hocevar's avatar
Sam Hocevar committed
81
	./configure --mandir=$${prefix}/share/man \
82
		--infodir=$${prefix}/share/info $(CONFIG_FLAGS)
83 84 85 86 87 88 89 90 91
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

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 100 101 102 103 104 105 106 107 108
	-$(MAKE) distclean

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

Sam Hocevar's avatar
 
Sam Hocevar committed
109
	DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
110

111 112 113 114 115
	# Package: vlc
	mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
	cp debian/vlc.desktop debian/vlc/$(GNOMEDIR)
	cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
	cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
116

117
	# Package: libvlc0-dev
118 119
	mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
	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 122
	mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
	rm -Rf debian/vlc/usr/include
123 124
	ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev

125
	# Package: gnome-vlc
Sam Hocevar's avatar
Sam Hocevar committed
126 127
	mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
	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 131
	mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
		debian/gnome-vlc/usr/lib/vlc/gui/
Sam Hocevar's avatar
Sam Hocevar committed
132
	ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
133 134 135 136 137 138
	mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
	mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png

	# Package: gvlc
	mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
	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 142 143 144
	mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
		debian/gvlc/usr/lib/vlc/gui/
	mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
		debian/gvlc/usr/lib/vlc/gui/
145 146 147
	ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
	mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
	mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
Sam Hocevar's avatar
Sam Hocevar committed
148

149 150
	# Package: vlc-plugin-esd
	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 153 154 155
		debian/vlc-plugin-esd/usr/lib/vlc/audio_output/

	# Package: vlc-plugin-alsa
	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 158 159 160
		debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/

	# Package: vlc-plugin-sdl
	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 165 166 167
		debian/vlc-plugin-sdl/usr/lib/vlc/video_output/

	# Package: vlc-plugin-ggi
	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 170 171 172 173
		debian/vlc-plugin-ggi/usr/lib/vlc/video_output/

	# Package: vlc-plugin-glide
ifeq ($(DEB_BUILD_ARCH),i386)
	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 176 177 178
		debian/vlc-plugin-glide/usr/lib/vlc/video_output/
endif

	# Package: qvlc
Sam Hocevar's avatar
Sam Hocevar committed
179 180
	mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
	ln -s vlc debian/qvlc/usr/share/doc/qvlc
181 182
	mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
		debian/qvlc/usr/lib/vlc/gui/
Sam Hocevar's avatar
Sam Hocevar committed
183
	ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
184 185 186 187 188
	mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
	mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png

	# Package: vlc-plugin-mad
	ln -s vlc debian/vlc-plugin-mad/usr/share/doc/vlc-plugin-mad
189 190
	mv debian/vlc/usr/lib/vlc/audio_filter/libmpgatofixed32_plugin.so \
		debian/vlc-plugin-mad/usr/lib/vlc/audio_filter/
191 192 193

	# Package: vlc-plugin-arts
	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 196 197 198
		debian/vlc-plugin-arts/usr/lib/vlc/audio_output/

	# Package: vlc-plugin-lirc
	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 201 202 203
		debian/vlc-plugin-lirc/usr/lib/vlc/control/

	# Package: vlc-plugin-aa
	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/
Sam Hocevar's avatar
Sam Hocevar committed
206

207 208
	# Package: vlc-plugin-xosd
	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 211 212 213 214 215 216
		debian/vlc-plugin-xosd/usr/lib/vlc/visualization/

	# Package: mozilla-plugin-vlc
	ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
	mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib

	# Package: kvlc
Sam Hocevar's avatar
Sam Hocevar committed
217 218
	mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
	ln -s vlc debian/kvlc/usr/share/doc/kvlc
219 220
	mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
		debian/kvlc/usr/lib/vlc/gui/
221 222
	mv debian/vlc/usr/share/vlc/ui.rc \
		debian/kvlc/usr/share/vlc
Sam Hocevar's avatar
Sam Hocevar committed
223 224 225
	ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
	mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
	mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
Sam Hocevar's avatar
 
Sam Hocevar committed
226

227 228
	# Package: vlc-plugin-svgalib
	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 231
		debian/vlc-plugin-svgalib/usr/lib/vlc/video_output

232 233
	# Package: vlc-plugin-dv
	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 236
		debian/vlc-plugin-dv/usr/lib/vlc/codec

237 238
	# Package: vlc-plugin-a52
	ln -s vlc debian/vlc-plugin-a52/usr/share/doc/vlc-plugin-a52
239 240
	mv debian/vlc/usr/lib/vlc/audio_filter/liba52tofloat32_plugin.so \
		debian/vlc-plugin-a52/usr/lib/vlc/audio_filter
241 242 243 244 245 246

	# Package: vlc-plugin-dvb
	ln -s vlc debian/vlc-plugin-dvb/usr/share/doc/vlc-plugin-dvb
	mv debian/vlc/usr/lib/vlc/access/libsatellite_plugin.so \
		debian/vlc-plugin-dvb/usr/lib/vlc/access

247 248 249 250 251 252 253
	# Package: vlc-plugin-ogg
	ln -s vlc debian/vlc-plugin-ogg/usr/share/doc/vlc-plugin-ogg
	mv debian/vlc/usr/lib/vlc/demux/libogg_plugin.so \
		debian/vlc-plugin-ogg/usr/lib/vlc/demux
	mv debian/vlc/usr/lib/vlc/codec/libvorbis_plugin.so \
		debian/vlc-plugin-ogg/usr/lib/vlc/codec

254 255 256 257 258 259 260
	# Package: wxvlc
	mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/
	ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
	mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
		debian/wxvlc/usr/lib/vlc/gui/
	ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz

261 262
	# Clean up
	rm -f debian/vlc/$(VIDDIR)/*.png
Sam Hocevar's avatar
 
Sam Hocevar committed
263 264

	#gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
265

266 267 268 269 270 271 272 273 274 275
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot
#	dh_installdebconf	
276
	dh_installdocs -p vlc
Sam Hocevar's avatar
 
Sam Hocevar committed
277
#	dh_installexamples
278
	dh_installmenu
279 280
	dh_installman doc/vlc.1 -p vlc
	dh_installman doc/vlc-config.1 -p libvlc0-dev
281 282 283
#	dh_installchangelogs ChangeLog -p vlc
	cp ChangeLog debian/tmp/usr/share/doc/vlc/changelog
	cp debian/changelog debian/tmp/usr/share/doc/vlc/changelog.Debian
284 285 286 287
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
Sam Hocevar's avatar
 
Sam Hocevar committed
288
	dh_makeshlibs
289 290
	dh_installdeb
#	dh_perl
291 292 293 294
	dh_shlibdeps $(ARCH_EXCLUDE)
	dh_gencontrol $(ARCH_EXCLUDE)
	dh_md5sums $(ARCH_EXCLUDE)
	dh_builddeb $(ARCH_EXCLUDE)
295 296 297

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
Sam Hocevar's avatar
 
Sam Hocevar committed
298