summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b7f03bf225c3b969b3f8a4f5c59a3138c8c18319 (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
48
49
50
51
52
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=nut-multimedia-git
pkgver=r695.12f6a7a
pkgrel=1
pkgdesc="Free multimedia container format. (Git Version)"
arch=('x86_64')
url='https://ffmpeg.org/nut.html'
license=('GPL')
depends=('glibc')
makedepends=(
  'git'
  'doxygen'
)
provides=(
  'nut-multimedia'
  'libnut.so'
)
conflicts=(
  'nut-multimedia'
)

source=('git+https://git.ffmpeg.org/nut.git')
sha256sums=('SKIP')

pkgver() {
  cd nut
  #echo "$(git describe --long --tags | tr - .)"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  echo "\nLDFLAGS = ${LDFLAGS}" >> nut/src/trunk/config.mak
  sed 's|$(CFLAGS)|& $(LDFLAGS)|g' -i nut/src/trunk/Makefile

  echo "OUTPUT_DIRECTORY = ${pkgdir}/usr/share/doc/nut-multimedia" >>  nut/src/trunk/libnut/Doxyfile
}

build() {
  CFLAGS+=" -fPIC" make -C nut/src/trunk PREFIX=/usr libnut/libnut.so
  make -C nut/src/trunk PREFIX=/usr nututils
}

package() {
  make -C nut/src/trunk PREFIX=/usr DESTDIR="${pkgdir}" install-libnut-shared
  make -C nut/src/trunk PREFIX=/usr DESTDIR="${pkgdir}" install-nututils

  install -Dm644 nut/docs/nut.txt "${pkgdir}/usr/share/doc/nut-multimedia/nut.txt"
  install -Dm644 nut/docs/nut4cc.txt "${pkgdir}/usr/share/doc/nut-multimedia/nut4cc.txt"
  install -Dm644 nut/docs/nutissues.txt "${pkgdir}/usr/share/doc/nut-multimedia/nutissues.txt"
  (cd nut/src/trunk/libnut; doxygen)
}