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
class Recipe(recipe.Recipe):
name = 'gtk-doc-lite'
version = '1.18'
# TODO: check license - source files are GPLv2+ and COPYING is GPLv3
licenses = [License.GPLv2Plus]
btype = BuildType.CUSTOM
files_devel = ['bin/gtkdocize', 'share/aclocal/gtk-doc.m4',
'share/gtk-doc/data/gtk-doc.make',
'share/gtk-doc/data/gtk-doc.notmpl.make']
def prepare(self):
self.remotes['origin'] = '%s/%s.git' % \
(self.config.git_root, 'gtk-doc')
self.repo_dir = os.path.join(self.config.local_sources, 'gtk-doc')
def install(self):
from cerbero.utils import shell
import shutil
aclocal_dir = os.path.join(self.config.prefix, 'share', 'aclocal')
if not os.path.exists(aclocal_dir):
os.makedirs(aclocal_dir)
data_dir = os.path.join(self.config.prefix, 'share', 'gtk-doc', 'data')
if not os.path.exists(data_dir):
os.makedirs(data_dir)
shutil.copy(os.path.join(self.build_dir, 'gtk-doc.m4'),
os.path.join(aclocal_dir, 'gtk-doc.m4'))
shutil.copy(os.path.join(self.build_dir, 'gtk-doc.make'),
os.path.join(data_dir, 'gtk-doc.make'))
shutil.copy(os.path.join(self.build_dir, 'gtk-doc.notmpl.make'),
os.path.join(data_dir, 'gtk-doc.notmpl.make'))
gtkdocize = os.path.join(self.config.prefix, 'bin', 'gtkdocize')
shutil.copy(os.path.join(self.build_dir, 'gtkdocize.in'), gtkdocize)
replacements = {'@PACKAGE@': 'gtk-doc', '@VERSION@': self.version,
'@prefix@': self.config.prefix,
'@datarootdir@': '${prefix}/share',
'@datadir@': '${datarootdir}'}
shell.replace(gtkdocize, replacements)
|