rules 4.78 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
# Compilation options
Sam Hocevar's avatar
 
Sam Hocevar committed
12
export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-kde --enable-aa"
Sam Hocevar's avatar
 
Sam Hocevar committed
13 14 15 16 17
export LIBDVDCSS_FLAGS="--with-dvdcss=local-shared"
export VIDDIR="usr/share/videolan"
export PIXDIR="usr/share/pixmaps"
export GNOMEDIR="usr/share/gnome/apps/Multimedia"

Sam Hocevar's avatar
 
Sam Hocevar committed
18
# Library options
Sam Hocevar's avatar
 
Sam Hocevar committed
19
version=$(shell grep '^ *LIBDVDCSS_VERSION=' configure.in | head -1 | sed 's/"//g' | cut -f2 -d=)
Sam Hocevar's avatar
 
Sam Hocevar committed
20
major=$(shell echo "$(version)" | cut -f1 -d.)
Sam Hocevar's avatar
 
Sam Hocevar committed
21

22 23 24 25
build: build-stamp
build-stamp:
	dh_testdir

Sam Hocevar's avatar
 
Sam Hocevar committed
26 27
	case $(DEB_BUILD_ARCH) in \
	i386) \
Sam Hocevar's avatar
 
Sam Hocevar committed
28
		ARCH_FLAGS="--enable-glide" ;; \
Sam Hocevar's avatar
 
Sam Hocevar committed
29 30 31 32 33 34
	*) \
		ARCH_FLAGS="" ;; \
	esac ;\
	./configure $$ARCH_FLAGS --mandir=$${prefix}/share/man \
		--infodir=$${prefix}/share/info \
		$(shell echo $(CONFIG_FLAGS)) $(shell echo $(LIBDVDCSS_FLAGS))
35

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

Sam Hocevar's avatar
 
Sam Hocevar committed
57
	# make symlinks for packages and install plugins
Sam Hocevar's avatar
 
Sam Hocevar committed
58 59
	case $(DEB_BUILD_ARCH) in \
	i386) \
Sam Hocevar's avatar
 
Sam Hocevar committed
60
		ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa a52 lirc kde aa glide" ;; \
Sam Hocevar's avatar
 
Sam Hocevar committed
61
	*) \
Sam Hocevar's avatar
 
Sam Hocevar committed
62
		ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa a52 lirc kde aa" ;; \
Sam Hocevar's avatar
 
Sam Hocevar committed
63 64
	esac ;\
	for alias in $$ARCH_ALIASES ; do \
Sam Hocevar's avatar
 
Sam Hocevar committed
65 66
		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
67
			debian/vlc-$$alias/usr/lib/videolan/vlc/ ; done
68

Sam Hocevar's avatar
 
Sam Hocevar committed
69
	mv debian/vlc/usr/bin/gvlc debian/vlc-gtk/usr/bin/
Sam Hocevar's avatar
 
Sam Hocevar committed
70
	mv debian/vlc/usr/bin/gnome-vlc debian/vlc-gnome/usr/bin/
Sam Hocevar's avatar
 
Sam Hocevar committed
71
	mv debian/vlc/usr/bin/qvlc debian/vlc-qt/usr/bin/
Sam Hocevar's avatar
 
Sam Hocevar committed
72
	mv debian/vlc/usr/bin/kvlc debian/vlc-kde/usr/bin/
Sam Hocevar's avatar
 
Sam Hocevar committed
73

Sam Hocevar's avatar
 
Sam Hocevar committed
74 75 76 77 78 79 80
	mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
	mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/vlc-gtk/$(VIDDIR)/gvlc.xpm
	mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/vlc-gtk/$(PIXDIR)/gvlc.png
	mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/vlc-gnome/$(VIDDIR)/gnome-vlc.xpm
	mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/vlc-gnome/$(PIXDIR)/gnome-vlc.png
	mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/vlc-qt/$(VIDDIR)/qvlc.xpm
	mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/vlc-qt/$(PIXDIR)/qvlc.png
