From 53e65f5c617b6b53f3e8e6b92bd9a8d3a1d29f3c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 5 Jan 2015 13:32:17 +0000 Subject: [PATCH] create RPM MPSPARQL-2 --- IDMETA | 4 ++++ mkdist.sh | 16 +++++++++++++++ mp-sparql.spec | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 IDMETA create mode 100755 mkdist.sh create mode 100644 mp-sparql.spec diff --git a/IDMETA b/IDMETA new file mode 100644 index 0000000..fae35f0 --- /dev/null +++ b/IDMETA @@ -0,0 +1,4 @@ +NAME=mp-sparql +CENTOS_DIST="centos6" +VERSION=0.1 +ARCHS=amd64 diff --git a/mkdist.sh b/mkdist.sh new file mode 100755 index 0000000..fbcf90a --- /dev/null +++ b/mkdist.sh @@ -0,0 +1,16 @@ +#!/bin/sh +. ./IDMETA +set -x +git log >ChangeLog +git archive --format=tar --prefix=$NAME-$VERSION/ HEAD > $NAME-$VERSION.tar +tar xf $NAME-$VERSION.tar +cp ChangeLog $NAME-$VERSION +cd $NAME-$VERSION +rm -fr debian +cd .. +tar cfz $NAME-$VERSION.tar.gz $NAME-$VERSION +rm $NAME-$VERSION.tar +rm -r $NAME-$VERSION +exit 0 + + diff --git a/mp-sparql.spec b/mp-sparql.spec new file mode 100644 index 0000000..d368db0 --- /dev/null +++ b/mp-sparql.spec @@ -0,0 +1,59 @@ +%define idmetaversion %(. ./IDMETA; printf $VERSION ) +Summary: Metaproxy SPARQL module +Name: mp-sparql +Version: %{idmetaversion} +Release: 1.indexdata +BuildRequires: gcc gcc-c++ pkgconfig +BuildRequires: docbook-style-xsl +License: proprietary +Group: Applications/Internet +Vendor: Index Data ApS +Source: mp-sparql-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Packager: Adam Dickmeiss +URL: http://www.indexdata.com/metaproxy + +Requires: metaproxy6 +Requires: libmetaproxy6 + +%description +Backend module for querying triplestore stores + +%post +if [ -d /usr/lib64/metaproxy6/modules ]; then + if [ ! -e /usr/lib64/metaproxy6/modules/metaproxy_filter_sparql.so ]; then + ln -s /usr/lib64/mp-sparql/metaproxy_filter_sparql.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_sparql.so +fi + +%prep +%setup + +%build +make \ + MP_CONFIG=/usr/bin/metaproxy-config + +%install +make DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir} install + +%clean +rm -fr ${RPM_BUILD_ROOT} + +%files +%defattr(-,root,root) +%{_libdir}/mp-sparql/* +# %{_mandir}/man3/sparql.* -- 1.7.10.4