diff options
author | Jonathon Fernyhough | 2019-08-09 21:28:08 +0100 |
---|---|---|
committer | Jonathon Fernyhough | 2019-08-09 21:28:08 +0100 |
commit | 3b66f1f08fc40954db203d4c8dabbe1aeadf0e30 (patch) | |
tree | 8d37839ed3bad377413cadb0a6bef72055b965c6 | |
parent | 70efb44074ef0058f2cb5a98434484a5625a515e (diff) | |
download | aur-3b66f1f08fc40954db203d4c8dabbe1aeadf0e30.tar.gz |
Pass $pkgver for dependency generation
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 71 |
2 files changed, 15 insertions, 65 deletions
@@ -1,18 +1,19 @@ pkgbase = julia-zmq pkgdesc = Julia binding to the native API of ØMQ project pkgver = 1.0.0 - pkgrel = 4 + pkgrel = 5 url = https://github.com/JuliaInterop/ZMQ.jl arch = any license = MIT + makedepends = julia-distrohelper depends = julia depends = julia-compat depends = julia-loadpath depends = zeromq source = julia-zmq-1.0.0.tar.gz::https://github.com/JuliaInterop/ZMQ.jl/archive/v1.0.0.tar.gz - source = julia-zmq-Deps.toml::https://raw.githubusercontent.com/JuliaRegistries/General/ffed2d514d4e73cf0f8c700d5d33cd5f9dec9ee0/Z/ZMQ/Deps.toml - source = julia-zmq-Package.toml::https://raw.githubusercontent.com/JuliaRegistries/General/ffed2d514d4e73cf0f8c700d5d33cd5f9dec9ee0/Z/ZMQ/Package.toml - source = julia-zmq-Versions.toml::https://raw.githubusercontent.com/JuliaRegistries/General/ffed2d514d4e73cf0f8c700d5d33cd5f9dec9ee0/Z/ZMQ/Versions.toml + source = julia-zmq-1.0.0-Deps.toml::https://raw.githubusercontent.com/JuliaRegistries/General/ffed2d514d4e73cf0f8c700d5d33cd5f9dec9ee0/Z/ZMQ/Deps.toml + source = julia-zmq-1.0.0-Package.toml::https://raw.githubusercontent.com/JuliaRegistries/General/ffed2d514d4e73cf0f8c700d5d33cd5f9dec9ee0/Z/ZMQ/Package.toml + source = julia-zmq-1.0.0-Versions.toml::https://raw.githubusercontent.com/JuliaRegistries/General/ffed2d514d4e73cf0f8c700d5d33cd5f9dec9ee0/Z/ZMQ/Versions.toml sha256sums = f8c3cc104b3e8dc7ae09da9787427fb2ca45f3e4b46c98a6c8eace78216b1333 sha256sums = d27c36dfdb33f4cfb29f85c57509fa0874bd0f92e8c3d88ef87fcc93f3e32bcc sha256sums = 6b51aedfcda4ecddeed07880756db0791b33bb158237fdb714ff695f1902f417 @@ -3,86 +3,35 @@ pkgname=julia-zmq _pkgname=ZMQ pkgver=1.0.0 -pkgrel=4 +pkgrel=5 pkgdesc='Julia binding to the native API of ØMQ project' arch=(any) url=https://github.com/JuliaInterop/ZMQ.jl license=(MIT) depends=(julia julia-compat julia-loadpath zeromq) +makedepends=(julia-distrohelper) _commit=ffed2d514d4e73cf0f8c700d5d33cd5f9dec9ee0 -source=($pkgname-$pkgver.tar.gz::https://github.com/JuliaInterop/$_pkgname.jl/archive/v$pkgver.tar.gz - $pkgname-Deps.toml::https://raw.githubusercontent.com/JuliaRegistries/General/$_commit/${_pkgname:0:1}/$_pkgname/Deps.toml - $pkgname-Package.toml::https://raw.githubusercontent.com/JuliaRegistries/General/$_commit/${_pkgname:0:1}/$_pkgname/Package.toml - $pkgname-Versions.toml::https://raw.githubusercontent.com/JuliaRegistries/General/$_commit/${_pkgname:0:1}/$_pkgname/Versions.toml) +source=($pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz + $pkgname-$pkgver-Deps.toml::https://raw.githubusercontent.com/JuliaRegistries/General/$_commit/${_pkgname:0:1}/$_pkgname/Deps.toml + $pkgname-$pkgver-Package.toml::https://raw.githubusercontent.com/JuliaRegistries/General/$_commit/${_pkgname:0:1}/$_pkgname/Package.toml + $pkgname-$pkgver-Versions.toml::https://raw.githubusercontent.com/JuliaRegistries/General/$_commit/${_pkgname:0:1}/$_pkgname/Versions.toml) sha256sums=('f8c3cc104b3e8dc7ae09da9787427fb2ca45f3e4b46c98a6c8eace78216b1333' 'd27c36dfdb33f4cfb29f85c57509fa0874bd0f92e8c3d88ef87fcc93f3e32bcc' '6b51aedfcda4ecddeed07880756db0791b33bb158237fdb714ff695f1902f417' 'f2fc26069146b5cfebee4e243023d3793f843eccba6e48c02fa92d5124599da2') _slug() { - local uuid=$(grep uuid $pkgname-Package.toml | cut -f3 -d' ') - local sha1=$(grep \"$pkgver\" -a1 $pkgname-Versions.toml | tail -n1 | cut -f3 -d' ') - julia -e "u = Base.UUID($uuid); - s = Base.SHA1(hex2bytes($sha1)); - println(Base.version_slug(u,s));" + dh_julia slug "$srcdir"/"$pkgname"-$pkgver-{Package,Versions}.toml } -_deps() { - julia -e "using Pkg - - alldeps = Pkg.TOML.parsefile(\"$srcdir/$pkgname-Deps.toml\") - version = VersionNumber(\"$pkgver\") - majmin = VersionNumber(\"${pkgver%.*}\") - deps = Dict{String,Any}() - - for (key, value) in alldeps - vers = split(key, \"-\") - lower = VersionNumber(vers[1]) - if length(vers) == 2 - upper = VersionNumber(vers[2]) - if (majmin >= lower && majmin <= upper) || - (version >= lower && version <= upper) - merge!(deps, value) - end - elseif length(vers) == 1 - if majmin == lower || version == lower - merge!(deps, value) - end - end - end - - Pkg.TOML.print(deps)" +_project() { + dh_julia distro_project_ "$srcdir"/"$pkgname"-$pkgver-{Package,Versions,Deps}.toml $pkgver } prepare() { # Generate a Project.toml from Registry metadata - rm -f Project.toml && touch Project.toml - cat $pkgname-Package.toml >> Project.toml - echo -e "version = \"$pkgver\"" >> Project.toml - echo -e "\n[deps]" >> Project.toml - echo -e "$(_deps)" | sort >> Project.toml - - cd $_pkgname.jl-$pkgver - cat >deps/deps.jl <<'EOF' -if isdefined((@static VERSION < v"0.7.0-DEV.484" ? current_module() : @__MODULE__), :Compat) - import Compat.Libdl -elseif VERSION >= v"0.7.0-DEV.3382" - import Libdl -end -const libzmq = "/usr/lib/libzmq.so" -function check_deps() - global libzmq - if !isfile(libzmq) - error("$(libzmq) does not exist, please report an issue with this PKGBUILD.") - end - - if Libdl.dlopen_e(libzmq) == C_NULL - error("$(libzmq) cannot be opened, please report an issue with this PKGBUILD.") - end -end -EOF - + rm -f Project.toml && _project } package() { |