forked from google/rpmpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
111 lines (98 loc) · 2.51 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# A build file for rpmpack.
# For running basic build/run/test you can also use the regular go tools,
# this is currently added to assist in external testing.
load("@gazelle//:def.bzl", "gazelle")
load("@rules_go//go:def.bzl", "go_library", "go_test")
# gazelle:prefix github.com/google/rpmpack
# gazelle:go_naming_convention import_alias
gazelle(name = "gazelle")
# gazelle:go_test file
go_library(
name = "rpmpack",
srcs = [
"changelog.go",
"dir.go",
"file_types.go",
"header.go",
"rpm.go",
"rpm_read.go",
"sense.go",
"tags.go",
"tar.go",
],
importpath = "github.com/google/rpmpack",
visibility = ["//visibility:public"],
deps = [
"@com_github_cavaliergopher_cpio//:cpio",
"@com_github_klauspost_compress//zstd",
"@com_github_klauspost_pgzip//:pgzip",
"@com_github_ulikunitz_xz//:xz",
"@com_github_ulikunitz_xz//lzma",
],
)
go_test(
name = "dir_test",
srcs = ["dir_test.go"],
embed = [":rpmpack"],
deps = ["@com_github_google_go_cmp//cmp"],
)
go_test(
name = "file_type_test",
srcs = ["file_types_test.go"],
embed = [":rpmpack"],
deps = [
"@com_github_google_go_cmp//cmp",
"@com_github_klauspost_compress//zstd",
"@com_github_klauspost_pgzip//:pgzip",
"@com_github_ulikunitz_xz//:xz",
"@com_github_ulikunitz_xz//lzma",
],
)
go_test(
name = "header_test",
srcs = ["header_test.go"],
embed = [":rpmpack"],
deps = ["@com_github_google_go_cmp//cmp"],
)
go_test(
name = "rpm_test",
srcs = ["rpm_test.go"],
embed = [":rpmpack"],
deps = [
"@com_github_google_go_cmp//cmp",
"@com_github_klauspost_compress//zstd",
"@com_github_klauspost_pgzip//:pgzip",
"@com_github_ulikunitz_xz//:xz",
"@com_github_ulikunitz_xz//lzma",
],
)
go_test(
name = "sense_test",
srcs = ["sense_test.go"],
embed = [":rpmpack"],
)
go_test(
name = "tar_test",
srcs = ["tar_test.go"],
embed = [":rpmpack"],
deps = ["@com_github_google_go_cmp//cmp"],
)
alias(
name = "go_default_library",
actual = ":rpmpack",
visibility = ["//visibility:public"],
)
go_test(
name = "file_types_test",
srcs = ["file_types_test.go"],
embed = [":rpmpack"],
)
go_test(
name = "rpm_read_test",
srcs = ["rpm_read_test.go"],
data = [
"@some-centos9-rpm//file",
],
embed = [":rpmpack"],
deps = ["@rules_go//go/runfiles:go_default_library"],
)