summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2018-05-20 22:05:44 -0700
committerMartin Herkt <652892+lachs0r@users.noreply.github.com>2018-05-21 08:40:40 +0200
commit902c441e6967b96fd883244603e9f09791965d4f (patch)
tree19d671529ee77a81efdacb89e10556c6d2acf897
parent8c9abd8c7914b71562e2d81faad76015526a9f8e (diff)
downloadmpv-build-902c441e6967b96fd883244603e9f09791965d4f.tar.bz2
mpv-build-902c441e6967b96fd883244603e9f09791965d4f.tar.xz
Revert "Remove Debian scripts"
This reverts commit 8c9abd8c7914b71562e2d81faad76015526a9f8e. I'm restoring them, bugs will be my own responsibility.
-rw-r--r--.gitignore7
-rw-r--r--README.rst65
-rw-r--r--debian/README.debian95
-rw-r--r--debian/changelog.TEMPLATE5
-rw-r--r--debian/compat1
-rw-r--r--debian/control86
-rw-r--r--debian/copyright10
-rw-r--r--debian/dirs2
-rw-r--r--debian/mime20
-rwxr-xr-xdebian/rules121
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/options2
-rwxr-xr-xscripts/debian-update-versions23
-rwxr-xr-xupdate7
14 files changed, 445 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index b6032e6..fb6d918 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,11 @@
/mpv
/build_libs
/ffmpeg_build
+*.deb
+/debian/changelog
+/debian/files
+/debian/mpv.debhelper.log
+/debian/mpv.postinst.debhelper
+/debian/mpv.postrm.debhelper
+/debian/mpv.substvars
/config/
diff --git a/README.rst b/README.rst
index f00c3e2..d1aa4e7 100644
--- a/README.rst
+++ b/README.rst
@@ -12,6 +12,8 @@ OSX.
Generic Instructions
====================
+(For Debian/Ubuntu see `Instructions for Debian and Ubuntu`_)
+
Make sure git is installed. Also check that the dependencies listed in
the next section are installed.
@@ -86,6 +88,67 @@ Do this in the mpv-build top-level directory (the same that contains
the build scripts and this readme file). It must be done prior running
./build or ./rebuild.
+Instructions for Debian and Ubuntu
+==================================
+
+**Warning**: DO NOT USE THESE INSTRUCTIONS UNLESS YOU KNOW WHAT YOU ARE DOING.
+ These scripts are fragile (probably rather Debian's fault than ours). They
+ will often fail with weird errors that are hard to solve. They only exist
+ for users who want to hurt themselves. Use the generic instructions, unless
+ you really insist on having a Debian package as result.
+
+Install some fundamental packages with the command:
+
+ apt-get install git devscripts equivs
+
+Now, to checkout the build repo, run:
+
+ git clone https://github.com/mpv-player/mpv-build.git
+
+ cd mpv-build
+
+To make sure that everything is up to date:
+
+ ./update
+
+Install the dependencies with:
+
+ rm -f mpv-build-deps_*_*.deb
+
+ mk-build-deps -s sudo -i
+
+This will generate and install a dummy package that depends on the
+required packages. The rm -f command makes sure there are no previous
+versions of the build-deps package lying around that may otherwise
+confuse mk-build-deps.
+
+If you don't want to use sudo, you can also try:
+
+ mk-build-deps
+
+ su -c 'dpkg -i mpv-build-deps_*_*.deb || apt-get install -f'
+
+You can now build a full mpv Debian package with the following command:
+
+ dpkg-buildpackage -uc -us -b -j4
+
+"4" is the number of jobs running in parallel - change it to match
+your number of processors. The file mpv_<version>_<architecture>.deb
+will be created in the parent directory. Install it with
+
+ sudo dpkg -i ../mpv_<version>_<architecture>.deb
+
+where you must replace <version> with the version of mpv you just
+built (as indicated in debian/changelog) and <architecture> with your
+architecture. As with the mpv-build-deps package, you should ensure
+you are installing the correct package and not one you previously
+compiled.
+
+To recompile a new package based on the latest sources, repeat the
+above steps starting with and including ``./update``.
+
+For further information regarding the Debian package, see
+debian/README.Debian.
Local changes to the git repositories
=====================================
@@ -148,6 +211,8 @@ You can enable building libmpv by enabling the configure option:
Note that this will make the mpv-build scripts also enable PIC for all used
libraries. For this reason, be sure to run ``./clean`` before rebuilding.
+The Debian packaging scripts do not support libmpv yet.
+
Contact
=======
diff --git a/debian/README.debian b/debian/README.debian
new file mode 100644
index 0000000..00ea1fb
--- /dev/null
+++ b/debian/README.debian
@@ -0,0 +1,95 @@
+mpv for Debian
+==============
+
+This is the Debian package produced by the mpv-build scripts. It
+contains a statically linked libass and ffmpeg (vs. libav contained in
+Debian) from upstream. It is not an official part of the Debian
+distribution. Instructions for building this package can be found in
+the README.rst file in the mpv-build directory, or equivalently at [1].
+
+[1] https://github.com/mpv-player/mpv.
+
+Differences with distribution packages
+============================================
+
+Debian testing/unstable already has a separate official package for mpv, which
+closely tracks the current upstream releases. Debian stable, the latest Ubuntu
+and Ubuntu LTS all also have official mpv packages, however these range from
+outdated to extremely outdated. This pacakge can be compiled on all of these
+platforms and offers either the most recent mpv release or git master.
+
+This pacakge statically links against the latest release or git master of ffmpeg.
+Older Debian and Ubuntu use the libav fork of ffmpeg, and therefore that's what their
+official mpv packages link against. However, ffmpeg is preferred for building
+mpv as it enables more features. This situation is however changing as the
+Debian testing version is now built against ffmpeg.
+
+Since the release cycle of libass is quite slow, even the "release" version of
+this package links against the libass git master. Debian unstable uses the
+latest libass release, while Debian stable, the latest Ubuntu and Ubuntu LTS all
+use buggy and outdated libass releases.
+
+In order to maintain this interoperability between distributions, this
+package must necessarily disable some features by default which are not
+universally supported. These include Wayland support and libfdk for high
+quality AAC encoding. These can hoewver be trivially enabled provided
+sufficiently recent libraries as described below.
+
+On the other hand, this package enables native smb support (to play smb://
+URLs), video4linux2 (for web cams and video capture) and caca (for silly ascii
+art output) which is not present in the official Debian package.
+
+Due to a persistent packaging bug, the official Ubuntu Trusty mpv is missing lua
+support (therefore no on-screen controller).
+
+There are several other features that are disabled in both this
+package as well as the official Debian package because they are not
+widely needed or used. These include openal output, portaudio output,
+rsound/libroar/sndio input/output, sdl1/sdl2, joystick, videoio.h/libpt. If
+you find any of these useful, please open an issue at [3] explaining
+why you think the feature in question should be enabled, and we can
+try and include it in this package.
+
+[3] https://github.com/mpv-player/mpv-build/issues
+
+Building from git master
+========================
+In addition to the default of building the latest released
+version of mpv, this package can also trivially be built from the
+latest git master of mpv (as well as ffmpeg and libass). As described
+in README.rst [1], this is achieved by calling
+
+ ./update --master
+
+prior to building this Debian package.
+
+Additional ffmpeg features
+==========================
+
+All relevant and free ffmpeg features/codecs should be enabled. If
+something is missing, it is a bug, and should be reported at [3].
+Features for which distribution packages are not universally available
+are the exception. To enable the non-free Fraunhofer FDK AAC codec:
+
+ apt-get install libfdk-aac-dev
+ echo --enable-nonfree --enable-libfdk-aac >> ffmpeg_options
+
+This must be done prior to building the package.
+
+Wayland support
+===============
+
+According to wayland.freedesktop.org, "Wayland is intended as a
+simpler replacement for X, easier to develop and maintain". It is very
+much a work in progress, so adequate functionality requires recent
+version of the relevant libraries. At present, this not possible on
+Debian Wheezy. To maintain interoperability, this package therefore
+does not build with Wayland support by default.
+
+If you want Wayland support, you will need to manually install the
+necessary packages before building:
+
+ apt-get install libwayland-dev libxkbcommon-dev libegl1-mesa-dev
+
+The mpv build will then automatically detect and link to them if they are new
+enough.
diff --git a/debian/changelog.TEMPLATE b/debian/changelog.TEMPLATE
new file mode 100644
index 0000000..9640e56
--- /dev/null
+++ b/debian/changelog.TEMPLATE
@@ -0,0 +1,5 @@
+mpv (1:1.0noversion) UNRELEASED; urgency=medium
+
+ * local build
+
+ -- Local User <localuser@localhost> Sat, 08 Feb 2014 03:47:26 -0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b96df7d
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,86 @@
+Source: mpv
+Section: misc
+Priority: optional
+Maintainer: Kevin Mitchell <kevmitch@gmail.com>
+Standards-Version: 3.9.3
+Build-Depends:
+ autoconf,
+ automake,
+ c-compiler | gcc,
+ debhelper (>= 7),
+ ladspa-sdk,
+ libasound2-dev [linux-any],
+ libbluray-dev,
+ libbs2b-dev,
+ libcaca-dev,
+ libcdio-paranoia-dev,
+ libdvdnav-dev,
+ libdvdread-dev,
+ libegl1-mesa-dev,
+ libfontconfig-dev,
+ libfreetype6-dev,
+ libfribidi-dev,
+ libgl1-mesa-dev,
+ libgbm-dev,
+ libgme-dev,
+ libgnutls-dev | libgnutls28-dev,
+ libgsm1-dev,
+ libharfbuzz-dev,
+ libjack-jackd2-dev | libjack-dev,
+ libjpeg-dev,
+ liblcms2-dev,
+ liblircclient-dev,
+ liblua5.2-dev | liblua5.1-0-dev,
+ libmodplug-dev,
+ libmp3lame-dev,
+ libopenal-dev,
+ libopus-dev,
+ libopencore-amrnb-dev,
+ libopencore-amrwb-dev,
+ libpulse-dev,
+ librtmp-dev,
+ librubberband-dev,
+ libsmbclient-dev,
+ libssh-dev,
+ libsoxr-dev,
+ libspeex-dev,
+ libtheora-dev,
+ libtool,
+ libtwolame-dev,
+ libuchardet-dev,
+ libv4l-dev [!hurd-any],
+ libva-dev [!hurd-any],
+ libvdpau-dev,
+ libvorbis-dev,
+ libvo-amrwbenc-dev,
+ libvpx-dev,
+ libwavpack-dev,
+ libx264-dev,
+ libx11-dev,
+ libxext-dev,
+ libxinerama-dev,
+ libxrandr-dev,
+ libxss-dev,
+ libxv-dev,
+ libxvidcore-dev,
+ pkg-config,
+ python,
+ python-docutils,
+ x11proto-core-dev,
+ yasm,
+ zlib1g-dev
+
+Package: mpv
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends:
+ libgl1-mesa-dri,
+ i965-va-driver | libva-intel-vaapi-driver | va-driver,
+ mesa-vdpau-drivers | nvidia-vdpau-driver | nvidia-driver-binary | nvidia-current | vdpau-driver
+Suggests: libaacs0
+Description: mplayer/mplayer2 based video player
+ MPV is a versatile CLI movie player, based on mplayer and mplayer2.
+ .
+ This package is not part of Debian. It was created by mpv-build scripts with
+ statically linked ffmpeg (not libav) and libass from upstream.
+Homepage:https://github.com/mpv-player/mpv-build
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..80691e8
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,10 @@
+Current maintainership mostly handled by Kevin Mitchell <kevmitch@gmail.com>
+Thu, 27 Mar 2014 16:39:11 -0700
+
+This package was debianized by Wessel Dankers <wsl@fruit.je> on
+Sun, 06 Jan 2013 13:44:11 +0100.
+
+Original source can be found at: https://github.com/mpv-player
+
+Copyrighted by various authors. Licensed under the terms of GNU GPL.
+See /usr/share/common-licenses/GPL for details.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..98d1583
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/man/man1
diff --git a/debian/mime b/debian/mime
new file mode 100644
index 0000000..e405227
--- /dev/null
+++ b/debian/mime
@@ -0,0 +1,20 @@
+application/x-ogg; mpv %s; description="Ogg Stream"
+application/ogg; mpv %s; description="Ogg Stream"
+audio/mpeg; mpv %s; description="MPEG Audio"
+audio/x-mpegurl; mpv %s; description="Icecast Playlist"
+audio/x-ms-wax; mpv %s; description="Windows Media Audio"
+audio/x-ms-wma; mpv %s; description="Windows Media Audio"
+audio/x-pls; mpv %s; description="MP3 ShoutCast/IceCast Playlist"
+audio/x-scpls; mpv %s; description="Shoutcast Playlist"
+audio/x-wav; mpv %s; description="WAV Audio"
+video/mpeg; mpv %s; description="MPEG Video";
+video/quicktime; mpv %s; description="Apple QuickTime Video";
+video/x-mpeg; mpv %s; description="MPEG Video";
+video/x-mpeg2; mpv %s; description="MPEG-2 Video";
+video/x-msvideo; mpv %s; description="MS Video (AVI)";
+video/x-ms-afs; mpv %s; description="Microsoft ASF Video";
+video/x-ms-asf; mpv %s; description="Microsoft ASF Video";
+video/x-ms-wma; mpv %s; description="Windows Media Audio";
+video/x-ms-wmv; mpv %s; description="Windows Media Video";
+video/x-ms-wmx; mpv %s; description="Windows Media Video";
+video/x-ms-wvx; mpv %s; description="Windows Media Video";
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ea53758
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,121 @@
+#! /usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS:=hardening=+all
+
+# To enable parallel building:
+# You can either set DEB_BUILD_OPTIONS=paralell=<num-procs> in your build environment
+# or provide the -j<numprocs> option to debuild or dpkg-buildpackage, which
+# ammounts to the same thing.
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+# use MFLAGS, rather than MAKEFLAGS as the latter is used by make internally
+ MFLAGS += -j$(NUMJOBS)
+ WAFFLAGS += -j$(NUMJOBS)
+endif
+
+# make .PHONY all the targets that have name collisions with the scripts
+# see http://www.debian.org/doc/manuals/maint-guide/dreq.en.html#rules
+.PHONY: clean build install
+# Apparently, the above isn't enough because of the "%" target. Make the problematic targets explicit
+clean:
+ exec dh $@
+build:
+ exec dh $@
+install:
+ exec dh $@
+# Handle all other targets in the usual way.
+# The --parallel flag to dh doesn't seem to have the intended effect
+# so leave it out.
+%:
+ exec dh $@
+
+libass_config:
+ scripts/libass-config
+
+libass_build: libass_config
+ scripts/libass-build $(MFLAGS)
+
+# depend on libass_build in case the user specified --enable-libass in ffmpeg_options
+ffmpeg_config: libass_build
+ scripts/ffmpeg-config \
+ --enable-gnutls \
+ --enable-libgme \
+ --enable-libgsm \
+ --enable-libmodplug \
+ --enable-libmp3lame \
+ --enable-libopus \
+ --enable-libpulse \
+ --enable-libsoxr \
+ --enable-libspeex \
+ --enable-libssh \
+ --enable-libtheora \
+ --enable-libtwolame \
+ --enable-libvorbis \
+ --enable-libvpx \
+ --enable-libwavpack \
+ --enable-ladspa \
+ --enable-libbs2b \
+ --enable-gpl --enable-libxvid --enable-libx264 \
+ --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc
+
+ffmpeg_build: ffmpeg_config
+ scripts/ffmpeg-build $(MFLAGS)
+
+# put the config in the right place and drop the local/ since it's package managed now
+override_dh_auto_configure: ffmpeg_build libass_build
+ scripts/mpv-config --prefix=/usr --confdir=/etc/mpv \
+ --enable-openal \
+ --enable-dvdread \
+ --enable-dvdnav \
+ --enable-cdda \
+ --enable-libsmbclient \
+ --enable-zsh-comp
+
+override_dh_auto_build:
+ scripts/mpv-build $(WAFLAGS)
+
+
+DOCSOURCE=mpv/DOCS
+TOOLSSOURCE=mpv/TOOLS
+DOCDEST=debian/mpv/usr/share/doc/mpv
+TOOLSDEST=$(DOCDEST)/TOOLS
+# call waf to install to the debian packageing dir
+override_dh_auto_install:
+ cd mpv && python waf -v install --destdir=../debian/mpv
+
+ find "$(DOCSOURCE)" -mindepth 1 -type d \
+ -not -regex '.*man.*' \
+ -not -regex '.*client_api_examples.*' \
+ -printf "%P\0" | \
+ xargs -0i /usr/bin/install -d "$(DOCDEST)/{}"
+
+ find "$(DOCSOURCE)" -mindepth 1 -type f \
+ -not -regex '.*man.*' \
+ -not -regex '.*client_api_examples.*' \
+ -not -name 'tech-overview.txt' \
+ -not -name 'waf-buildsystem.rst' \
+ -not -name 'crosscompile-mingw.md' \
+ -not -name 'coding-style.md' \
+ -printf "%P\0" | \
+ xargs -0i /usr/bin/install -m644 "$(DOCSOURCE)/{}" "$(DOCDEST)/{}"
+
+ find "$(TOOLSSOURCE)" -mindepth 1 -type d \
+ -not -regex '.*osxbundle.*' \
+ -printf "%P\0" | \
+ xargs -0i /usr/bin/install -d "$(TOOLSDEST)/{}"
+
+ find "$(TOOLSSOURCE)" -mindepth 1 -type f \
+ -not -regex '.*osxbundle.*' \
+ -not -name 'gen-x11-icon.sh' \
+ -not -name 'file2string.pl' \
+ -not -name 'uncrustify.cfg' \
+ -printf "%P\0" | \
+ xargs -0i /usr/bin/install -m644 "$(TOOLSSOURCE)/{}" "$(TOOLSDEST)/{}"
+
+# for manually installed dependencies
+override_dh_shlibdeps:
+ dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
+
+# call all the cleans
+override_dh_auto_clean:
+ ./clean
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..659f59c
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1,2 @@
+compression = xz
+compression-level = best
diff --git a/scripts/debian-update-versions b/scripts/debian-update-versions
new file mode 100755
index 0000000..af59632
--- /dev/null
+++ b/scripts/debian-update-versions
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+get_version()
+{
+ (
+ cd $1 > /dev/null
+ VERSION=1:$(git name-rev --name-only --tags HEAD | sed -e 's/^[^0-9]*//' -e 's/\^0$//')
+ if [ "$VERSION" = "1:" ]; then
+ TIMESTAMP=$(git log -1 --date=short --format=%cd | sed 's/-/./g')
+ COMMIT=$(git rev-parse --short HEAD)
+ VERSION="2:${TIMESTAMP}.${COMMIT}"
+ fi
+ echo ${VERSION}
+ )
+}
+
+do_subst() {
+ sed -e "0,/^mpv (.*)/s/(.*)/($1)/" \
+ -e "s/^ \* local build.*/ \* local build with ffmpeg $2, libass $3/" \
+ -e"s/\(^ -- Local User <localuser@localhost>\).*/\1 $(date -R)/" debian/changelog.TEMPLATE > debian/changelog
+}
+
+do_subst $(get_version mpv) $(get_version ffmpeg) $(get_version libass)
diff --git a/update b/update
index 27d23af..2e43198 100755
--- a/update
+++ b/update
@@ -104,6 +104,11 @@ do_bootstrap()
scripts/mpv-bootstrap
}
+do_update_debian_versions()
+{
+ scripts/debian-update-versions $1
+}
+
if [ x"$1" != x"--skip-selfupdate" ]; then
(
set -ex
@@ -136,4 +141,6 @@ esac
checkout_all
+do_update_debian_versions
+
do_bootstrap