[arch-commits] Commit in iana-etc/trunk (PKGBUILD)

Gaëtan Bisson bisson at archlinux.org
Sun Nov 24 08:26:14 UTC 2019


    Date: Sunday, November 24, 2019 @ 08:26:14
  Author: bisson
Revision: 369692

upstream update, revamp PKGBUILD to better suit new arch upstream

Modified:
  iana-etc/trunk/PKGBUILD

----------+
 PKGBUILD |   21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-24 06:51:46 UTC (rev 369691)
+++ PKGBUILD	2019-11-24 08:26:14 UTC (rev 369692)
@@ -2,7 +2,9 @@
 # Maintainer: Gaetan Bisson <bisson at archlinux.org>
 
 pkgname=iana-etc
-pkgver=20191122
+pkgver=20191123
+_ports=service-names-port-numbers-20191123
+_protocols=protocol-numbers-20171013
 pkgrel=1
 pkgdesc='/etc/protocols and /etc/services provided by IANA'
 url='https://www.iana.org/protocols'
@@ -9,10 +11,10 @@
 arch=('any')
 license=('custom:none')
 backup=('etc/'{protocols,services})
-source=("https://sources.archlinux.org/other/packages/iana-etc/service-names-port-numbers-${pkgver}.xml"
-        "https://sources.archlinux.org/other/packages/iana-etc/protocol-numbers-${pkgver}.xml"
+source=("https://sources.archlinux.org/other/packages/iana-etc/${_ports}.xml"
+        "https://sources.archlinux.org/other/packages/iana-etc/${_protocols}.xml"
         'LICENSE')
-sha256sums=('2535270891e99febb368bf66c0e99550523db8123411652a33a77a94db9b6cd9'
+sha256sums=('372620ba6bdd72080dcabb315a3d092ea4e080064565b2e3d8549c015a538480'
             '4992fbc5453d0feb48492e6abda96bf9285ff4d2516f6924a0f92f773dc4cea2'
             'dd37e92942d5a4024f1c77df49d61ca77fc6284691814903a741785df61f78cb')
 
@@ -23,13 +25,10 @@
 package() {
 	cd "${srcdir}"
 
-	_ports="service-names-port-numbers-${pkgver}.xml"
-	_protocols="protocol-numbers-${pkgver}.xml"
-
 	install -d "${pkgdir}/etc"
 	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/iana-etc/LICENSE"
-	install -Dm644 ${_ports} "${pkgdir}/usr/share/iana-etc/port-numbers.iana"
-	install -Dm644 ${_protocols} "${pkgdir}/usr/share/iana-etc/protocol-numbers.iana"
+	install -Dm644 ${_ports}.xml "${pkgdir}/usr/share/iana-etc/port-numbers.iana"
+	install -Dm644 ${_protocols}.xml "${pkgdir}/usr/share/iana-etc/protocol-numbers.iana"
 
 	gawk -F"[<>]" '
 BEGIN { print "# Full data: /usr/share/iana-etc/protocol-numbers.iana\n" }
@@ -37,7 +36,7 @@
 (/<value/) { v=$3 }
 (/<name/ && $3!~/ /) { n=$3 }
 (/<\/record/ && n && v!="") { printf "%-12s %3i %s\n", tolower(n),v,n }
-' ${_protocols} > "${pkgdir}/etc/protocols"
+' ${_protocols}.xml > "${pkgdir}/etc/protocols"
 
 	gawk -F"[<>]" '
 BEGIN { print "# Full data: /usr/share/iana-etc/port-numbers.iana\n" }
@@ -47,6 +46,6 @@
 (/<protocol/) { p=$3 }
 (/Unassigned/ || /Reserved/ || /historic/) { c=1 }
 (/<\/record/ && n && u && p && !c) { printf "%-15s %5i/%s\n", n,u,p }
-' ${_ports} > "${pkgdir}/etc/services"
+' ${_ports}.xml > "${pkgdir}/etc/services"
 
 }



More information about the arch-commits mailing list