summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-12 10:41:41 +0200
committerwm4 <wm4@nowhere>2012-10-13 10:37:32 +0200
commitb7b804926a5154be424a1cba983ace626abb2198 (patch)
tree339fd60b53ef380cd5b14d7ffadb440d1d60ef21
downloadmpv-build-b7b804926a5154be424a1cba983ace626abb2198.tar.bz2
mpv-build-b7b804926a5154be424a1cba983ace626abb2198.tar.xz
Initial commit
This is based on mplayer-git [1], except that it doesn't need Python. Some features, such as specifying custom options, are not available, but these should be considered out of the scope of the basic build wrapper. [1] http://repo.or.cz/w/mplayer-build.git
-rw-r--r--.gitmodules9
-rw-r--r--Makefile33
-rw-r--r--README25
m---------ffmpeg0
m---------libass0
m---------mpv0
-rwxr-xr-xscripts/ffmpeg-config9
-rwxr-xr-xscripts/libass-config8
-rwxr-xr-xscripts/mpv-config8
-rwxr-xr-xupdate3
10 files changed, 95 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..5b3679a
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,9 @@
+[submodule "mpv"]
+ path = mpv
+ url = https://github.com/mpv-player/mpv.git
+[submodule "ffmpeg"]
+ path = ffmpeg
+ url = git://git.videolan.org/ffmpeg.git
+[submodule "libass"]
+ path = libass
+ url = git://repo.or.cz/libass.git
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7b132b1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+mpv: ffmpeg libass
+ scripts/mpv-config
+ $(MAKE) -C mpv
+
+mpv-config:
+ scripts/mpv-config
+
+ffmpeg-config:
+ scripts/ffmpeg-config
+
+ffmpeg: ffmpeg-config
+ $(MAKE) -C ffmpeg_build install
+
+libass-config:
+ scripts/libass-config
+
+libass: libass-config
+ $(MAKE) -C libass install
+
+noconfig:
+ $(MAKE) -C ffmpeg_build install
+ $(MAKE) -C libass install
+ $(MAKE) -C mpv
+
+install:
+ $(MAKE) -C mpv install
+
+clean:
+ -rm -rf ffmpeg_build build_libs
+ -$(MAKE) -C libass distclean
+ -$(MAKE) -C mpv distclean
+
+.PHONY: mpv-config mpv ffmpeg-config ffmpeg libass-config libass noconfig install clean
diff --git a/README b/README
new file mode 100644
index 0000000..f2b497c
--- /dev/null
+++ b/README
@@ -0,0 +1,25 @@
+This is a collection of scripts to make downloading and building mpv, ffmpeg
+and libass easier. ffmpeg and libass get special treatment, because they are
+essential, and distribution packages are often too old.
+
+Update the ffmpeg, libass and mpv sources with the following command:
+
+ ./update
+
+This is also needed before doing the first build after the initial checkout.
+
+Build mpv and ffmpeg/libass with:
+
+ make mpv
+
+Install mpv with:
+
+ make install
+
+mpv doesn't need to be installed. The binary in ./mpv/ can be used as-is. Note
+that libass and ffmpeg will be statically linked with mpv when using the
+provided scripts.
+
+
+TODO:
+- List dependencies.
diff --git a/ffmpeg b/ffmpeg
new file mode 160000
+Subproject 5a75924dfd432c0ada79a9f489889dc92d53b48
diff --git a/libass b/libass
new file mode 160000
+Subproject e6c71d8a94172a11a17518387ae5f3db540490c
diff --git a/mpv b/mpv
new file mode 160000
+Subproject db984edf24c16121b04f798e06d0ea509c7b3d8
diff --git a/scripts/ffmpeg-config b/scripts/ffmpeg-config
new file mode 100755
index 0000000..38fc1e9
--- /dev/null
+++ b/scripts/ffmpeg-config
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+OPTIONS="--enable-gpl --enable-nonfree"
+
+BUILD="$(pwd)"
+mkdir -p "$BUILD"/ffmpeg_build
+cd "$BUILD"/ffmpeg_build
+"$BUILD"/ffmpeg/configure --prefix="$BUILD"/build_libs --enable-static --disable-shared $OPTIONS
diff --git a/scripts/libass-config b/scripts/libass-config
new file mode 100755
index 0000000..5644d6a
--- /dev/null
+++ b/scripts/libass-config
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+OPTIONS=""
+
+BUILD="$(pwd)"
+cd "$BUILD"/libass
+./autogen.sh --prefix="$BUILD/build_libs" --enable-static --disable-shared $OPTIONS
diff --git a/scripts/mpv-config b/scripts/mpv-config
new file mode 100755
index 0000000..1b3a976
--- /dev/null
+++ b/scripts/mpv-config
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+OPTIONS=""
+
+BUILD="$(pwd)"
+cd "$BUILD"/mpv
+PKG_CONFIG_PATH="$BUILD"/build_libs/lib/pkgconfig ./configure --extra-cflags=-I"$BUILD"/build_libs/include --extra-ldflags=-L"$BUILD"/build_libs/lib $OPTIONS
diff --git a/update b/update
new file mode 100755
index 0000000..9e2bbb5
--- /dev/null
+++ b/update
@@ -0,0 +1,3 @@
+#!/bin/sh
+git pull
+git submodule update --init