Files

92 lines
3.5 KiB
Tcl
Raw Permalink Normal View History

2021-09-16 18:57:57 +01:00
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup java 1.0
PortGroup github 1.0
2024-12-12 20:09:15 +04:00
github.setup openstreetmap osmosis 0.49.2
2021-09-16 18:57:57 +01:00
github.tarball_from archive
revision 0
categories java gis
2024-01-12 18:37:30 +11:00
platforms any
2021-09-16 18:57:57 +01:00
supported_archs noarch
maintainers {@frankdean fdsd.co.uk:frank.dean} openmaintainer
2024-12-12 22:00:55 +04:00
license public-domain
2021-09-16 18:57:57 +01:00
description A command line Java application for processing OSM data
long_description The tool consists of a series of pluggable \
components that can be chained together to perform \
a larger operation. For example, it has components \
for reading from database and from file, \
components for writing to database and to file, \
components for deriving and applying change sets \
to data sources, components for sorting data, \
etc. It has been written so that it is easy to add \
new features without re-writing common tasks such \
as file or database handling.
2024-12-12 20:09:15 +04:00
checksums rmd160 6e96abddad8137b2bef8c694a7e90c82f086e589 \
sha256 b355771c35f326ee45431916c2ebe3f81a09ba571c03c3302f5268103f7b7e3c \
size 529169
2021-09-16 18:57:57 +01:00
set appdir ${prefix}/share/${name}
set docdir ${prefix}/share/doc/${name}
2024-12-12 20:09:15 +04:00
java.version 17+
java.fallback openjdk17
2021-09-16 18:57:57 +01:00
depends_build port:gradle
use_configure no
build.env-append GRADLE_USER_HOME=${worksrcpath}/.gradle
2024-12-12 20:09:15 +04:00
build.cmd ${prefix}/bin/gradle
2021-09-16 18:57:57 +01:00
build.target assemble
test.run yes
test.env-append GRADLE_USER_HOME=${worksrcpath}/.gradle
2024-12-12 20:09:15 +04:00
test.cmd ${prefix}/bin/gradle
2021-09-16 18:57:57 +01:00
test.target build
2024-12-12 20:09:15 +04:00
patchfiles build-gradle.diff
2021-09-16 18:57:57 +01:00
post-patch {
reinplace "s|@VERSION@|${version}|g" \
${worksrcpath}/build.gradle
reinplace "s|/usr/share|${prefix}/share|g" \
2024-12-12 20:09:15 +04:00
${worksrcpath}/osmosis/src/dist/script/munin/README
2021-09-16 18:57:57 +01:00
reinplace "s|/etc|${prefix}/etc|g" \
2024-12-12 20:09:15 +04:00
${worksrcpath}/osmosis/src/dist/script/munin/README
2021-09-16 18:57:57 +01:00
reinplace "s|#user osm|#user nobody|g" \
2024-12-12 20:09:15 +04:00
${worksrcpath}/osmosis/src/dist/script/munin/osm_replication.conf
2021-09-16 18:57:57 +01:00
reinplace "s|#env.osmosis /opt/osmosis/bin|env.osmosis ${appdir}/bin|g" \
2024-12-12 20:09:15 +04:00
${worksrcpath}/osmosis/src/dist/script/munin/osm_replication.conf
2021-09-16 18:57:57 +01:00
reinplace "s|#env.workingDirectory /path/to/state.txt|#env.workingDirectory ${prefix}/var/lib/mod_tile/.osmosis/state.txt|g" \
2024-12-12 20:09:15 +04:00
${worksrcpath}/osmosis/src/dist/script/munin/osm_replication.conf
2021-09-16 18:57:57 +01:00
}
pre-test {
# Tests that fail, which are effectively integration tests
# requiring databases that have been created and configured for
# testing.
file delete -force ${worksrcpath}/osmosis-apidb/src/test
file delete -force ${worksrcpath}/osmosis-extract/src/test
file delete -force ${worksrcpath}/osmosis-pgsimple/src/test
file delete -force ${worksrcpath}/osmosis-pgsnapshot/src/test
}
destroot {
2024-12-12 20:09:15 +04:00
system -W ${worksrcpath}/osmosis/build/distributions "tar -xf osmosis-${version}.tar"
move ${worksrcpath}/osmosis/build/distributions/osmosis-${version} ${destroot}${appdir}
xinstall -d ${destroot}${docdir}
move {*}[glob ${destroot}${appdir}/*.txt] ${destroot}${docdir}
delete ${destroot}${appdir}/bin/osmosis.bat
2021-09-16 18:57:57 +01:00
ln -s ${appdir}/bin/${name} ${destroot}${prefix}/bin/${name}
}