ALR

Форк
1
/
build.go 
70 строк · 2.2 Кб
1
/*
2
 * ALR - Any Linux Repository
3
 * Copyright (C) 2024 Евгений Храмов
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
18

19
package types
20

21
import "plemya-x.ru/alr/pkg/manager"
22

23
type BuildOpts struct {
24
	Script      string
25
	Manager     manager.Manager
26
	Clean       bool
27
	Interactive bool
28
}
29

30
// BuildVars represents the script variables required
31
// to build a package
32
type BuildVars struct {
33
	Name          string   `sh:"name,required"`
34
	Version       string   `sh:"version,required"`
35
	Release       int      `sh:"release,required"`
36
	Epoch         uint     `sh:"epoch"`
37
	Description   string   `sh:"desc"`
38
	Homepage      string   `sh:"homepage"`
39
	Maintainer    string   `sh:"maintainer"`
40
	Architectures []string `sh:"architectures"`
41
	Licenses      []string `sh:"license"`
42
	Provides      []string `sh:"provides"`
43
	Conflicts     []string `sh:"conflicts"`
44
	Depends       []string `sh:"deps"`
45
	BuildDepends  []string `sh:"build_deps"`
46
	OptDepends    []string `sh:"opt_deps"`
47
	Replaces      []string `sh:"replaces"`
48
	Sources       []string `sh:"sources"`
49
	Checksums     []string `sh:"checksums"`
50
	Backup        []string `sh:"backup"`
51
	Scripts       Scripts  `sh:"scripts"`
52
}
53

54
type Scripts struct {
55
	PreInstall  string `sh:"preinstall"`
56
	PostInstall string `sh:"postinstall"`
57
	PreRemove   string `sh:"preremove"`
58
	PostRemove  string `sh:"postremove"`
59
	PreUpgrade  string `sh:"preupgrade"`
60
	PostUpgrade string `sh:"postupgrade"`
61
	PreTrans    string `sh:"pretrans"`
62
	PostTrans   string `sh:"posttrans"`
63
}
64

65
type Directories struct {
66
	BaseDir   string
67
	SrcDir    string
68
	PkgDir    string
69
	ScriptDir string
70
}
71

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.