summaryrefslogtreecommitdiff
path: root/recipes/libsrtp.recipe
blob: a9d1ba5a1c7adba96b1c52dfe38a573f5dc66e36 (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
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python

from cerbero.tools.libtool import LibtoolLibrary
import shutil

class Recipe(recipe.Recipe):
    name = 'libsrtp'
    version = '2.5.0'
    stype = SourceType.TARBALL
    url = 'https://github.com/cisco/%(name)s/archive/v%(version)s.tar.gz'
    tarball_checksum = '8a43ef8e9ae2b665292591af62aa1a4ae41e468b6d98d8258f91478735da4e09'
    licenses = [{License.BSD_like: ['LICENSE']}]

    btype = BuildType.MESON
    meson_options = {
        # XXX: should we use openssl?
        'crypto-library': 'none',
        'doc': 'disabled',
        'tests': 'enabled',
        'pcap-tests': 'disabled'
    }

    patches = []

    files_libs = ['libsrtp2']
    files_devel = ['include/srtp2', '%(libdir)s/pkgconfig/libsrtp2.pc']

    async def install(self):
        await super(Recipe, self).install()
        libdir = os.path.join(self.config.prefix,
                              'lib' + self.config.lib_suffix)
        shutil.copy(os.path.join(self.build_dir, 'srtp.def'), libdir)

    def post_install(self):
        libtool_la = LibtoolLibrary('srtp2', None, None, None, self.config.libdir,
                                    self.config.target_platform)
        libtool_la.save()
        super().post_install()