You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
4.4 KiB
116 lines
4.4 KiB
## |
|
## actordb.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2016 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package version |
|
%define V_opkg 0.10.13 |
|
%define V_dist 20151230 |
|
|
|
# package information |
|
Name: actordb |
|
Summary: Distributed SQL Database |
|
URL: http://www.actordb.com/ |
|
Vendor: Biokoda, Sergej Jurecko |
|
Packager: OpenPKG Foundation e.V. |
|
Distribution: OpenPKG Community |
|
Class: EVAL |
|
Group: Database |
|
License: MPL |
|
Version: %{V_opkg} |
|
Release: 20151230 |
|
|
|
# list of sources |
|
Source0: http://download.openpkg.org/components/versioned/actordb/actordb-%{V_dist}.tar.xz |
|
Patch0: actordb.patch |
|
|
|
# build information |
|
BuildPreReq: OpenPKG, openpkg >= 20140101, erlang |
|
PreReq: OpenPKG, openpkg >= 20140101 |
|
|
|
%description |
|
ActorDB is a distributed SQL database with the scalability of a |
|
KV store, while keeping the query capabilities of a relational |
|
database. ActorDB is based on the actor model of computation. Unlike |
|
traditional monolithic databases, ActorDB is made out of any number |
|
of small independent and concurrent SQL databases called actors. You |
|
can think of ActorDB is a maximally sharded SQL database. Instead of |
|
splitting a database into N shards of M users, every user has his |
|
own shard in ActorDB. ActorDB is ideal as a server side database for |
|
apps. ActorDB internallly is based on SQLite running on top of a |
|
RAFT-synchronized distributed LMDB KV store. ActorDB is connectable |
|
over MySQL protocol and Thrift. |
|
|
|
%track |
|
prog actordb = { |
|
version = %{V_opkg} |
|
url = http://www.actordb.com/downloads.html |
|
regex = (__VER__)\.tar\.gz |
|
} |
|
|
|
%prep |
|
%setup -q -n actordb |
|
%patch -p0 |
|
|
|
%build |
|
export CC="%{l_cc}" |
|
export CXX="%{l_cxx}" |
|
export CFLAGS="%{l_cflags -O} -Wno-unused-function -Wno-maybe-uninitialized" |
|
export CXXFLAGS="%{l_cxxflags -O} -Wno-unused-function -Wno-maybe-uninitialized" |
|
export CPPFLAGS="%{l_cppflags}" |
|
export LDFLAGS="%{l_ldflags}" |
|
%{l_make} %{l_mflags -O} compile generate |
|
|
|
%install |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/actordb \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/actordb \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/actordb/run |
|
cp -rp rel/actordb/* \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/actordb/ |
|
mv $RPM_BUILD_ROOT%{l_prefix}/libexec/actordb/log \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/actordb/data \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/actordb/ |
|
ln -s ../../var/actordb/log \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/actordb/log |
|
ln -s ../../var/actordb/data \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/actordb/data |
|
mv $RPM_BUILD_ROOT%{l_prefix}/libexec/actordb/etc/* \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/actordb/ |
|
rmdir $RPM_BUILD_ROOT%{l_prefix}/libexec/actordb/etc |
|
ln -s ../../etc/actordb \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/actordb/etc |
|
for tool in actordb actordb_console actordb_tool; do |
|
( echo "#!/bin/sh" |
|
echo "exec %{l_prefix}/libexec/actordb/$tool \${1+\"\$@\"}" |
|
) >$RPM_BUILD_ROOT%{l_prefix}/bin/$tool |
|
chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/$tool |
|
done |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
'%config %{l_prefix}/etc/actordb/*' \ |
|
'%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/actordb/*' \ |
|
%{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
|
|
|