Changeset: ef3c801a631e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ef3c801a631e
Modified Files:
        MonetDB.spec
        configure.ag
        rpm.mk.in
Branch: default
Log Message:

Create a MonetDB-lidar RPM.


diffs (154 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -50,10 +50,23 @@
 %define with_geos 1
 %endif
 
+# On Fedora, the liblas library is available, and so we can require it
+# and build the lidar modules.  On RedHat Enterprise Linux and
+# derivatives (CentOS, Scientific Linux), the liblas library is not
+# available, even with EPEL available.
 %if %{?rhel:0}%{!?rhel:1}
-# If the _without_samtools macro is set, the MonetDB-bam-MonetDB5 RPM
-# will be created.  The macro can be set when using mock by passing it
-# the flag --without=samtools.
+# If the _without_lidar macro is not set, the MonetDB-lidar RPM will
+# be created.  The macro can be set when using mock by passing it the
+# flag --without=lidar.
+%if %{?_without_lidar:0}%{!?_without_lidar:1}
+%define with_lidar 1
+%endif
+%endif
+
+%if %{?rhel:0}%{!?rhel:1}
+# If the _without_samtools macro is not set, the MonetDB-bam-MonetDB5
+# RPM will be created.  The macro can be set when using mock by
+# passing it the flag --without=samtools.
 # Note that the samtools-devel RPM is not available on RedHat
 # Enterprise Linux and derivatives, even with EPEL availabe.
 # (Actually, at the moment of writing, samtools-devel is available in
@@ -102,6 +115,9 @@ BuildRequires: cfitsio-devel
 BuildRequires: geos-devel >= 3.0.0
 %endif
 BuildRequires: gsl-devel
+%if %{?with_lidar:1}%{!?with_lidar:0}
+BuildRequires: liblas-devel gdal-devel libgeotiff-devel
+%endif
 BuildRequires: libatomic_ops-devel
 BuildRequires: libcurl-devel
 # BuildRequires: libmicrohttpd-devel
@@ -473,6 +489,28 @@ extensions for %{name}-SQL-server5.
 %{_libdir}/monetdb5/lib_geom.so
 %endif
 
+%if %{?with_lidar:1}%{!?with_lidar:0}
+%package lidar
+Summary: MonetDB5 SQL support for working with LiDAR data
+Group: Applications/Databases
+Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
+
+%description lidar
+MonetDB is a database management system that is developed from a
+main-memory perspective with use of a fully decomposed storage model,
+automatic index management, extensibility of data types and search
+accelerators.  It also has an SQL frontend.
+
+This package contains support for reading and writing LiDAR data.
+
+%files lidar
+%defattr(-,root,root)
+%{_libdir}/monetdb5/autoload/*_lidar.mal
+%{_libdir}/monetdb5/createdb/*_lidar.sql
+%{_libdir}/monetdb5/lidar.mal
+%{_libdir}/monetdb5/lib_lidar.so
+%endif
+
 %package gsl-MonetDB5
 Summary: MonetDB5 SQL interface to the gsl library
 Group: Applications/Databases
@@ -628,6 +666,9 @@ fi
 %exclude %{_libdir}/monetdb5/geom.mal
 %endif
 %exclude %{_libdir}/monetdb5/gsl.mal
+%if %{?with_lidar:1}%{!?with_lidar:0}
+%exclude %{_libdir}/monetdb5/lidar.mal
+%endif
 %if %{?with_rintegration:1}%{!?with_rintegration:0}
 %exclude %{_libdir}/monetdb5/rapi.mal
 %endif
@@ -641,6 +682,9 @@ fi
 %exclude %{_libdir}/monetdb5/autoload/*_geom.mal
 %endif
 %exclude %{_libdir}/monetdb5/autoload/*_gsl.mal
+%if %{?with_lidar:1}%{!?with_lidar:0}
+%exclude %{_libdir}/monetdb5/autoload/*_lidar.mal
+%endif
 %if %{?with_rintegration:1}%{!?with_rintegration:0}
 %exclude %{_libdir}/monetdb5/autoload/*_rapi.mal
 %endif
@@ -650,6 +694,9 @@ fi
 %exclude %{_libdir}/monetdb5/lib_geom.so
 %endif
 %exclude %{_libdir}/monetdb5/lib_gsl.so
+%if %{?with_lidar:1}%{!?with_lidar:0}
+%exclude %{_libdir}/monetdb5/lib_lidar.so
+%endif
 %if %{?with_rintegration:1}%{!?with_rintegration:0}
 %exclude %{_libdir}/monetdb5/lib_rapi.so
 %endif
@@ -763,6 +810,9 @@ systemd-tmpfiles --create %{_sysconfdir}
 %exclude %{_libdir}/monetdb5/createdb/*_geom.sql
 %endif
 %exclude %{_libdir}/monetdb5/createdb/*_gsl.sql
+%if %{?with_lidar:1}%{!?with_lidar:0}
+%exclude %{_libdir}/monetdb5/createdb/*_lidar.sql
+%endif
 %if %{?with_samtools:1}%{!?with_samtools:0}
 %exclude %{_libdir}/monetdb5/createdb/*_bam.sql
 %endif
@@ -913,6 +963,7 @@ developer, but if you do want to test, t
        --enable-gsl=yes \
        --enable-instrument=no \
        --enable-jdbc=no \
+       --enable-lidar=%{?with_lidar:yes}%{!?with_lidar:no} \
        --enable-merocontrol=no \
        --enable-microhttpd=no \
        --enable-monetdb5=yes \
@@ -928,6 +979,7 @@ developer, but if you do want to test, t
        --with-bz2=yes \
        --with-geos=%{?with_geos:yes}%{!?with_geos:no} \
        --with-java=no \
+       --with-liblas=%{?with_lidar:yes}%{!?with_lidar:no} \
        --with-perl=yes \
        --with-perl-libdir=lib/perl5 \
        --with-pthread=yes \
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2662,6 +2662,13 @@ no)
        why_have_liblas="(lidar module is disabled)"
        ;;
 esac
+case "$enable_lidar" in
+no)    LIBLAS_RPM=without;;
+*)     LIBLAS_RPM=with;;
+esac
+# this is only used in rpm.mk.in to maybe avoid building MonetDB-lidar
+AC_SUBST(LIBLAS_RPM)
+
 AC_SUBST(LIBLAS_INCS)
 AC_SUBST(LIBLAS_LIBS)
 AC_MSG_CHECKING(['enable lidar: $enable_lidar'])
diff --git a/rpm.mk.in b/rpm.mk.in
--- a/rpm.mk.in
+++ b/rpm.mk.in
@@ -10,7 +10,7 @@
 
 rpmtopdir = $(shell cd $(top_builddir) && pwd)/rpmbuild
 
-RPMBUILDARGS = --define="_tmppath /tmp" --define="_topdir $(rpmtopdir)" 
--define="tmpdir %{_tmppath}" --define="rpmcflags -O2 " --define="packager 
MonetDB Database System <[email protected]>" --define="oid@oids@ 1"
+RPMBUILDARGS = --define="_tmppath /tmp" --define="_topdir $(rpmtopdir)" 
--define="tmpdir %{_tmppath}" --define="rpmcflags -O2 " --define="packager 
MonetDB Database System <[email protected]>" --define="oid@oids@ 1" 
--define="_@LIBLAS_RPM@_lidar 1"
 
 $(top_builddir)/$(distdir).tar.bz2:
        $(MAKE) $(AM_MAKEFLAGS) dist
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to