forked from rosa/hakurei
internal/rosa: key metadata by string
For upcoming azalea integration. The API is quite ugly right now to ease migration. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -2,12 +2,12 @@ package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibmnl() (pkg.Artifact, string) {
|
||||
func (t Toolchain) newLibmnl(s *S) (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.0.5"
|
||||
checksum = "DN-vbbvQDpxXJm0TJ6xlluILvfrB86avrCTX50XyE9SEFSAZ_o8nuKc5Gu0Am7-u"
|
||||
)
|
||||
return t.NewPackage("libmnl", version, newTar(
|
||||
return s.NewPackage(t, "libmnl", version, newTar(
|
||||
"https://www.netfilter.org/projects/libmnl/files/"+
|
||||
"libmnl-"+version+".tar.bz2",
|
||||
checksum,
|
||||
@@ -39,7 +39,7 @@ index d223ac2..a7878d0 100644
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Libmnl] = Metadata{
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibmnl,
|
||||
|
||||
Name: "libmnl",
|
||||
@@ -47,15 +47,15 @@ func init() {
|
||||
Website: "https://www.netfilter.org/projects/libmnl/",
|
||||
|
||||
ID: 1663,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibnftnl() (pkg.Artifact, string) {
|
||||
func (t Toolchain) newLibnftnl(s *S) (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.3.1"
|
||||
checksum = "91ou66K-I17iX6DB6hiQkhhC_v4DFW5iDGzwjVRNbJNEmKqowLZBlh3FY-ZDO0r9"
|
||||
)
|
||||
return t.NewPackage("libnftnl", version, t.newTagRemote(
|
||||
return s.NewPackage(t, "libnftnl", version, s.newTagRemote(t,
|
||||
"https://git.netfilter.org/libnftnl",
|
||||
"libnftnl-"+version, checksum,
|
||||
), &PackageAttr{
|
||||
@@ -77,7 +77,7 @@ func (t Toolchain) newLibnftnl() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Libnftnl] = Metadata{
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibnftnl,
|
||||
|
||||
Name: "libnftnl",
|
||||
@@ -89,15 +89,15 @@ func init() {
|
||||
},
|
||||
|
||||
ID: 1681,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (t Toolchain) newIPTables() (pkg.Artifact, string) {
|
||||
func (t Toolchain) newIPTables(s *S) (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.8.13"
|
||||
checksum = "TUA-cFIAsiMvtRR-XzQvXzoIhJUOc9J2gQDJCbBRjmgmVfGfPTCf58wL7e-cUKVQ"
|
||||
)
|
||||
return t.NewPackage("iptables", version, t.newTagRemote(
|
||||
return s.NewPackage(t, "iptables", version, s.newTagRemote(t,
|
||||
"https://git.netfilter.org/iptables",
|
||||
"v"+version, checksum,
|
||||
), &PackageAttr{
|
||||
@@ -131,7 +131,7 @@ chmod +w /etc/ && ln -s ../usr/src/iptables/etc/ethertypes /etc/
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[IPTables] = Metadata{
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newIPTables,
|
||||
|
||||
Name: "iptables",
|
||||
@@ -143,5 +143,5 @@ func init() {
|
||||
},
|
||||
|
||||
ID: 1394,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user