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

import os

from fnmatch import fnmatch

from cerbero.build.filesprovider import FilesProvider


class Recipe(recipe.Recipe):
    name = 'cdparanoia'
    version = '10.2'
    stype = SourceType.TARBALL
    url = 'http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-10.2.src.tgz'
    tarball_dirname = 'cdparanoia-III-%(version)s'
    autoreconf = True
    # binaries are GPL
    licenses = [License.LGPLv2_1Plus]
    allow_parallel_build = False
    config_sh = 'CFLAGS="$CFLAGS -fPIC" ./configure'
    patches = ['cdparanoia/0001-configure.in-Always-use-AC_PROG_CC.patch']

    files_libs = ['libcdda_paranoia', 'libcdda_interface']
    files_devel = ['include/cdda_interface.h', 'include/cdda_paranoia.h', 'include/utils.h']

    # No rule check
    make_check = None

    def post_install(self):
        if self.config.target_platform == Platform.LINUX:
            # Fix the libs permissions to 0755 to make the rpm packaging happy.
            # Setting for all linux distros as this may affect suse as well.
            # It will not affect debian packaging as it will run dh_fixperms
            # which does the right thing for debian.
            libs = self.files_list_by_category(FilesProvider.LIBS_CAT)
            for lib in libs:
                f = os.path.join(self.config.prefix, lib)
                if os.path.isfile(f) and not os.path.islink(f) and \
                   fnmatch(f, '*.so.*'):
                    os.chmod(f, 0755)