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

Gaetan Bisson bisson at archlinux.org
Sat Oct 17 03:13:16 UTC 2015


    Date: Saturday, October 17, 2015 @ 05:13:16
  Author: bisson
Revision: 249454

implement FS#46758, get rid of old scripts

Added:
  iana-etc/trunk/LICENSE
Modified:
  iana-etc/trunk/PKGBUILD
Deleted:
  iana-etc/trunk/newer.patch
  iana-etc/trunk/protocols.gawk
  iana-etc/trunk/services.gawk

----------------+
 LICENSE        |    1 
 PKGBUILD       |   69 +++++++++++++++++++++++++++++++------------------------
 newer.patch    |   29 -----------------------
 protocols.gawk |   13 ----------
 services.gawk  |   15 -----------
 5 files changed, 41 insertions(+), 86 deletions(-)

Added: LICENSE
===================================================================
--- LICENSE	                        (rev 0)
+++ LICENSE	2015-10-17 03:13:16 UTC (rev 249454)
@@ -0,0 +1 @@
+The contents of this package are inelligible for copyright protection.

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-10-17 02:47:53 UTC (rev 249453)
+++ PKGBUILD	2015-10-17 03:13:16 UTC (rev 249454)
@@ -3,43 +3,54 @@
 # Maintainer: Gaetan Bisson <bisson at archlinux.org>
 
 pkgname=iana-etc
-pkgver=2.30
-pkgrel=5
+pkgver=20151016
+pkgrel=1
 pkgdesc='/etc/protocols and /etc/services provided by IANA'
-url='http://sethwklein.net/iana-etc.html'
+url='http://www.iana.org/protocols'
 arch=('any')
-license=('custom')
+license=('custom:none')
 backup=('etc/'{protocols,services})
-source=("http://sethwklein.net/${pkgname}-${pkgver}.tar.bz2"
-        'protocols.gawk'
-        'services.gawk'
-        'newer.patch')
-sha1sums=('218593bcb9264014c4e397d838b2c218eac9df06'
-          '48c1b94d9069f73e8a919301da564f414c4108f8'
-          'c04278a7f11466efc64b80c193ef630857d9698a'
-          '2ff4a7aa0854a2b191b0b1a5c36eff072cd6885e')
+source=('http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml'
+        'http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml'
+        'LICENSE')
+sha1sums=('2d26b6b0033d34b4555a1e1c3d503b266cef1b2f'
+          'c4ebdff6e286aa7c55620076feecd8a9bbeeab65'
+          'ef54e7a2182f1ab7c1d2d4c9e1ab2bcc5ec65b66')
 
