rules 4.42 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 12 13 14

build: build-stamp
build-stamp:
	dh_testdir

Sam Hocevar's avatar
 
Sam Hocevar committed
15
	if [ $(DEB_BUILD_ARCH) = i386 ]; then \
16 17 18
	./configure --prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
Sam Hocevar's avatar
 
Sam Hocevar committed
19
		--enable-gnome --enable-gtk --enable-fb --with-glide \
Sam Hocevar's avatar
 
Sam Hocevar committed
20
		--with-ggi --with-sdl --enable-esd \
Sam Hocevar's avatar
 
Sam Hocevar committed
21
		--enable-qt --disable-ppro ; \
Sam Hocevar's avatar
 
Sam Hocevar committed
22 23 24 25
	else \
	./configure --prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
Sam Hocevar's avatar
 
Sam Hocevar committed
26
		--enable-gnome --enable-gtk --enable-fb \
Sam Hocevar's avatar
 
Sam Hocevar committed
27
		--with-ggi --with-sdl --enable-esd \
Sam Hocevar's avatar
 
Sam Hocevar committed
28
		--enable-qt ; \
Sam Hocevar's avatar
 
Sam Hocevar committed
29
	fi
30

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	-$(MAKE) distclean

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

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

Sam Hocevar's avatar
 
Sam Hocevar committed
52 53 54 55
	# get rid of libdvdcss for the moment
	rm -f debian/vlc/usr/lib/libdvdcss*
	rm -Rf debian/vlc/usr/include

56
	# make symlinks for packages
Sam Hocevar's avatar
 
Sam Hocevar committed
57
	aliases="ggi gtk gnome esd sdl qt" ; \
Sam Hocevar's avatar
 
Sam Hocevar committed
58 59
	if [ $(DEB_BUILD_ARCH) = i386 ]; then aliases=$$aliases" glide" ; fi ; \
	for alias in `echo $$aliases` ; do \
Sam Hocevar's avatar
 
Sam Hocevar committed
60 61 62 63
		mkdir -p debian/vlc-$$alias/usr/share/doc/ ; \
		ln -s vlc debian/vlc-$$alias/usr/share/doc/vlc-$$alias ; \
		mkdir -p debian/vlc-$$alias/usr/lib/videolan/vlc/ ; \
		mv debian/vlc/usr/lib/videolan/vlc/$$alias.so \
Sam Hocevar's avatar
 
Sam Hocevar committed
64
			debian/vlc-$$alias/usr/lib/videolan/vlc/ ; done
65

Sam Hocevar's avatar
 
Sam Hocevar committed
66 67
	mkdir -p debian/vlc-gtk/usr/bin/
	mv debian/vlc/usr/bin/gvlc debian/vlc-gtk/usr/bin/
Sam Hocevar's avatar
 
Sam Hocevar committed
68 69
	mkdir -p debian/vlc-gnome/usr/bin/
	mv debian/vlc/usr/bin/gnome-vlc debian/vlc-gnome/usr/bin/
Sam Hocevar's avatar
 
Sam Hocevar committed
70 71 72
	mkdir -p debian/vlc-qt/usr/bin/
	mv debian/vlc/usr/bin/qvlc debian/vlc-qt/usr/bin/

Sam Hocevar's avatar
 
Sam Hocevar committed
73 74 75 76 77
	mkdir -p debian/vlc/usr/share/pixmaps/
	mv debian/vlc/usr/share/videolan/vlc.png \
		debian/vlc/usr/share/pixmaps/
	mkdir -p debian/vlc/usr/share/gnome/apps/Multimedia/
	cp debian/vlc.desktop debian/vlc/usr/share/gnome/apps/Multimedia/
Sam Hocevar's avatar
 
Sam Hocevar committed
78

Sam Hocevar's avatar
 
Sam Hocevar committed
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
	mkdir -p debian/vlc-gtk/usr/share/videolan/ \
		debian/vlc-gtk/usr/share/pixmaps/
	mv debian/vlc/usr/share/videolan/gvlc.xpm \
		debian/vlc-gtk/usr/share/videolan/
	mv debian/vlc/usr/share/videolan/gvlc.png \
		debian/vlc-gtk/usr/share/pixmaps/
	mkdir -p debian/vlc-gtk/usr/share/gnome/apps/Multimedia/
	cp debian/gvlc.desktop debian/vlc-gtk/usr/share/gnome/apps/Multimedia/

	mkdir -p debian/vlc-gnome/usr/share/videolan/ \
		debian/vlc-gnome/usr/share/pixmaps/
	mv debian/vlc/usr/share/videolan/gnome-vlc.xpm \
		debian/vlc-gnome/usr/share/videolan/
	mv debian/vlc/usr/share/videolan/gnome-vlc.png \
		debian/vlc-gnome/usr/share/pixmaps/
	mkdir -p debian/vlc-gnome/usr/share/gnome/apps/Multimedia/
	cp debian/gnome-vlc.desktop debian/vlc-gnome/usr/share/gnome/apps/Multimedia/

	mkdir -p debian/vlc-qt/usr/share/videolan/ \
		debian/vlc-qt/usr/share/pixmaps/
	mv debian/vlc/usr/share/videolan/qvlc.xpm \
		debian/vlc-qt/usr/share/videolan/
	mv debian/vlc/usr/share/videolan/qvlc.png \
		debian/vlc-qt/usr/share/pixmaps/

	mkdir -p debian/vlc/usr/share/man/man1/
Sam Hocevar's avatar
 
Sam Hocevar committed
105
	gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
106 107
	mkdir -p debian/vlc-gtk/usr/share/man/man1/
	ln -s vlc.1.gz debian/vlc-gtk/usr/share/man/man1/gvlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
108 109
	mkdir -p debian/vlc-gnome/usr/share/man/man1/
	ln -s vlc.1.gz debian/vlc-gnome/usr/share/man/man1/gnome-vlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
110 111
	mkdir -p debian/vlc-qt/usr/share/man/man1/
	ln -s vlc.1.gz debian/vlc-qt/usr/share/man/man1/qvlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
112

113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
# 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	
	dh_installdocs
	dh_installexamples
	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
Sam Hocevar's avatar
 
Sam Hocevar committed
129
	#dh_installcron
Sam Hocevar's avatar
 
Sam Hocevar committed
130
#	dh_installmanpages -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-qt doc/vlc.1
Sam Hocevar's avatar
 
Sam Hocevar committed
131
	#dh_installinfo
132
#	dh_undocumented
Sam Hocevar's avatar
 
Sam Hocevar committed
133
	dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-qt
134 135 136 137 138 139 140
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
Sam Hocevar's avatar
 
Sam Hocevar committed
141
	dh_shlibdeps -Nvlc-glide
Sam Hocevar's avatar
 
Sam Hocevar committed
142 143 144 145 146 147 148 149 150
	if [ $(DEB_BUILD_ARCH) = i386 ]; then \
		dh_gencontrol ;\
		dh_md5sums ;\
		dh_builddeb ;\
	else \
		dh_gencontrol -Nvlc-glide ;\
		dh_md5sums -Nvlc-glide ;\
		dh_builddeb -Nvlc-glide ;\
	fi
151 152 153

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