summaryrefslogtreecommitdiff
path: root/builder/builder-module.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2015-11-16 16:23:23 +0100
committerAlexander Larsson <alexl@redhat.com>2015-11-25 15:26:32 +0100
commitb2790349d6c5d257c3691df37eb2c46ea9fb821c (patch)
treefdca2e8ecb9a51f3cdeed695568bae8fd85672a7 /builder/builder-module.h
parent7e1a645f990c29296878ed7e3253f0151dab1c1c (diff)
downloadxdg-app-b2790349d6c5d257c3691df37eb2c46ea9fb821c.tar.gz
Add xdg-app-builder
This is a tool that makes it easy to build applications and their dependecies by automating the configure && make && make install steps.
Diffstat (limited to 'builder/builder-module.h')
-rw-r--r--builder/builder-module.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/builder/builder-module.h b/builder/builder-module.h
new file mode 100644
index 0000000..b890e65
--- /dev/null
+++ b/builder/builder-module.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright © 2015 Red Hat, Inc
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Alexander Larsson <alexl@redhat.com>
+ */
+
+#ifndef __BUILDER_MODULE_H__
+#define __BUILDER_MODULE_H__
+
+#include <json-glib/json-glib.h>
+
+#include "builder-source.h"
+#include "builder-options.h"
+
+G_BEGIN_DECLS
+
+typedef struct BuilderModule BuilderModule;
+
+#define BUILDER_TYPE_MODULE (builder_module_get_type())
+#define BUILDER_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUILDER_TYPE_MODULE, BuilderModule))
+#define BUILDER_IS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUILDER_TYPE_MODULE))
+
+/* Bump this if format changes in incompatible ways to force rebuild */
+#define BUILDER_MODULE_CHECKSUM_VERSION "1"
+
+GType builder_module_get_type (void);
+
+const char * builder_module_get_name (BuilderModule *self);
+GList * builder_module_get_sources (BuilderModule *self);
+GPtrArray * builder_module_get_changes (BuilderModule *self);
+void builder_module_set_changes (BuilderModule *self,
+ GPtrArray *changes);
+
+gboolean builder_module_download_sources (BuilderModule *self,
+ BuilderContext *context,
+ GError **error);
+gboolean builder_module_extract_sources (BuilderModule *self,
+ GFile *dest,
+ BuilderContext *context,
+ GError **error);
+gboolean builder_module_build (BuilderModule *self,
+ BuilderContext *context,
+ GError **error);
+
+void builder_module_checksum (BuilderModule *self,
+ BuilderCache *cache,
+ BuilderContext *context);
+void builder_module_checksum_for_cleanup (BuilderModule *self,
+ BuilderCache *cache,
+ BuilderContext *context);
+void builder_module_cleanup_collect (BuilderModule *self,
+ char **global_patterns,
+ GHashTable *to_remove_ht);
+
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(BuilderModule, g_object_unref)
+
+G_END_DECLS
+
+#endif /* __BUILDER_MODULE_H__ */