X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=debian%2Frules;h=0820d72391455d84c13620106a92886a43babbc1;hb=c9d8217fd9cb95ecd8b1844c9c141e042f36bceb;hp=0e7a00e7fe637d068dc33f91f3ea0453b322fe77;hpb=f02ba9de18c5893b3a20db61dfc7e537b8ae48b9;p=vlc diff --git a/debian/rules b/debian/rules index 0e7a00e7fe..0820d72391 100755 --- a/debian/rules +++ b/debian/rules @@ -1,67 +1,193 @@ #!/usr/bin/make -f -# debian/rules for the VideoLAN Client - uses debhelper. +# debian/rules for the VLC media player - uses debhelper. +# $Id$ # based on Joey Hess's one. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +include /usr/share/dpatch/dpatch.make -# This is the debhelper compatability version to use. -export DH_COMPAT=3 +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +confflags = --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) # # Compilation options # +vlc_confflags = --enable-release --prefix=/usr +vlc_confflags += \ + --disable-gnome \ + --disable-gtk \ + --disable-familiar \ + --disable-fb \ + --enable-ggi \ + --enable-sdl \ + --enable-esd \ + --disable-qt \ + --enable-mad \ + --enable-arts \ + --enable-alsa \ + --enable-lirc \ + --enable-a52 \ + --enable-aa \ + --enable-dvbpsi \ + --enable-xosd \ + --enable-mozilla \ + --disable-kde \ + --enable-mp4 \ + --enable-dvb \ + --enable-dv \ + --disable-satellite \ + --enable-ogg \ + --enable-vorbis \ + --enable-wxwidgets \ + --with-wx-config=wx-config \ + --disable-slp \ + --enable-flac \ + --disable-skins \ + --disable-basic-skins \ + --enable-skins2 \ + --enable-freetype \ + --enable-mkv \ + --enable-v4l \ + --enable-pvr \ + --disable-speex \ + --enable-caca \ + --enable-livedotcom \ + --enable-libmpeg2 \ + --enable-dts \ + --enable-fribidi \ + --enable-cdio \ + --enable-mod \ + --enable-theora \ + --enable-modplug \ + --enable-dvdnav \ + --enable-gnutls \ + --enable-ffmpeg \ + --enable-ncurses \ + --enable-smb \ + --disable-gnomevfs \ + $(NULL) + +# These ones are currently shipped with VLC +vlc_confflags += --enable-faad --with-faad-tree=extras/faad2 +vlc_confflags += --enable-x264 --with-x264-tree=extras/x264 + +# Glide and svgalib are only for x86 +ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386) +vlc_confflags += --enable-glide +vlc_confflags += --enable-svgalib +endif -CONFIG_FLAGS = --enable-release --prefix=/usr --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 -CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg -CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad -ifeq ($(DEB_BUILD_ARCH),i386) -CONFIG_FLAGS += --enable-glide -else -ARCH_EXCLUDE = -Nvlc-plugin-glide +# We need this hack for i386 and amd64 +ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386) +CC = $(shell pwd)/debian/gcc-snapshot +export CC +endif +ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),amd64) +CC = $(shell pwd)/debian/gcc-snapshot +export CC endif -# Remove --without-dvdcss here in non-totalitarian countries -CONFIG_FLAGS += --enable-dvd --without-dvdcss +# Remove --without-dvdcss in non-totalitarian countries +vlc_confflags += --enable-dvd --without-dvdcss +# A few shortcuts VIDDIR = usr/share/vlc PIXDIR = usr/share/pixmaps -GNOMEDIR = usr/share/gnome/apps/Multimedia +APPDIR = usr/share/applications + # # Build rules # +configure: configure-stamp +configure-stamp: + dh_testdir + + # Touch stuff + touch configure.ac + touch aclocal.m4 + touch configure + touch config.h.in + touch `find . -name Makefile.in` + + # Check that we have an x264 tree in here (can be a symlink) + test -d extras/x264 + cd extras/x264 \ + && ./configure $(confflags) --extra-cflags='$$(ECFLAGS)' \ + --extra-asflags='$$(EASFLAGS)' \ + && $(MAKE) + + # Check that we have an faad2 tree in here (can be a symlink) + test -d extras/faad2 + cd extras/faad2 \ + && touch `find . -name configure.in` \ + && touch `find . -name aclocal.m4` \ + && touch `find . -name configure` \ + && touch `find . -name config.h.in` \ + && touch `find . -name Makefile.in` \ + && ./configure $(confflags) --disable-shared \ + && cd libfaad \ + && $(MAKE) + + # Configure VLC + ./configure --mandir=$${prefix}/share/man \ + --infodir=$${prefix}/share/info $(confflags) $(vlc_confflags) + + touch configure-stamp + build: build-stamp -build-stamp: +build-stamp: patch configure-stamp dh_testdir - # Check that we have an ffmpeg tree in here (can be a symlink) - test -d extras/ffmpeg - (cd extras/ffmpeg ; ./configure ; make) + # Build only VLC, with the non-PIC libs + $(MAKE) include/vlc_symbols.h + cd modules && AM_MAKEFLAGS='plugin=no pic=no' $(MAKE) + $(MAKE) vlc - # Check that we have an faad tree in here (can be a symlink) - test -d extras/faad - (cd extras/faad ; ./configure ; make) + # Hackety hackety hack + cd extras/x264 && $(MAKE) clean && $(MAKE) ECFLAGS=-fPIC EASFLAGS=-D__PIC__ - ./configure --mandir=$${prefix}/share/man \ - --infodir=$${prefix}/share/info $(CONFIG_FLAGS) + # HACKETY HACKETY HACK + cd extras/faad2/libfaad && $(MAKE) clean && $(MAKE) AM_CFLAGS=-fPIC - $(MAKE) + # Build all the rest, with the PIC libs + AM_MAKEFLAGS='builtin=no' $(MAKE) + + # Minor test, to see which plugins were built and whether they load + # properly. +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + ./vlc --reset-plugins-cache -l -I rc vlc:quit +endif touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot - rm -f build-stamp - - # Check that we have an ffmpeg tree in here (can be a symlink) - test -d ffmpeg - -(cd ffmpeg ; make distclean) - # Check that we have an faad tree in here (can be a symlink) - test -d faad - -(cd faad ; make distclean) + rm -f configure-stamp build-stamp + + # Check that we have an x264 tree in here (can be a symlink) + test -d extras/x264 + -cd extras/x264 && $(MAKE) distclean + # Check that we have an faad2 tree in here (can be a symlink) + test -d extras/faad2 + -cd extras/faad2 && $(MAKE) distclean + + # Clean zsh completion stuff + rm -f extras/zsh + + # Removed ugly cruft + rm -f src/misc/modules_builtin.h + rm -f mozilla/vlcintf.xpt mozilla/vlcintf.h + + # Remove spurious autotools stuff + rm -f config.log confdefs.h + -$(MAKE) distclean dh_clean @@ -76,112 +202,125 @@ install: build # 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) + mv debian/vlc/$(VIDDIR)/vlc32x32.xpm debian/vlc/$(VIDDIR)/vlc.xpm + cp debian/gvlc.desktop debian/gvlc/$(APPDIR) + cp debian/gnome-vlc.desktop debian/gnome-vlc/$(APPDIR) + + #cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc + #strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat + + rm -Rf debian/vlc/$(VIDDIR)/skins + ln -s vlc.1.gz debian/vlc/usr/share/man/man1/svlc.1.gz # Package: libvlc0-dev mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/ mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/ mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/ - mv debian/vlc/usr/include/vlc/* debian/libvlc0-dev/usr/include/vlc/ + mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/ + rm -Rf debian/vlc/usr/include ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev # Package: gnome-vlc - mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/ + #mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/ ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc - mv debian/vlc/usr/lib/vlc/gui/gnome.so debian/gnome-vlc/usr/lib/vlc/gui/ - ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz - 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 + #mv debian/vlc/usr/lib/vlc/misc/libgnome_main_plugin.so \ + # debian/gnome-vlc/usr/lib/vlc/gui/ + #mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \ + # debian/gnome-vlc/usr/lib/vlc/gui/ + #ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz + #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/ + #mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/ ln -s vlc debian/gvlc/usr/share/doc/gvlc - mv debian/vlc/usr/lib/vlc/gui/gtk.so debian/gvlc/usr/lib/vlc/gui/ - mv debian/vlc/usr/lib/vlc/gui/familiar.so debian/gvlc/usr/lib/vlc/gui/ - 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 + #mv debian/vlc/usr/lib/vlc/misc/libgtk_main_plugin.so \ + # debian/gvlc/usr/lib/vlc/gui/ + #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/ + #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 # Package: vlc-plugin-esd ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd - mv debian/vlc/usr/lib/vlc/audio_output/esd.so \ - debian/vlc-plugin-esd/usr/lib/vlc/audio_output/ + mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \ + 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 - mv debian/vlc/usr/lib/vlc/audio_output/alsa.so \ - debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/ + mv debian/vlc/usr/lib/vlc/audio_output/libalsa_plugin.so \ + 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 - mv debian/vlc/usr/lib/vlc/audio_output/sdl.so \ - debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/ - mv debian/vlc/usr/lib/vlc/video_output/sdl.so \ - debian/vlc-plugin-sdl/usr/lib/vlc/video_output/ + mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \ + debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/ + mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \ + 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 - mv debian/vlc/usr/lib/vlc/video_output/ggi.so \ - debian/vlc-plugin-ggi/usr/lib/vlc/video_output/ + mv debian/vlc/usr/lib/vlc/video_output/libggi_plugin.so \ + debian/vlc-plugin-ggi/usr/lib/vlc/video_output/ # Package: vlc-plugin-glide -ifeq ($(DEB_BUILD_ARCH),i386) +ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386) ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide - mv debian/vlc/usr/lib/vlc/video_output/glide.so \ - debian/vlc-plugin-glide/usr/lib/vlc/video_output/ + mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \ + debian/vlc-plugin-glide/usr/lib/vlc/video_output/ endif # Package: qvlc - mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/ + #mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/ ln -s vlc debian/qvlc/usr/share/doc/qvlc - mv debian/vlc/usr/lib/vlc/gui/qt.so debian/qvlc/usr/lib/vlc/gui/ - ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz - 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 - mv debian/vlc/usr/lib/vlc/codec/mad.so \ - debian/vlc-plugin-mad/usr/lib/vlc/codec/ + #mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \ + # debian/qvlc/usr/lib/vlc/gui/ + #ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz + #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-arts ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts - mv debian/vlc/usr/lib/vlc/audio_output/arts.so \ - 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 - mv debian/vlc/usr/lib/vlc/control/lirc.so \ - 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 - mv debian/vlc/usr/lib/vlc/video_output/aa.so \ - debian/vlc-plugin-aa/usr/lib/vlc/video_output/ - - # Package: vlc-plugin-xosd - ln -s vlc debian/vlc-plugin-xosd/usr/share/doc/vlc-plugin-xosd - mv debian/vlc/usr/lib/vlc/visualization/xosd.so \ - debian/vlc-plugin-xosd/usr/lib/vlc/visualization/ + mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \ + debian/vlc-plugin-arts/usr/lib/vlc/audio_output/ # 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 + # links for firefox + mkdir -p debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/plugins/ + ln -s ../../mozilla/plugins/libvlcplugin.so debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/plugins/ + mkdir -p debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/components/ + ln -s ../../mozilla/components/vlcintf.xpt debian/mozilla-plugin-vlc/usr/lib/mozilla-firefox/components/ # Package: kvlc - mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/ + #mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/ ln -s vlc debian/kvlc/usr/share/doc/kvlc - mv debian/vlc/usr/lib/vlc/gui/kde.so debian/kvlc/usr/lib/vlc/gui/ - 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 + #mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \ + # debian/kvlc/usr/lib/vlc/gui/ + #mv debian/vlc/$(VIDDIR)/ui.rc debian/kvlc/$(VIDDIR) + #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 # Package: vlc-plugin-svgalib +ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386) ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib - mv debian/vlc/usr/lib/vlc/video_output/svgalib.so \ - debian/vlc-plugin-svgalib/usr/lib/vlc/video_output + mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \ + debian/vlc-plugin-svgalib/usr/lib/vlc/video_output +endif + + # Package: wxvlc + mv debian/vlc/usr/bin/wxvlc debian/wxvlc/usr/bin/ + ln -s vlc debian/wxvlc/usr/share/doc/wxvlc + cp debian/vlc/$(VIDDIR)/vlc.xpm debian/wxvlc/$(VIDDIR)/wxvlc.xpm + cp debian/vlc.desktop debian/wxvlc/$(APPDIR) + mv debian/vlc/usr/lib/vlc/gui/libwxwidgets_plugin.so \ + debian/wxvlc/usr/lib/vlc/gui/ + ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz # Clean up rm -f debian/vlc/$(VIDDIR)/*.png @@ -199,22 +338,25 @@ binary-arch: build install dh_testroot # dh_installdebconf dh_installdocs -p vlc + dh_buildinfo -p vlc # dh_installexamples - dh_installmenu + dh_installmenu -s + dh_installmime -s dh_installman doc/vlc.1 -p vlc dh_installman doc/vlc-config.1 -p libvlc0-dev dh_installchangelogs ChangeLog -p vlc - dh_link - dh_strip - dh_compress - dh_fixperms - dh_makeshlibs - dh_installdeb + for x in doc/ChangeLog-* ; do cp "doc/ChangeLog-$${x#*-}" "debian/vlc/usr/share/doc/vlc/changelog$${x#*-}" ; done + dh_link -s + dh_strip -s + dh_compress -s + dh_fixperms -s + dh_makeshlibs -s + dh_installdeb -s # dh_perl - dh_shlibdeps $(ARCH_EXCLUDE) - dh_gencontrol $(ARCH_EXCLUDE) - dh_md5sums $(ARCH_EXCLUDE) - dh_builddeb $(ARCH_EXCLUDE) + dh_shlibdeps -s + dh_gencontrol -s + dh_md5sums -s + dh_builddeb -s binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install