vinix-ports / ports / netbase / PKGBUILD.vile
26 lines · 26 sloc · 1.27 KB · c33d8afc2906b8dd9a8b905224eccd49a44f7ad5
Raw
1defpkgbuild(netbase,
2 #:pkgname, "netbase",
3 #:pkgver, "6.4",
4 #:pkgrel, 1,
5 #:pkgdesc, "IP protocol and network service name registries",
6 #:url, "https://salsa.debian.org/md/netbase",
7 #:arch, [#:any],
8 #:license, "GPL-2.0-only",
9 #:backup, ["etc/protocols", "etc/services"],
10 #:source, ["protocols::https://salsa.debian.org/md/netbase/-/raw/v6.4/etc/protocols",
11 "services::https://salsa.debian.org/md/netbase/-/raw/v6.4/etc/services",
12 "copyright::https://salsa.debian.org/md/netbase/-/raw/v6.4/debian/copyright"],
13 #:sha256sums, ["4959498abbadaa1e50894a266f8d0d94500101cfe5b5f09dcad82e9d5bdfab46",
14 "f6183055fd949f9c53d49ee620f85d0150123ea691d25ed1bba0c641b4ee2f48",
15 "795b66147ea5ad692991caa7008ece551fb0fa88b9c53656223bd1518dc58ab2"],
16 #:check, fn() {
17 run("grep", "-Eq", "^tcp[[:space:]]+6[[:space:]]", "protocols")
18 run("grep", "-Eq", "^ssh[[:space:]]+22/tcp", "services")
19 run("grep", "-Eq", "^domain[[:space:]]+53/udp", "services")
20 },
21 #:package, fn() {
22 for-each(fn(file) {
23 run("install", "-Dm644", file, string-append(pkgdir(), "/etc/", file))
24 }, list("services", "protocols"))
25 run("install", "-Dm644", "copyright", string-append(pkgdir(), "/usr/share/licenses/netbase/copyright"))
26 })
27