rules 4 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

Sam Hocevar's avatar
 
Sam Hocevar committed
11 12 13 14 15 16 17
# Compilation options
export CONFIG_FLAGS="--prefix=/usr --enable-gnome --enable-gtk --enable-fb --with-ggi --with-sdl --enable-esd --enable-alsa --enable-qt"
export LIBDVDCSS_FLAGS="--with-dvdcss=local-shared"
export VIDDIR="usr/share/videolan"
export PIXDIR="usr/share/pixmaps"
export GNOMEDIR="usr/share/gnome/apps/Multimedia"

18 19 20 21
build: build-stamp
build-stamp:
	dh_testdir

Sam Hocevar's avatar
 
Sam Hocevar committed
22
	if [ $(DEB_BUILD_ARCH) = i386 ]; then \
Sam Hocevar's avatar
 
Sam Hocevar committed
23 24 25 26 27
		./configure --mandir=$${prefix}/share/man \
			--infodir=$${prefix}/share/info \
			$(shell echo $(CONFIG_FLAGS)) \
			$(shell echo $(LIBDVDCSS_FLAGS)) \
			--with-glide --disable-ppro ; \
Sam Hocevar's avatar
 
Sam Hocevar committed
28
	else \
Sam Hocevar's avatar
 
Sam Hocevar committed
29 30 31 32
		./configure --mandir=$${prefix}/share/man \
			--infodir=$${prefix}/share/info \
			$(shell echo $(CONFIG_FLAGS)) \
			$(shell echo $(LIBDVDCSS_FLAGS)) ; \
Sam Hocevar's avatar
 
Sam Hocevar committed
33
	fi
34

35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
	$(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
54
	DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
55

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

Sam Hocevar's avatar
 
Sam Hocevar committed
62
	mv debian/vlc/usr/bin/gvlc debian/vlc-gtk/usr/bin/
Sam Hocevar's avatar
 
Sam Hocevar committed
63
	mv debian/vlc/usr/bin/gnome-vlc debian/vlc-gnome/usr/bin/
Sam Hocevar's avatar
 
Sam Hocevar committed
64 65
	mv debian/vlc/usr/bin/qvlc debian/vlc-qt/usr/bin/

Sam Hocevar's avatar
 
Sam Hocevar committed
66 67 68 69 70 71 72 73 74 75 76 77 78
	mv debian/vlc/$(VIDDIR)/vlc.png debian/vlc/$(PIXDIR)
	mv debian/vlc/$(VIDDIR)/gvlc.xpm debian/vlc-gtk/$(VIDDIR)
	mv debian/vlc/$(VIDDIR)/gvlc.png debian/vlc-gtk/$(PIXDIR)
	mv debian/vlc/$(VIDDIR)/gnome-vlc.xpm debian/vlc-gnome/$(VIDDIR)
	mv debian/vlc/$(VIDDIR)/gnome-vlc.png debian/vlc-gnome/$(PIXDIR)
	mv debian/vlc/$(VIDDIR)/qvlc.xpm debian/vlc-qt/$(VIDDIR)
	mv debian/vlc/$(VIDDIR)/qvlc.png debian/vlc-qt/$(PIXDIR)

	cp debian/vlc.desktop debian/vlc/$(GNOMEDIR)
	cp debian/gvlc.desktop debian/vlc-gtk/$(GNOMEDIR)
	cp debian/gnome-vlc.desktop debian/vlc-gnome/$(GNOMEDIR)

	#gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
79
	ln -s vlc.1.gz debian/vlc-gtk/usr/share/man/man1/gvlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
80
	ln -s vlc.1.gz debian/vlc-gnome/usr/share/man/man1/gnome-vlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
81
	ln -s vlc.1.gz debian/vlc-qt/usr/share/man/man1/qvlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
82

Sam Hocevar's avatar
 
Sam Hocevar committed
83 84 85 86 87 88 89 90 91 92 93
# libdvdcss start
	mv debian/vlc/usr/include/videolan/dvdcss.h \
				debian/libdvdcss0.0.2-dev/usr/include/videolan
	rmdir debian/vlc/usr/include/videolan
	rmdir debian/vlc/usr/include
	mv debian/vlc/usr/lib/*.a debian/libdvdcss0.0.2-dev/usr/lib
	mv debian/vlc/usr/lib/*.so debian/libdvdcss0.0.2-dev/usr/lib
	mv debian/vlc/usr/lib/*.so.* debian/libdvdcss0.0.2/usr/lib
	ln -s libdvdcss0.0.2 debian/libdvdcss0.0.2-dev/usr/share/doc/libdvdcss0.0.2-dev
# libdvdcss stop

94 95 96 97 98 99 100 101 102 103 104
# 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
Sam Hocevar's avatar
 
Sam Hocevar committed
105
#	dh_installexamples
106 107 108 109
	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
Sam Hocevar's avatar
 
Sam Hocevar committed
110 111 112 113
#	dh_installcron
#	dh_installmanpages -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-alsa -Nvlc-sdl -Nvlc-qt doc/vlc.1
	dh_installman doc/vlc.1
#	dh_installinfo
114
#	dh_undocumented
Sam Hocevar's avatar
 
Sam Hocevar committed
115
	dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-alsa -Nvlc-sdl -Nvlc-qt ChangeLog
116 117 118 119 120 121 122
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
Sam Hocevar's avatar
 
Sam Hocevar committed
123
	dh_shlibdeps -Nvlc-glide
Sam Hocevar's avatar
 
Sam Hocevar committed
124 125 126 127 128 129 130 131 132
	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
133 134 135

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