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

from cerbero.tools.libtool import LibtoolLibrary
from cerbero.utils import shell
import shutil

class Recipe(recipe.Recipe):
    name = 'libsrtp'
    version = '1.5.4'
    stype = SourceType.TARBALL
    url = 'https://github.com/cisco/%(name)s/archive/v%(version)s.tar.gz'
    licenses = [License.BSD_like]
    patches = ['libsrtp/0001-Don-t-create-a-symlink-if-there-is-no-SHAREDLIBVERSI.patch']

    files_libs = ['libsrtp']
    files_devel = ['include/srtp', 'lib/pkgconfig/libsrtp.pc']

    def prepare(self):
        # Don't accidentially build with pcap support
        self.append_env['ac_cv_lib_pcap_pcap_create'] = 'no'
        self.make += ' all shared_library'

    def install(self):
        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('srtp', self.config.libdir,
                                    self.config.target_platform)
        libtool_la.save()