From: Adam Dickmeiss Date: Tue, 17 Jun 2014 12:41:29 +0000 (+0000) Subject: RPM for zorba and mp-xquery X-Git-Tag: v0.1~1 X-Git-Url: http://git.indexdata.com/?p=mp-xquery-moved-to-github.git;a=commitdiff_plain;h=c40c009e50d98dc7ad4bdeb7e68277a271e7f00a RPM for zorba and mp-xquery Zorba is not our own and we make a special install in /opt/zorba. Note that compiling Zorba require 2.8 or later of cmake which do not exist on CentOS 6. For this reason the build process relies on a recent cmake in /opt/cmake . For now, zorba is just one big package - both runtime and development combined. mp-xquery is same skeleton as cf-engine and relies on zorba to be installed. --- diff --git a/mp-xquery.spec b/mp-xquery.spec new file mode 100644 index 0000000..7b821b7 --- /dev/null +++ b/mp-xquery.spec @@ -0,0 +1,66 @@ +%define idmetaversion %(. ./IDMETA; printf $VERSION ) +Summary: Metaproxy XQuery module +Name: mp-xquery +Version: %{idmetaversion} +Release: 1.indexdata +BuildRequires: gcc gcc-c++ pkgconfig +BuildRequires: libmetaproxy6-devel >= 1.4.0 +BuildRequires: wget +BuildRequires: zorba +License: proprietary +Group: Applications/Internet +Vendor: Index Data ApS +Source: mp-xquery-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Packager: Adam Dickmeiss +URL: http://www.indexdata.com/mp-xquery + +%description +Record conversion module using the Zorba XQuery library + +Requires: metaproxy6 +Requires: libmetaproxy6 +Requires: zorba + +%post +if [ -d /usr/lib64/metaproxy6/modules ]; then + if [ ! -e /usr/lib64/metaproxy6/modules/metaproxy_filter_xquery.so ]; then + ln -s /usr/lib64/mp-xquery/metaproxy_filter_xquery.so /usr/lib64/metaproxy6/modules + fi +fi +if [ -f /var/run/metaproxy.pid ]; then + /sbin/service metaproxy restart +fi +%preun +if [ $1 = 0 ]; then + if [ -f /var/run/metaproxy.pid ]; then + /sbin/service metaproxy restart + fi +fi + +%postun +if [ $1 = 0 ]; then + rm -f /usr/lib64/metaproxy6/modules/metaproxy_filter_xquery.so +fi + +%prep +%setup + +%build +cd src +make \ + ZORBA=/opt/zorba + OPT_FLAGS="-g -O" \ + YAZ_CONFIG=/usr/bin/yaz-config \ + MP_CONFIG=/usr/bin/metaproxy-config + +%install +cd src +make DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir} install + +%clean +rm -fr ${RPM_BUILD_ROOT} + +%files +%defattr(-,root,root) +%{_libdir}/mp-xquery/* diff --git a/zorba.spec b/zorba.spec new file mode 100644 index 0000000..3f1c503 --- /dev/null +++ b/zorba.spec @@ -0,0 +1,50 @@ +Summary: XQuery Processor +Name: zorba +Version: 3.0 +Release: 1.indexdata +BuildRequires: gcc gcc-c++ pkgconfig +BuildRequires: wget +BuildRequires: xerces-c-devel +BuildRequires: libcurl-devel +BuildRequires: libedit-devel +BuildRequires: libxslt-devel +BuildRequires: bison +License: Apache +Group: Applications/Internet +Vendor: Index Data ApS +Source: zorba-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Packager: Adam Dickmeiss +URL: http://www.indexdata.com/mp-xquery + +%description +Zorba - The XQuery Processor developed by the FLWOR Foundation + +Requires: libcurl +Requires: xerces-c + +%prep +%setup + +%build +mkdir build +cd build +/opt/cmake/bin/cmake \ + -Wno-dev \ + -D CMAKE_INSTALL_PREFIX=/opt/zorba \ + -D ZORBA_SUPPRESS_SWIG:BOOL=ON \ + .. +cd .. + +%install +cd build +rm -fr ${RPM_BUILD_ROOT} +make DESTDIR=${RPM_BUILD_ROOT} install +cd .. + +%clean +rm -fr ${RPM_BUILD_ROOT} + +%files +%defattr(-,root,root) +/opt