rules 2.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 20 21 22 23 24 25 26 27
		--enable-gnome --enable-fb --with-glide --with-ggi \
		--with-sdl --enable-esd --enable-alsa --disable-ppro ; \
	else \
	./configure --prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--enable-gnome --enable-fb --with-ggi \
		--with-sdl --enable-esd --enable-alsa; \
	fi
28

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
	$(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
48
	DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
49

50
	# make symlinks for packages
Sam Hocevar's avatar
 
Sam Hocevar committed
51
	for alias in ggi gnome glide esd sdl alsa ; do \
Sam Hocevar's avatar
 
Sam Hocevar committed
52 53 54 55 56 57
		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 \
			debian/vlc-$$alias/usr/lib/videolan/vlc/ ; \
	done
58

Sam Hocevar's avatar
 
Sam Hocevar committed
59 60 61 62 63 64 65 66
	mkdir -p debian/vlc-gnome/usr/bin/
	mv debian/vlc/usr/bin/gvlc debian/vlc-gnome/usr/bin/
	mkdir -p debian/vlc-gnome/usr/share/videolan/
	mv debian/vlc/usr/share/videolan/gvlc.png \
		debian/vlc-gnome/usr/share/videolan/
	mkdir -p debian/vlc-gnome/usr/share/man/man1/
	ln -s vlc.1.gz debian/vlc-gnome/usr/share/man/man1/gvlc.1.gz

67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
# 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
	dh_installcron
Sam Hocevar's avatar
 
Sam Hocevar committed
84
	dh_installmanpages -Nvlc-gnome -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa
85 86
	dh_installinfo
#	dh_undocumented
Sam Hocevar's avatar
 
Sam Hocevar committed
87
	dh_installchangelogs -Nvlc-gnome -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa
88 89 90 91 92 93 94
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
Sam Hocevar's avatar
 
Sam Hocevar committed
95
	dh_shlibdeps -Nvlc-glide
96 97 98 99 100 101
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install