]> git.ipfire.org Git - people/ms/pakfire.git/blame - src/libpakfire/include/pakfire/packager.h
packager: Remove files after they have been packaged
[people/ms/pakfire.git] / src / libpakfire / include / pakfire / packager.h
CommitLineData
6aeb48e6
MT
1/*#############################################################################
2# #
3# Pakfire - The IPFire package management system #
4# Copyright (C) 2021 Pakfire development team #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19#############################################################################*/
20
21#ifndef PAKFIRE_PACKAGER_H
22#define PAKFIRE_PACKAGER_H
23
22b8e37b
MT
24#ifdef PAKFIRE_PRIVATE
25
045fa504 26#include <pakfire/digest.h>
80a108bf 27#include <pakfire/file.h>
814b7fee 28#include <pakfire/filelist.h>
31480bee 29#include <pakfire/package.h>
106d2edd 30#include <pakfire/scriptlet.h>
6aeb48e6 31
045fa504
MT
32#define PAKFIRE_PACKAGER_DIGESTS (PAKFIRE_DIGEST_SHA3_512|PAKFIRE_DIGEST_BLAKE2B512)
33
6aeb48e6
MT
34struct pakfire_packager;
35
5d7a93ec
MT
36int pakfire_packager_create(struct pakfire_packager** packager,
37 struct pakfire* pakfire, struct pakfire_package* pkg);
6aeb48e6
MT
38
39struct pakfire_packager* pakfire_packager_ref(struct pakfire_packager* packager);
40struct pakfire_packager* pakfire_packager_unref(struct pakfire_packager* packager);
41
26687bfe 42const char* pakfire_packager_filename(struct pakfire_packager* packager);
96d2c7bc
MT
43
44int pakfire_packager_finish(struct pakfire_packager* packager, FILE* f);
48c6f2e7 45int pakfire_packager_finish_to_directory(struct pakfire_packager* packager,
45448dbd 46 const char* target, char** result);
436677a3 47
80a108bf
MT
48int pakfire_packager_add_file(
49 struct pakfire_packager* packager, struct pakfire_file* file);
814b7fee 50int pakfire_packager_add_files(struct pakfire_packager* packager,
5d5da764 51 struct pakfire_filelist* filelist);
809606fe
MT
52int pakfire_packager_add(struct pakfire_packager* packager,
53 const char* sourcepath, const char* path);
da08f989 54
106d2edd
MT
55int pakfire_packager_add_scriptlet(struct pakfire_packager* packager,
56 struct pakfire_scriptlet* scriptlet);
57
2a838122
MT
58int pakfire_packager_cleanup(struct pakfire_packager* packager);
59
22b8e37b
MT
60#endif
61
6aeb48e6 62#endif /* PAKFIRE_PACKAGER_H */