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


class Recipe(recipe.Recipe):
    name = 'bzip2'
    version = '1.0.6'
    license = 'BSD-like'

    files_libs = ['libbz2']
    files_devel = ['include/bzlib.h']


    def prepare (self):
        self._remove_steps([BuildSteps.CONFIGURE])
        extension = ''
        if self.config.target_platform == Platform.DARWIN:
            shared_makefile = 'Makefile-libbz2_dylib'
        elif self.config.target_platform == Platform.WINDOWS:
            shared_makefile = 'Makefile-libbz2_dll'
            extension = '.exe'
        else:
            shared_makefile = 'Makefile-libbz2_so'
        self.make = 'make -f %s; make' % shared_makefile
        self.make_install = 'make -f %s install PREFIX=%s; make install EXT=%s PREFIX=%s' % \
                (shared_makefile, self.config.prefix, extension, self.config.prefix)