create RPM MPSPARQL-2
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 5 Jan 2015 13:32:17 +0000 (13:32 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 5 Jan 2015 13:32:17 +0000 (13:32 +0000)
IDMETA [new file with mode: 0644]
mkdist.sh [new file with mode: 0755]
mp-sparql.spec [new file with mode: 0644]

diff --git a/IDMETA b/IDMETA
new file mode 100644 (file)
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 (executable)
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 (file)
index 0000000..d368db0
--- /dev/null
@@ -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 <info@indexdata.dk>
+Source: mp-sparql-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Packager: Adam Dickmeiss <adam@indexdata.dk>
+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.*