summaryrefslogtreecommitdiff
path: root/packages/media-video/motion/motion.exlib
blob: ad2f0725482cac44b1657a12a4f89c006be9c6f4 (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
67
68
69
70
71
72
73
# Distributed under the terms of the GNU General Public License v2
# Copyright 2018 Gluzskiy Alexandr <sss@sss.chaoslab.ru>

require github [ user=Motion-Project 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
    sqlite
    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 )
        sqlite? ( dev-db/sqlite:3 )
        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'
    'sqlite sqlite3'
    'v4l v4l2'
    webp
)

DEFAULT_SRC_CONFIGURE_PARAMS=(
    --hates=disable-silent-rules
    --hates=disable-dependency-tracking
    --hates=enable-fast-install
    --without-mmal
    --without-optimizecpu
    --without-bktr
)

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

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