summaryrefslogtreecommitdiff
path: root/recipes/cdparanoia.recipe
blob: 749b95999f09cbe617fbf4d0a9818c39903bf1d4 (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
# -*- 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.3'
    # binaries are GPL
    licenses = [License.LGPLv2_1Plus]
    allow_parallel_build = False

    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)