summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicola Murino2023-04-10 11:34:02 +0200
committerNicola Murino2023-04-10 11:34:02 +0200
commite299704a7f5c3eedaf2a7943aa1bb7c11266ac83 (patch)
treee1df77e6f70744277d3cde2740d8547cb2b493c0
parentd56eda2425a3107adae8ba41c51663dbb1823524 (diff)
downloadaur-e299704a7f5c3eedaf2a7943aa1bb7c11266ac83.tar.gz
add static build
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD52
2 files changed, 29 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 84e233316c06..cfb759969586 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mingw-w64-ffmpeg-minimal
pkgdesc = Complete solution to record, convert and stream audio and video (mingw-w64)
pkgver = 6.0
- pkgrel = 1
+ pkgrel = 2
epoch = 1
url = http://ffmpeg.org/
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index beb19b36483a..0e979fd5ed52 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: drakkan <nicola.murino at gmail dot com>
pkgname=mingw-w64-ffmpeg-minimal
pkgver=6.0
-pkgrel=1
+pkgrel=2
epoch=1
pkgdesc="Complete solution to record, convert and stream audio and video (mingw-w64)"
arch=('any')
@@ -20,6 +20,7 @@ _tag=3949db4d261748a9f34358a388ee255ad1a7f0c0
source=("git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag}")
sha256sums=('SKIP')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+_builds="static shared"
pkgver() {
cd ffmpeg
@@ -28,37 +29,40 @@ pkgver() {
build() {
for _arch in ${_architectures}; do
- mkdir -p "${srcdir}"/build-${_arch} && cd "${srcdir}"/build-${_arch}
+ for _build in ${_builds}; do
+ mkdir -p "${srcdir}"/build-${_arch}-${_build} && cd "${srcdir}"/build-${_arch}-${_build}
- "${srcdir}"/ffmpeg/configure \
- --prefix="/usr/${_arch}" \
- --enable-cross-compile \
- --cross-prefix="${_arch}-" \
- --target-os=mingw32 \
- --arch=${_arch%%-*} \
- --disable-debug \
- --disable-stripping \
- --enable-zlib \
- --enable-shared \
- --disable-doc \
- --disable-encoder=flac \
- --x86asmexe=yasm
-
- make
+ "${srcdir}"/ffmpeg/configure \
+ --prefix="/usr/${_arch}" \
+ --enable-cross-compile \
+ --cross-prefix="${_arch}-" \
+ --target-os=mingw32 \
+ --arch=${_arch%%-*} \
+ --disable-debug \
+ --disable-stripping \
+ --enable-zlib \
+ --disable-doc \
+ --disable-encoder=flac \
+ --x86asmexe=yasm \
+ --enable-${_build}
+ make
+ done
done
}
package() {
for _arch in ${_architectures}; do
- cd "${srcdir}"/build-${_arch}
- make DESTDIR="$pkgdir" install
+ for _build in ${_builds}; do
+ cd "${srcdir}"/build-${_arch}-${_build}
+ make DESTDIR="$pkgdir" install
- ${_arch}-strip -s "${pkgdir}"/usr/${_arch}/bin/*.exe
- ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
- ${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
+ ${_arch}-strip -s "${pkgdir}"/usr/${_arch}/bin/*.exe
+ ${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
+ [ ${_build} == shared ] && ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
- mv "${pkgdir}"/usr/${_arch}/bin/*.lib "${pkgdir}"/usr/${_arch}/lib/
- rm -rf "${pkgdir}"/usr/${_arch}/share
+ [ ${_build} == shared ] && mv "${pkgdir}"/usr/${_arch}/bin/*.lib "${pkgdir}"/usr/${_arch}/lib/
+ rm -rf "${pkgdir}"/usr/${_arch}/share
+ done
done
}