summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b5b7e44119134d66d121a302d779db78de376f23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Jose Riha <jose1711 gmail com>
# Contributor: archdaemon
# Contributor: sekret

pkgname=untrunc-git
pkgver=r58.ec8e417
pkgrel=3
pkgdesc="restore a damaged (truncated) mp4, m4v, mov, 3gp video"
arch=('x86_64' 'i686')
url="https://github.com/ponchio/untrunc"
license=('GPL2')
depends=('libvdpau' 'zlib' 'bzip2')
makedepends=('yasm' 'git' 'libx11')
source=("${pkgname}"::'git+https://github.com/ponchio/untrunc.git'
        'framealloc.patch'
	'http://libav.org/releases/libav-12.2.tar.xz')
md5sums=('SKIP'
         '7f6cf1762cd93f4ce84cb218ab856ea3'
         '69b5d9de6e4b2fbf6956653f61c7ffe1')
noextract=('libav-12.2.tar.xz')

prepare() {
  cd $srcdir/$pkgname
  tar xvJf ../libav-12.2.tar.xz
}

build() {
  cd $srcdir/$pkgname
  git submodule init
  git submodule update
  # patch -p1 -i $srcdir/framealloc.patch
  # wget http://libav.org/releases/libav-12.2.tar.xz
  cd libav-12.2
  ./configure
  make
  cd ..
  g++ -o untrunc file.cpp main.cpp track.cpp atom.cpp mp4.cpp -I./libav-12.2 -L./libav-12.2/libavformat -lavformat -L./libav-12.2/libavcodec -lavcodec -L./libav-12.2/libavresample -lavresample -L./libav-12.2/libavutil -lavutil -lpthread -lz -lbz2 -lX11 -lvdpau
} 

pkgver() {
  cd "$srcdir/${pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  install -Dm755 $srcdir/$pkgname/untrunc $pkgdir/usr/bin/untrunc
}