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
|
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
import os
import shutil
class Recipe(recipe.Recipe):
"""
Ships the vapigen.m4 macro file from the vala tarball
"""
name = 'vala-m4'
_name = 'vala'
version = '0.35.2'
stype = SourceType.TARBALL
maj_ver = '.'.join(version.split('.')[0:2])
url = 'https://download.gnome.org/sources/{0}/{2}/{0}-{1}.tar.xz'
url = url.format(_name, version, maj_ver)
tarball_checksum = 'af5efb30e8a303dd1c211e2a30ba0b41e64d47c9d6c5271f1d8ffb4fb63a017f'
srcdir = "{0}-{1}".format(_name, version)
licenses = [License.LGPLv2_1Plus]
btype = BuildType.CUSTOM
files_devel = ['share/aclocal/vala.m4', 'share/vala/Makefile.vapigen']
def prepare(self):
self.build_dir = os.path.join(os.path.dirname(self.build_dir),
'{0}-{1}'.format(self._name,
self.version))
def install(self):
shutil.copy(os.path.join(self.build_dir, 'vapigen', 'vapigen.m4'),
os.path.join(self.config.prefix, 'share',
'aclocal', 'vapigen.m4'))
shutil.copy(os.path.join(self.build_dir, 'vala.m4'),
os.path.join(self.config.prefix, 'share',
'aclocal', 'vala.m4'))
destdir = os.path.join(self.config.prefix, 'share', 'vala')
if not os.path.exists(destdir):
os.makedirs(destdir)
shutil.copy(os.path.join(self.build_dir, 'vapigen', 'Makefile.vapigen'),
os.path.join(destdir, 'Makefile.vapigen'))
|