Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build with libraries required for geosparql support #20

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .woodpecker/.feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pipeline:
settings:
repo: redpencil/virtuoso
tags: ${CI_COMMIT_SOURCE_BRANCH/\//-}
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
when:
event:
- pull_request
Expand Down
30 changes: 29 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,31 @@ ARG VIRTUOSO_COMMIT=f3d88f16bca4274265160e098be3ba3c7d68341c

RUN apt-get update
RUN apt-get install -y build-essential autotools-dev autoconf automake net-tools libtool \
flex bison gperf gawk m4 libssl-dev libreadline-dev openssl wget
flex bison gperf gawk m4 libssl-dev libreadline-dev openssl wget bzip2

# Build libraries for GeoSPARQL support according to https://github.com/openlink/virtuoso-opensource/blob/10b2678ca4a801e75bc654a656017c3cfc0d8760/README.GeoSPARQL.md
# proj4
RUN wget https://download.osgeo.org/proj/proj-4.9.3.tar.gz
RUN tar xzf proj-4.9.3.tar.gz
WORKDIR proj-4.9.3
RUN ./configure
RUN make
RUN make install

# geos
WORKDIR ../
RUN wget http://download.osgeo.org/geos/geos-3.5.1.tar.bz2
RUN bzip2 -d geos-3.5.1.tar.bz2
RUN ls -a
RUN tar xf geos-3.5.1.tar
WORKDIR geos-3.5.1
RUN ./configure
RUN make
RUN make check
RUN make install
RUN ldconfig

WORKDIR ../
RUN wget https://github.com/openlink/virtuoso-opensource/archive/${VIRTUOSO_COMMIT}.tar.gz
RUN tar xzf ${VIRTUOSO_COMMIT}.tar.gz
WORKDIR virtuoso-opensource-${VIRTUOSO_COMMIT}
Expand All @@ -20,6 +44,9 @@ RUN case "$TARGETPLATFORM" in \
*) export CFLAGS="-O" ;; \
esac \
&& ./configure \
--enable-proj4=/usr/local/lib \
--enable-geos=/usr/local/lib \
--enable-shapefileio \
--disable-graphql \
--disable-bpel-vad \
--enable-conductor-vad \
Expand All @@ -37,6 +64,7 @@ RUN make && make install

FROM ubuntu:22.04
COPY --from=builder /usr/local/virtuoso-opensource /usr/local/virtuoso-opensource
COPY --from=builder /usr/local/lib/ /usr/local/lib
RUN apt-get update && apt-get install -y libssl-dev crudini
# Add Virtuoso bin to the PATH
ENV PATH /usr/local/virtuoso-opensource/bin/:$PATH
Expand Down