Sam Hocevar's avatar
 
Sam Hocevar committed
81 82
	mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/vlc-kde/$(VIDDIR)/kvlc.xpm
	mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/vlc-kde/$(PIXDIR)/kvlc.png
Sam Hocevar's avatar
 
Sam Hocevar committed
83 84 85 86 87 88

	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
89
	ln -s vlc.1.gz debian/vlc-gtk/usr/share/man/man1/gvlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
90
	ln -s vlc.1.gz debian/vlc-gnome/usr/share/man/man1/gnome-vlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
91
	ln -s vlc.1.gz debian/vlc-qt/usr/share/man/man1/qvlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
92
	ln -s vlc.1.gz debian/vlc-kde/usr/share/man/man1/kvlc.1.gz
Sam Hocevar's avatar
 
Sam Hocevar committed
93

Sam Hocevar's avatar
 
Sam Hocevar committed
94 95
# libdvdcss start
	mv debian/vlc/usr/include/videolan/dvdcss.h \
Sam Hocevar's avatar
 
Sam Hocevar committed
96
				debian/libdvdcss$(major)-dev/usr/include/videolan
Sam Hocevar's avatar
 
Sam Hocevar committed
97
	rm -Rf debian/vlc/usr/include
Sam Hocevar's avatar
 
Sam Hocevar committed
98 99 100 101
	mv debian/vlc/usr/lib/*.a debian/libdvdcss$(major)-dev/usr/lib
	mv debian/vlc/usr/lib/*.so debian/libdvdcss$(major)-dev/usr/lib
	mv debian/vlc/usr/lib/*.so.* debian/libdvdcss$(major)/usr/lib
	ln -s libdvdcss$(major) debian/libdvdcss$(major)-dev/usr/share/doc/libdvdcss$(major)-dev
Sam Hocevar's avatar
 
Sam Hocevar committed
102 103
# libdvdcss stop

104 105 106 107 108 109 110 111 112 113 114
# 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
115
#	dh_installexamples
116 117 118 119
	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
Sam Hocevar's avatar
 
Sam Hocevar committed
120 121 122
#	dh_installcron
	dh_installman doc/vlc.1
#	dh_installinfo
123
#	dh_undocumented
Sam Hocevar's avatar
 
Sam Hocevar committed
124
	dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-alsa -Nvlc-sdl -Nvlc-qt -Nvlc-arts -Nvlc-mad -Nvlc-lirc -Nvlc-a52 -Nvlc-kde -Nvlc-aa ChangeLog
Sam Hocevar's avatar
 
Sam Hocevar committed
125
# libdvdcss start
Sam Hocevar's avatar
 
Sam Hocevar committed
126
	dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-alsa -Nvlc-sdl -Nvlc-qt -Nvlc-arts -Nvlc-mad -Nvlc-lirc -Nvlc-a52 -Nvlc-kde -Nvlc-aa ChangeLog.libdvdcss
Sam Hocevar's avatar
 
Sam Hocevar committed
127
# libdvdcss stop
128 129 130 131
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
Sam Hocevar's avatar
 
Sam Hocevar committed
132
	dh_makeshlibs
133 134
	dh_installdeb
#	dh_perl
Sam Hocevar's avatar
 
Sam Hocevar committed
135 136 137 138 139

	case $(DEB_BUILD_ARCH) in \
	i386) \
		ARCH_EXCLUDE="" ;; \
	*) \
140
		ARCH_EXCLUDE="-Nvlc-glide" ;; \
Sam Hocevar's avatar
 
Sam Hocevar committed
141 142 143 144 145
	esac ;\
	dh_shlibdeps $$ARCH_EXCLUDE ;\
	dh_gencontrol $$ARCH_EXCLUDE ;\
	dh_md5sums $$ARCH_EXCLUDE ;\
	dh_builddeb $$ARCH_EXCLUDE
146 147 148

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