]> git.sesse.net Git - vlc/blobdiff - debian/rules
configure.ac: fix dvdnav linking on beos/os x/win32 (hacky)
[vlc] / debian / rules
index fb7fb381dc57b8d7f8002aed97dbebb9d6907ba0..f9648e6ba0a9eaf2586b3602926d370006cc07cf 100755 (executable)
@@ -1,13 +1,11 @@
 #!/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
 
-# This is the debhelper compatability version to use.
-export DH_COMPAT=3
-
 #
 # Compilation options
 #
@@ -16,8 +14,8 @@ CONFIG_FLAGS = --enable-release --prefix=/usr
 CONFIG_FLAGS += \
        --enable-gnome \
        --enable-gtk \
-       --enable-familiar \
-       --enable-fb \
+       --disable-familiar \
+       --disable-fb \
        --enable-ggi \
        --enable-sdl \
        --enable-esd \
@@ -35,25 +33,34 @@ CONFIG_FLAGS += \
        --enable-mp4 \
        --enable-dvb \
        --enable-dv \
-       --enable-satellite \
+       --disable-satellite \
        --enable-ogg \
        --enable-vorbis \
        --enable-wxwindows \
        --enable-slp \
        --enable-flac \
-       --enable-skins \
+       --disable-skins \
        --disable-basic-skins \
-       --disable-freetype \
-       --disable-mkv \
+       --enable-skins2 \
+       --enable-freetype \
+       --enable-mkv \
        --enable-v4l \
+       --enable-pvr \
+       --enable-speex \
+       --enable-caca \
+       --enable-livedotcom \
+       --enable-libmpeg2 \
+       --enable-dts \
+       --enable-fribidi \
+       --enable-cdio \
+       --enable-mod \
        $(NULL)
 
 # These ones are currently shipped with VLC
 CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg
-CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad
-CONFIG_FLAGS += --enable-libmpeg2 --with-libmpeg2-tree=extras/mpeg2dec
+CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad2
 
-# Glide is only for x86
+# Glide and svgalib are only for x86
 ifeq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
 CONFIG_FLAGS += --enable-glide
 CONFIG_FLAGS += --enable-svgalib
@@ -76,25 +83,25 @@ configure-stamp:
        dh_testdir
 
        # Touch stuff
-       touch configure.ac \
-       && touch aclocal.m4 \
-       && touch configure \
-       && touch config.h.in \
-       && touch `find . -name Makefile.in`
+       touch configure.ac
+       touch aclocal.m4
+       touch configure
+       touch config.h.in
+       touch `find . -name Makefile.in`
 
        # Check that we have an ffmpeg tree in here (can be a symlink)
        test -d extras/ffmpeg
-       if test ! -d CVS; then \
+       if test ! '(' -d CVS -o -d .svn ')'; then \
          cd extras/ffmpeg \
-         && ./configure \
+         && CC=$(CC) ./configure --enable-pp --enable-gpl --enable-zlib --disable-debug \
          && cd libavcodec \
          && $(MAKE); \
        fi
 
-       # Check that we have an faad tree in here (can be a symlink)
-       test -d extras/faad
-       if test ! -d CVS; then \
-         cd extras/faad \
+       # Check that we have an faad2 tree in here (can be a symlink)
+       test -d extras/faad2
+       if test ! '(' -d CVS -o -d .svn ')'; then \
+         cd extras/faad2 \
          && touch `find . -name configure.in` \
          && touch `find . -name aclocal.m4` \
          && touch `find . -name configure` \
@@ -105,21 +112,6 @@ configure-stamp:
          && $(MAKE); \
        fi
 
-       # Check that we have an mpeg2dec tree in here (can be a symlink)
-       test -d extras/mpeg2dec
-       if test ! -d CVS; then \
-         cd extras/mpeg2dec \
-         && touch configure.in \
-         && touch aclocal.m4 \
-         && touch acinclude.m4 \
-         && touch configure \
-         && touch `find . -name config.h.in` \
-         && touch `find . -name Makefile.in` \
-         && ./configure --disable-shared \
-         && cd libmpeg2 \
-         && $(MAKE); \
-       fi
-
        # Configure VLC
        ./configure --mandir=$${prefix}/share/man \
          --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
@@ -131,11 +123,13 @@ build-stamp:
        dh_testdir
 
        # Build only VLC, with the non-PIC libs
