1
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
3
# Copyright (C) 2016 Canonical Ltd
5
# This program is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License version 3 as
7
# published by the Free Software Foundation.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import snapcraft.plugins.cmake
21
class LibertinePlugin(snapcraft.plugins.cmake.CMakePlugin):
22
def __init__(self, name, options, project):
23
super().__init__(name, options, project)
25
deps = utils.BuildDependsParser()
27
with open('debian/control') as control:
28
for line in control.readlines():
31
self.build_packages.extend(deps.deps)
32
self.options.configflags.extend(['-DCMAKE_INSTALL_PREFIX=/usr'])
36
return super().schema()
38
def enable_cross_compilation(self):
39
return super().enable_cross_compilation()
44
# Fix all shebangs to use the in-snap python.
45
utils.fix_shebangs(self.installdir + '/usr/bin')