summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 91f64ba3ace415fda9d0d6f7847a2091410fe25c (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: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Yunhui Fu <yhfudev@gmail.com>
# Contributor: Tri Le <trile7@gmail.com>

pkgname=mjpg-streamer-git
epoch=1
pkgver=r355.85f89a8
pkgrel=1
pkgdesc="Stream mjpeg frames from a webcam via http"
arch=(x86_64 i686 arm armv6h armv7h aarch64)
url="https://github.com/jacksonliam/mjpg-streamer"
license=(GPL2)
depends=(libjpeg-turbo imagemagick)
provides=(mjpg-streamer)
conflicts=(mjpg-streamer)
makedepends=(git cmake protobuf-c zeromq sdl libgphoto2 v4l-utils python-numpy)
source=("git+https://github.com/jacksonliam/mjpg-streamer.git")
sha256sums=(SKIP)

export LDFLAGS="-Wl,-O1,--sort-common,--no-as-needed,-z,relro,-z,now"

export CFLAGS="-fcommon"

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

prepare() {
  cd "${pkgname/-git/}/mjpg-streamer-experimental"
  install -d _build
}

build() {
  cd "${pkgname/-git/}/mjpg-streamer-experimental/_build"
  cmake .. -Wno-dev \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DPLUGIN_INPUT_OPENCV=OFF \
    -DENABLE_HTTP_MANAGEMENT=ON \
    -DWXP_COMPAT=ON \
    -DCMAKE_BUILD_TYPE=release
}

package() {
  cd "${pkgname/-git/}/mjpg-streamer-experimental"
  make DESTDIR="${pkgdir}" install
}