+       $(MAKE) include/vlc_symbols.h
+       cd modules && AM_MAKEFLAGS='plugin=no pic=no' $(MAKE)
        $(MAKE) vlc
 
 ifneq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
        # Hackety hackety hack
-       if test ! -d CVS; then \
+       if test ! '(' -d CVS -o -d .svn ')'; then \
          cd extras/ffmpeg/libavcodec \
          && $(MAKE) clean \
          && rm -f Makefile.pic \
@@ -145,22 +139,15 @@ ifneq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
        fi
 
        # HACKETY HACKETY HACK
-       if test ! -d CVS; then \
-         cd extras/faad/libfaad \
+       if test ! '(' -d CVS -o -d .svn ')'; then \
+         cd extras/faad2/libfaad \
          && $(MAKE) clean \
          && $(MAKE) AM_CFLAGS=-fPIC; \
        fi
-
-       # HACK ME PLENTY MORE!!!
-       if test ! -d CVS; then \
-         cd extras/mpeg2dec/libmpeg2 \
-         && $(MAKE) clean \
-         && $(MAKE) LIBMPEG2_CFLAGS=-fPIC; \
-       fi
 endif
 
        # Build all the rest, with the PIC libs
-       $(MAKE)
+       AM_MAKEFLAGS='builtin=no' $(MAKE)
 
        touch build-stamp
 
@@ -171,13 +158,18 @@ clean:
 
        # Check that we have an ffmpeg tree in here (can be a symlink)
        test -d extras/ffmpeg
-       -if test ! -d CVS; then cd extras/ffmpeg && $(MAKE) distclean; fi
-       # Check that we have an faad tree in here (can be a symlink)
-       test -d extras/faad
-       -if test ! -d CVS; then cd extras/faad && $(MAKE) distclean; fi
-       # Check that we have an mpeg2dec tree in here (can be a symlink)
-       test -d extras/mpeg2dec
-       -if test ! -d CVS; then cd extras/mpeg2dec && $(MAKE) distclean; fi
+       -if test ! '(' -d CVS -o -d .svn ')'; then \
+         cd extras/ffmpeg && $(MAKE) distclean; \
+       fi
+       # Check that we have an faad2 tree in here (can be a symlink)
+       test -d extras/faad2
+       -if test ! '(' -d CVS -o -d .svn ')'; then \
+         cd extras/faad2 && $(MAKE) distclean; \
+       fi
+
+       # 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
@@ -200,8 +192,11 @@ install: build
        cp debian/gvlc.desktop debian/gvlc/$(GNOMEDIR)
        cp debian/gnome-vlc.desktop debian/gnome-vlc/$(GNOMEDIR)
 
-       cp doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc
-       strfile doc/fortunes.txt debian/vlc/usr/share/games/fortunes/vlc.dat
+       #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/usr/share/vlc/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/
@@ -233,8 +228,8 @@ install: build
          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/
+       #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
@@ -313,6 +308,11 @@ endif
        # 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/
@@ -337,10 +337,6 @@ endif
        ln -s vlc debian/wxvlc/usr/share/doc/wxvlc
        mv debian/vlc/usr/lib/vlc/gui/libwxwindows_plugin.so \
          debian/wxvlc/usr/lib/vlc/gui/
-       mv debian/vlc/usr/lib/vlc/gui/libskins_plugin.so \
-         debian/wxvlc/usr/lib/vlc/gui/
-       mv debian/vlc/usr/share/vlc/skins \
-         debian/wxvlc/usr/share/vlc/
        ln -s vlc.1.gz debian/wxvlc/usr/share/man/man1/wxvlc.1.gz
 
        # Clean up
@@ -364,10 +360,8 @@ binary-arch: build install
        dh_installmime -s
        dh_installman doc/vlc.1 -p vlc
        dh_installman doc/vlc-config.1 -p libvlc0-dev
-#      dh_installchangelogs ChangeLog -p vlc
-       cp ChangeLog debian/vlc/usr/share/doc/vlc/changelog
-       for x in doc/ChangeLog-* ; do cp "doc/ChangeLog-$${x\#*/\#*-}" "debian/vlc/usr/share/doc/vlc/changelog-$${x\#*/\#*-}" ; done
-       cp debian/changelog debian/vlc/usr/share/doc/vlc/changelog.Debian
+       dh_installchangelogs ChangeLog -p vlc
+       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