Date: Friday, October 12, 2018 @ 16:54:30 Author: mtorromeo Revision: 393260
archrelease: copy trunk to community-any Added: geoip2-database/repos/community-any/PKGBUILD (from rev 393259, geoip2-database/trunk/PKGBUILD) geoip2-database/repos/community-any/check-last-modified.sh (from rev 393259, geoip2-database/trunk/check-last-modified.sh) Deleted: geoip2-database/repos/community-any/PKGBUILD geoip2-database/repos/community-any/check-last-modified.sh ------------------------+ PKGBUILD | 77 +++++++++++++++++++++++------------------------ check-last-modified.sh | 46 ++++++++++++++-------------- 2 files changed, 61 insertions(+), 62 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2018-10-12 16:54:14 UTC (rev 393259) +++ PKGBUILD 2018-10-12 16:54:30 UTC (rev 393260) @@ -1,39 +0,0 @@ -# $Id$ -# Maintainer: Massimiliano Torromeo <massimiliano.torro...@gmail.com> - -pkgname='geoip2-database' -pkgver=20180716 -pkgrel=1 -pkgdesc="GeoLite2 IP geolocation databases compiled by MaxMind" -arch=('any') -url="https://dev.maxmind.com/geoip/geoip2/geolite2/" -license=('custom:OPEN DATA LICENSE') -source=(GeoLite2-City-$pkgver.tar.gz::https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz - GeoLite2-Country-$pkgver.tar.gz::https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz - GeoLite2-ASN-$pkgver.tar.gz::https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz) -noextract=(GeoLite2-City-$pkgver.tar.gz - GeoLite2-Country-$pkgver.tar.gz - GeoLite2-ASN-$pkgver.tar.gz) -sha256sums=('1e896e40344e836e2153f6315d0c4a605cbe18901698353e3c58b9e9807fe924' - '8d648c0c79e375d2a904b5bb326ba7f3bddd11eefb742e0926e2d8dccf24aa61' - 'e9a4dbd656474076d817ef7d3f20c4a4f478b104e18ca840b2b8d48977d1b57b') - -prepare() { - cd "$srcdir" - - for _db in GeoLite2-{City,Country,ASN}; do - tar --strip-components=1 -xf $_db-$pkgver.tar.gz --wildcards "*/$_db.mmdb" - done - - tar --strip-components=1 -xf GeoLite2-ASN-$pkgver.tar.gz --wildcards "*/COPYRIGHT.txt" "*/LICENSE.txt" -} - -package() { - cd "$srcdir" - - install -d "$pkgdir/usr/share/GeoIP" - install -m644 -t "$pkgdir/usr/share/GeoIP" GeoLite2-{City,Country,ASN}.mmdb - - install -Dm644 COPYRIGHT.txt "$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT.txt" - install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" -} Copied: geoip2-database/repos/community-any/PKGBUILD (from rev 393259, geoip2-database/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2018-10-12 16:54:30 UTC (rev 393260) @@ -0,0 +1,38 @@ +# Maintainer: Massimiliano Torromeo <massimiliano.torro...@gmail.com> + +pkgname='geoip2-database' +pkgver=20181012 +pkgrel=1 +pkgdesc="GeoLite2 IP geolocation databases compiled by MaxMind" +arch=('any') +url="https://dev.maxmind.com/geoip/geoip2/geolite2/" +license=('custom:OPEN DATA LICENSE') +source=(GeoLite2-City-$pkgver.tar.gz::https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz + GeoLite2-Country-$pkgver.tar.gz::https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz + GeoLite2-ASN-$pkgver.tar.gz::https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz) +noextract=(GeoLite2-City-$pkgver.tar.gz + GeoLite2-Country-$pkgver.tar.gz + GeoLite2-ASN-$pkgver.tar.gz) +sha256sums=('2ca36a85141dafbf6df554f23d4e7324b078101821664ec8173b9b5747f5c966' + 'c8cb2ffef62e81518a0bbf992c94c4a3adc2d36e4317d9d11987a464698c4c4c' + '02015c3f5cfcdc1df3bf3852365e2b2757340a86b67673ab82e61239bbaed97a') + +prepare() { + cd "$srcdir" + + for _db in GeoLite2-{City,Country,ASN}; do + tar --strip-components=1 -xf $_db-$pkgver.tar.gz --wildcards "*/$_db.mmdb" + done + + tar --strip-components=1 -xf GeoLite2-ASN-$pkgver.tar.gz --wildcards "*/COPYRIGHT.txt" "*/LICENSE.txt" +} + +package() { + cd "$srcdir" + + install -d "$pkgdir/usr/share/GeoIP" + install -m644 -t "$pkgdir/usr/share/GeoIP" GeoLite2-{City,Country,ASN}.mmdb + + install -Dm644 COPYRIGHT.txt "$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT.txt" + install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" +} Deleted: check-last-modified.sh =================================================================== --- check-last-modified.sh 2018-10-12 16:54:14 UTC (rev 393259) +++ check-last-modified.sh 2018-10-12 16:54:30 UTC (rev 393260) @@ -1,23 +0,0 @@ -#!/bin/bash -e - -# Unicode characters taken from pactree.c -UNICODE_IS_FUN="\u2514\u2500" - -verbose=0 -if [[ $1 == -v ]]; then - verbose=1 -fi - -URLS=(http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz - http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz - http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz) - -for url in ${URLS[@]}; do - last_mod=$(curl -sI $url | grep -i ^Last-Modified: | cut -d' ' -f2- | tr -d '\r') - echo "$last_mod (${url##*/})" - - if ((verbose)); then - build_id=$(curl -s $url | gzip -cd | grep -aoE '[0-9]{8} Build [0-9]*') - echo -e "${UNICODE_IS_FUN}$build_id" - fi -done Copied: geoip2-database/repos/community-any/check-last-modified.sh (from rev 393259, geoip2-database/trunk/check-last-modified.sh) =================================================================== --- check-last-modified.sh (rev 0) +++ check-last-modified.sh 2018-10-12 16:54:30 UTC (rev 393260) @@ -0,0 +1,23 @@ +#!/bin/bash -e + +# Unicode characters taken from pactree.c +UNICODE_IS_FUN="\u2514\u2500" + +verbose=0 +if [[ $1 == -v ]]; then + verbose=1 +fi + +URLS=(http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz + http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz + http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz) + +for url in ${URLS[@]}; do + last_mod=$(curl -sI $url | grep -i ^Last-Modified: | cut -d' ' -f2- | tr -d '\r') + echo "$last_mod (${url##*/})" + + if ((verbose)); then + build_id=$(curl -s $url | gzip -cd | grep -aoE '[0-9]{8} Build [0-9]*') + echo -e "${UNICODE_IS_FUN}$build_id" + fi +done