-prepare() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-	cp ../protocols.gawk ../services.gawk .
-	patch -p1 -i ../newer.patch
+package() {
+	cd "${srcdir}"
+	install -d "${pkgdir}/etc"
+	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/iana-etc/LICENSE"
+	install -Dm644 protocol-numbers.xml "${pkgdir}/usr/share/iana-etc/protocol-numbers.iana"
+	install -Dm644 service-names-port-numbers.xml "${pkgdir}/usr/share/iana-etc/port-numbers.iana"
+
+	gawk '
+BEGIN {
+	print "# Full data: /usr/share/iana-etc/protocol-numbers.iana\n"
+	FS="[<>]"
 }
 
-build() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-	make get
-	make
+{
+	if (/<record/) { v=n=0 }
+	if (/<value/) v=$3
+	if (/<name/ && !($3~/ /)) n=$3
+	if (/<\/record/ && (v || n=="HOPOPT") && n) printf "%-12s %3i %s\n", tolower(n),v,n
 }
+' protocol-numbers.xml > "${pkgdir}/etc/protocols"
 
-check() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-	make test
+	gawk '
+BEGIN {
+	print "# Full data: /usr/share/iana-etc/port-numbers.iana\n"
+	FS="[<>]"
 }
 
-package() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-	make DESTDIR="${pkgdir}" install
-	install -Dm644 COPYING "${pkgdir}/usr/share/licenses/iana-etc/LICENSE"
-	install -Dm644 port-numbers.iana "${pkgdir}/usr/share/iana-etc/port-numbers.iana"
-	install -Dm644 protocol-numbers.iana "${pkgdir}/usr/share/iana-etc/protocol-numbers.iana"
+{
+	if (/<record/) { n=u=p=c=0 }
+	if (/<name/ && !/\(/) n=$3
+	if (/<number/) u=$3
+	if (/<protocol/) p=$3
+	if (/Unassigned/ || /Reserved/ || /historic/) c=1
+	if (/<\/record/ && n && u && p && !c) printf "%-15s %5i/%s\n", n,u,p
+}' service-names-port-numbers.xml > "${pkgdir}/etc/services"
+
 }

Deleted: newer.patch
===================================================================
--- newer.patch	2015-10-17 02:47:53 UTC (rev 249453)
+++ newer.patch	2015-10-17 03:13:16 UTC (rev 249454)
@@ -1,29 +0,0 @@
-diff -Naur old/Makefile new/Makefile
---- old/Makefile	2008-03-05 08:02:40.000000000 -1000
-+++ new/Makefile	2013-11-20 11:30:01.387562517 -1000
-@@ -42,11 +42,11 @@
- 	    protocol-numbers.iana port-numbers.iana
- 
- protocol-numbers.iana:
--	$(AWK) -f get.gawk -v file=protocol-numbers >protocol-numbers.iana
-+	$(AWK) -f get.gawk -v file=protocol-numbers/protocol-numbers.xml >protocol-numbers.iana
- 	rm -f protocol-numbers
- 
- port-numbers.iana:
--	$(AWK) -f get.gawk -v file=port-numbers >port-numbers.iana
-+	$(AWK) -f get.gawk -v file=service-names-port-numbers/service-names-port-numbers.xml >port-numbers.iana
- 	rm -f port-numbers
- 
- protocol-numbers:
-diff -Naur old/get.gawk new/get.gawk
---- old/get.gawk	2008-03-05 08:04:18.000000000 -1000
-+++ new/get.gawk	2013-11-20 11:30:01.387562517 -1000
-@@ -26,7 +26,7 @@
- 	NR++
- 
- 	if (in_content) { print }
--	if (/^$/)       { in_content=1 }
-+	if (/^\r?$/)    { in_content=1 }
-     }
- 
-     printf "\n" >"/dev/stderr"

Deleted: protocols.gawk
===================================================================
--- protocols.gawk	2015-10-17 02:47:53 UTC (rev 249453)
+++ protocols.gawk	2015-10-17 03:13:16 UTC (rev 249454)
@@ -1,13 +0,0 @@
-#!/usr/bin/awk -f
-
-BEGIN {
-	print "# See the full IANA XML file at: /usr/share/iana-etc/protocol-numbers.iana\n"
-	FS="[<>]"
-}
-
-{
-	if (/<record/) { v=n=0 }
-	if (/<value/) v=$3
-	if (/<name/ && !($3~/ /)) n=$3
-	if (/<\/record/ && (v || n=="HOPOPT") && n) printf "%-12s %3i %s\n", tolower(n),v,n
-}

Deleted: services.gawk
===================================================================
--- services.gawk	2015-10-17 02:47:53 UTC (rev 249453)
+++ services.gawk	2015-10-17 03:13:16 UTC (rev 249454)
@@ -1,15 +0,0 @@
-#!/usr/bin/awk -f
-
-BEGIN {
-	print "# See the full IANA XML file at: /usr/share/iana-etc/port-numbers.iana\n"
-	FS="[<>]"
-}
-
-{
-	if (/<record/) { n=u=p=c=0 }
-	if (/<name/ && !/\(/) n=$3
-	if (/<number/) u=$3
-	if (/<protocol/) p=$3
-	if (/Unassigned/ || /Reserved/ || /historic/) c=1
-	if (/<\/record/ && n && u && p && !c) printf "%-15s %5i/%s\n", n,u,p
-}



More information about the arch-commits mailing list