diff options
author | zhs | 2021-07-26 20:27:24 +0000 |
---|---|---|
committer | zhs | 2021-07-26 20:27:24 +0000 |
commit | 4791560e80e35785274efc2758385e3a6029e26c (patch) | |
tree | b513f8ab955872e188c40ee298889088c47d4d02 | |
parent | e703651ab963aab64ab1295c374f87743f41116f (diff) | |
download | aur-crawl-git.tar.gz |
overwrite old package
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | crawl-git.install | 17 |
3 files changed, 59 insertions, 34 deletions
@@ -1,19 +1,16 @@ -# Generated by mksrcinfo v8 -# Sun Dec 13 05:01:05 UTC 2015 pkgbase = crawl-git - pkgdesc = Dungeon Crawl Stone Soup, a roguelike adventure through dungeons filled with dangerous monsters in a quest to find the mystifyingly fabulous Orb of Zot. - pkgver = 0.18.a0.r775.g4d9e04e + pkgdesc = Simple web crawler written in Go, storing websites in WARC format + pkgver = r83.ef2c410 pkgrel = 1 - url = http://crawl.develz.org - arch = i686 + url = https://git.autistici.org/ale/crawl/ + install = crawl-git.install arch = x86_64 - license = GPL + license = MIT makedepends = git - makedepends = gcc - depends = zlib - depends = ncurses - source = git+https://github.com/crawl/crawl.git - md5sums = SKIP + makedepends = go + depends = glibc + source = git+https://git.autistici.org/ale/crawl/ + sha256sums = SKIP pkgname = crawl-git @@ -1,37 +1,48 @@ -# Maintainer: Gergely Imreh <imrehg@gmail.com> -# Contributor: Frederic Bezies <fredbezies at gmail dot com> -# Contributor: Lex Black <autumn-wind at web dot de> -# Contributor: Weston Hanners <weston@hanners.us> +# Maintainer: zhs <zhao4she4@tuta.io> pkgname=crawl-git -_pkgname=${pkgname%%-git} -pkgver=0.18.a0.r775.g4d9e04e +_pkgname=crawl +pkgver=r83.ef2c410 pkgrel=1 -pkgdesc="Dungeon Crawl Stone Soup, a roguelike adventure through dungeons filled with dangerous monsters in a quest to find the mystifyingly fabulous Orb of Zot." -arch=('i686' 'x86_64') -url="http://crawl.develz.org" -license=('GPL') -depends=('zlib' 'ncurses') -makedepends=('git' 'gcc') -source=('git+https://github.com/crawl/crawl.git') -md5sums=('SKIP') +pkgdesc="Simple web crawler written in Go, storing websites in WARC format" +arch=('x86_64') +url="https://git.autistici.org/ale/crawl/" +license=('MIT') +depends=('glibc') +makedepends=('git' 'go') +install=crawl-git.install +source=("git+https://git.autistici.org/ale/crawl/") +sha256sums=('SKIP') pkgver() { - cd "${_pkgname}" - git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + cd "${srcdir}/${_pkgname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd "${_pkgname}" - git submodule update --init + cd "${_pkgname}" + mkdir -p build/ } build() { - cd "${srcdir}/${_pkgname}/${_pkgname}-ref/source/" - make NO_LUA_BINDINGS=Y + cd "${srcdir}/${_pkgname}" + + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export CGO_LDFLAGS="$LDFLAGS" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o build ./cmd/... +} + +check() { + cd "${srcdir}/${_pkgname}" + go test ./... } package() { - cd "${srcdir}/${_pkgname}/${_pkgname}-ref/source/" - make prefix=/usr/local/ DESTDIR="${pkgdir}" install + cd "${srcdir}/${_pkgname}" + install -Dm755 -- "build/crawl" "${pkgdir}/usr/bin/go-crawl" + install -Dm755 -- "build/links" "${pkgdir}/usr/bin/go-links" + install -Dm755 -- "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/crawl-git.install b/crawl-git.install new file mode 100644 index 000000000000..53ab64e60f17 --- /dev/null +++ b/crawl-git.install @@ -0,0 +1,17 @@ +_exec_location_message() { + cat << EOM + +>>> Executables have been installed as 'go-crawl' and 'go-links' to avoid +>>> file name conflict with 'links' from core repository. + +EOM +} + +post_install() { + _exec_location_message +} + +post_upgrade() { + _exec_location_message +} + |