diff --git a/fastdb-3.75.tar.gz b/fastdb-3.75.tar.gz new file mode 100755 index 0000000000000000000000000000000000000000..99cac53d90f85700782e348b55e314a5b7d1b42f Binary files /dev/null and b/fastdb-3.75.tar.gz differ diff --git a/fastdb.spec b/fastdb.spec new file mode 100644 index 0000000000000000000000000000000000000000..f667d4e429169674667dd1c416bd8020b3f9d822 --- /dev/null +++ b/fastdb.spec @@ -0,0 +1,63 @@ +Summary: Fast In-Memory RDBMS +Name: fastdb +Version: 3.75 +Release: 1 +License: BSD +URL: http://www.ispras.ru/~knizhnik/fastdb.html +Source: fastdb-3.75.tar.gz +Patch1: fix-error.patch +Prefix: %{_prefix} +BuildRequires: gcc-c++ +Requires: gcc-c++ + +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root + +%description +FastDB is a highly efficient main memory database system with realtime +capabilities and convenient C++ interface. It is optimized for +applications with dominated read access pattern. High speed of query +execution is provided by the elimination of data transfer overhead and +a very effective locking implementation. FastDB supports +transactions, online backup and automatic recovery after system crash. +It is an application-oriented database whose tables are constructed +using information about application classes. Automatic scheme +evaluation based on classes and a flexible, convenient SQL-like +interface for retrieving data from the database. Such post-relational +capabilities as non-atomic fields, nested arrays, user-defined types +and methods, direct interobject references simplifies the design of +database applications and makes them more efficient. + +%prep +%setup -q -n fastdb +%patch1 -p1 + + +%build +CFLAGS="%{?cflags:%{cflags}}%{!?cflags:$RPM_OPT_FLAGS} -fcommon" +CXXFLAGS="%{?cxxflags:%{cxxflags}}%{!?cflags:$RPM_OPT_FLAGS} -fcommon" +export CFLAGS CXXFLAGS +%{__make} PREFIX=%{_prefix} %{?mflags} + +# Make examples dir. +%{__mkdir_p} docs/examples +%{__install} -m 644 bug* cli* guess* docs/examples/ + +%install +%{makeinstall} PREFIX=$RPM_BUILD_ROOT%{_prefix} %{?mflags_install} + +%clean +test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +%doc CHANGES docs doxygen.cfg +%{_prefix}/bin/cleanupsem +%{_prefix}/bin/inspectsem +%{_prefix}/bin/subsql +%{_includedir}/%{name} +%{_prefix}/lib/libcli* +%{_prefix}/lib/libfastdb* + +%changelog +* Mon Dec 13 2021 Peng Lei - 3.75-1 +- Init package for 3.75 diff --git a/fastdb.yaml b/fastdb.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7845c26ec8ce25a19cb236fe2f77d6effd83da29 --- /dev/null +++ b/fastdb.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: gavioto/fastdb +tag_prefix: "fastdb-" +separator: "." diff --git a/fix-error.patch b/fix-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..8b9b54ff69b2f1488255535944713d33102971c4 --- /dev/null +++ b/fix-error.patch @@ -0,0 +1,25 @@ +diff -uprN fastdb/examples/testtimeseries.cpp fastdb-test/examples/testtimeseries.cpp +--- fastdb/examples/testtimeseries.cpp 2013-02-18 03:47:32.000000000 +0800 ++++ fastdb-test/examples/testtimeseries.cpp 2021-12-14 11:17:17.960619100 +0800 +@@ -47,8 +47,8 @@ REGISTER_TEMPLATE(DailyBlock); + REGISTER(Stock); + + inline int random(unsigned mod) { return rand() % mod; } +-inline float fmax(float x, float y) { return x > y ? x : y; } +-inline float fmin(float x, float y) { return x < y ? x : y; } ++inline float ffmax(float x, float y) { return x > y ? x : y; } ++inline float ffmin(float x, float y) { return x < y ? x : y; } + + int main(int argc, char* argv[]) + { +@@ -66,8 +66,8 @@ int main(int argc, char* argv[]) + quote.timestamp = i; + quote.open = (float)random(10000)/100; + quote.close = (float)random(10000)/100; +- quote.high = fmax(quote.open, quote.close); +- quote.low = fmin(quote.open, quote.close); ++ quote.high = ffmax(quote.open, quote.close); ++ quote.low = ffmin(quote.open, quote.close); + quote.volume = random(1000); + proc.add(stockId, quote); // add new element in time series + }