summaryrefslogtreecommitdiff
path: root/packages/media-video/motion/motion.exlib
blob: 02685baae76c968d9386a2c493b5aee6fdecb7bc (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Distributed under the terms of the GNU General Public License v2
# Copyright 2018 Gluzskiy Alexandr <sss@sss.chaoslab.ru>

require github [ user=Mr-Dave tag=release-${PV} ] autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 ] ]

export_exlib_phases src_prepare src_install

SUMMARY="A software motion detector"
HOMEPAGE="https://motion-project.github.io/"

LICENCES="GPL-2"
SLOT="0"

MYOPTIONS="
    ffmpeg
    mysql
    postgres
    v4l
    webp
    ffmpeg? ( ( providers: ffmpeg libav ) [[ number-selected = exactly-one ]] )
    ( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
"

DEPENDENCIES="
    build+run:
        user/motion
        mysql? ( virtual/mysql )
        postgres? ( dev-db/postgresql )
        v4l? (
            media-libs/v4l-utils
            sys-kernel/linux-headers
        )
        webp? ( media-libs/libwebp:= )
        ffmpeg? (
            providers:ffmpeg? ( media/ffmpeg )
            providers:libav? ( media/libav )
        )
        providers:ijg-jpeg? ( media-libs/jpeg:= )
        providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
"

DEFAULT_SRC_CONFIGURE_OPTION_WITHS=(
    ffmpeg
    mysql
    'postgres pgsql'
    'v4l v4l2'
    webp
)

DEFAULT_SRC_CONFIGURE_PARAMS=(
    --hates=disable-silent-rules
    --hates=disable-dependency-tracking
    --hates=enable-fast-install
)

motion_src_prepare() {
    edo sed -e "s/pkg-config/$(exhost --target)-pkg-config/g" -i configure.ac
    autotools_src_prepare
}

motion_src_install() {
    default
    insinto /etc/motion
    doins motion-dist.conf
}