# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python import shutil class Recipe(recipe.Recipe): name = 'glib-networking-static' version = '2.34.2' licenses = [License.LGPLv2Plus] configure_options = "--without-ca-certificates --enable-static-modules --enable-static" deps = ['glib', 'gnutls', 'glib-networking'] files_devel = ['lib/gio/modules/static/libgiognutls.a', 'lib/gio/modules/static/libgiognutls.la'] def prepare(self): self.remotes['origin'] = self.remotes['origin'].replace('-static', '') self.repo_dir = self.repo_dir.replace('-static', '') self.tmp_destdir = os.path.join(self.build_dir, 'static-build') def install(self): plugins_dir = os.path.join(self.config.prefix, os.path.dirname(self.files_devel[0])) if not os.path.exists(plugins_dir): os.makedirs(plugins_dir) shutil.copy(os.path.join(self.build_dir, 'tls', 'gnutls', '.libs', 'libgiognutls.a'), plugins_dir) shutil.copy(os.path.join(self.build_dir, 'tls', 'gnutls', '.libs', 'libgiognutls.la'), plugins_dir)