LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File strusmodule.spec of Package strusmodule (Project home:PatrickFrey)

# StrusModule spec file

# Set distribution based on some OpenSuse and distribution macros
# this is only relevant when building on https://build.opensuse.org
###

%define rhel 0
%define rhel6 0
%define rhel7 0
%if 0%{?rhel_version} >= 600 && 0%{?rhel_version} <= 699
%define dist rhel6
%define rhel 1
%define rhel6 1
%endif
%if 0%{?rhel_version} >= 700 && 0%{?rhel_version} <= 799
%define dist rhel7
%define rhel 1
%define rhel7 1
%endif

%define centos 0
%define centos6 0
%define centos7 0
%if 0%{?centos_version} >= 600 && 0%{?centos_version} <= 699
%define dist centos6
%define centos 1
%define centos6 1
%endif
%if 0%{?centos_version} >= 700 && 0%{?centos_version} <= 799
%define dist centos7
%define centos 1
%define centos7 1
%endif

%define scilin 0
%define scilin6 0
%define scilin7 0
%if 0%{?scientificlinux_version} >= 600 && 0%{?scientificlinux_version} <= 699
%define dist scilin6
%define scilin 1
%define scilin6 1
%endif
%if 0%{?scientificlinux_version} >= 700 && 0%{?scientificlinux_version} <= 799
%define dist scilin7
%define scilin 1
%define scilin7 1
%endif

%define fedora 0
%define fc24 0
%define fc25 0
%define fc26 0
%define fc27 0
%define frawhide 0
%if 0%{?fedora_version} == 24
%define dist fc24
%define fc24 1
%define fedora 1
%endif
%if 0%{?fedora_version} == 25
%define dist fc25
%define fc25 1
%define fedora 1
%endif
%if 0%{?fedora_version} == 26
%define dist fc26
%define fc26 1
%define fedora 1
%endif
%if 0%{?fedora_version} == 27
%define dist fc27
%define fc27 1
%define fedora 1
%endif
%if 0%{?fedora_version} == 99
%define dist frawhide
%define frawhide 1
%define fedora 1
%endif

%define suse 0

%define osu 0
%define osutumbleweed 0
%define osuleap 0
%define osuleap15 0
%define osuleap423 0
%if 0%{?suse_version} > 1500
%define dist osutumbleweed
%define osutumbleweed 1
%define osu 1
%define suse 1
%endif
%if 0%{?sle_version} == 150000 && 0%{?is_opensuse}
%define dist osuleap15
%define osuleap15 1
%define osuleap 1
%define osu 1
%define suse 1
%endif
%if 0%{?sle_version} == 120300 && 0%{?is_opensuse}
%define dist osuleap423
%define osuleap423 1
%define osuleap 1
%define osu 1
%define suse 1
%endif

%define sles 0
%define sles11 0
%define sles11sp4 0
%define sles12 0
%define sles12sp1 0
%define sles12sp2 0
%define sles12sp3 0
%define sles12sp4 0
%if 0%{?sles_version} == 11
%define dist sles11
%define sles11sp4 1
%define sles11 1
%define sles 1
%define suse 1
%endif
%if 0%{?suse_version} == 1315 && !0%{?is_opensuse}
%define dist sles12
%define sles12 1
%define sles 1
%define suse 1
%endif
%if 0%{?sle_version} == 120000 && !0%{?is_opensuse}
%define dist sles12
%define sles12 1
%define sles 1
%define suse 1
%endif
%if 0%{?sle_version} == 120100 && !0%{?is_opensuse}
%define dist sles12sp1
%define sles12sp1 0
%define sles12 1
%define sles 1
%define suse 1
%endif
%if 0%{?sle_version} == 120200 && !0%{?is_opensuse}
%define dist sles12sp2
%define sles12sp2 0
%define sles12 1
%define sles 1
%define suse 1
%endif
%if 0%{?sle_version} == 120300 && !0%{?is_opensuse}
%define dist sles12sp3
%define sles12sp3 0
%define sles12 1
%define sles 1
%define suse 1
%endif
%if 0%{?sle_version} == 120400 && !0%{?is_opensuse}
%define dist sles12sp4
%define sles12sp4 0
%define sles12 1
%define sles 1
%define suse 1
%endif

Summary: Library implementing the loading of modules for a text search engine
Name: strusmodule
%define main_version 0.16.0
%define dep_version 0.16
Version: %{main_version}.0
Release: 0.16
License: MPLv2
Group: Development/Libraries/C++

Source: %{name}_%{main_version}.tar.gz

URL: http://project-strus.net

BuildRoot: %{_tmppath}/%{name}-root

# Build dependencies
###

# OBS doesn't install the minimal set of build tools automatically
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake

# LinuxDistribution.cmake depends depends on the Linux release files in '/etc' or
# LSB files
%if %{rhel}
BuildRequires: redhat-release
%endif
%if %{centos}
BuildRequires: centos-release
%endif
%if %{scilin}
BuildRequires: sl-release
%endif
%if %{fedora} && !0%{?opensuse_bs}
BuildRequires: fedora-release
%endif
%if %{fedora} && 0%{?opensuse_bs}
BuildRequires: generic-release
%endif
%if %{osu}
BuildRequires: openSUSE-release
%endif
%if %{sles}
%if %{sles12}
#exists in sles12, missing on OBS!
#BuildRequires: sles-release
%else
BuildRequires: sles-release
%endif
%endif

%if %{fedora}
%if %{fc27} || %{frawhide}
%global debug_package %{nil}
%endif
%endif

%if %{rhel} || %{centos} || %{scilin} || %{fedora}
%if %{rhel6} || %{centos6} || %{scilin6} || %{rhel7} || %{centos7} || %{scilin7}
Requires: strusboost >= 1.57.0
BuildRequires: strusboost-devel >= 1.57.0
%else
Requires: boost >= 1.57.0
Requires: boost-thread >= 1.57.0
Requires: boost-system >= 1.57.0
Requires: boost-date-time >= 1.57.0
Requires: boost-regex >= 1.57.0
BuildRequires: boost-devel >= 1.57.0
%endif
%endif

%if %{suse}
%if %{sles11} || %{sles12} || %{osuleap423}
Requires: strusboost >= 1.57.0
BuildRequires: strusboost-devel >= 1.57.0
%endif
%if %{osutumbleweed}
Requires: libboost_thread1_66_0 >= 1.66.0
Requires: libboost_atomic1_66_0 >= 1.66.0
Requires: libboost_system1_66_0 >= 1.66.0
Requires: libboost_date_time1_66_0 >= 1.66.0
Requires: libboost_regex1_66_0 >= 1.66.0
BuildRequires: libboost_thread1_66_0-devel >= 1.66.0
BuildRequires: libboost_atomic1_66_0-devel >= 1.66.0
BuildRequires: libboost_system1_66_0-devel >= 1.66.0
BuildRequires: libboost_date_time1_66_0-devel >= 1.66.0
BuildRequires: libboost_regex1_66_0-devel >= 1.66.0
%endif
%endif

BuildRequires: strusbase-devel >= %{dep_version}
BuildRequires: strusbase >= %{dep_version}
BuildRequires: strus-devel >= %{dep_version}
BuildRequires: strus >= %{dep_version}
BuildRequires: strusanalyzer-devel >= %{dep_version}
BuildRequires: strusanalyzer >= %{dep_version}
BuildRequires: strustrace-devel >= %{dep_version}
BuildRequires: strustrace >= %{dep_version}
Requires: strusbase >= %{dep_version}
Requires: strus >= %{dep_version}
Requires: strusanalyzer >= %{dep_version}
Requires: strustrace >= %{dep_version}

# Check if 'Distribution' is really set by OBS (as mentioned in bacula)
%if ! 0%{?opensuse_bs}
Distribution: %{dist}
%endif

Packager: Patrick Frey <patrickpfrey@yahoo.com>

%description
Library implementing the loading of dynalically loadable of a text search engine.

%package devel
Summary: Development files for strusmodule
Group: Development/Libraries/C++

%description devel
The libraries and header files used for development with strus.

Requires: %{name} >= %{main_version}-%{release}

%prep
%setup -n %{name}-%{main_version}

%build

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DLIB_INSTALL_DIR=%{_lib} ..
make %{?_smp_mflags}

%install

cd build
make DESTDIR=$RPM_BUILD_ROOT install

# TODO: avoid building this stuff in cmake. how?
rm -rf $RPM_BUILD_ROOT%{_libdir}/debug
rm -rf $RPM_BUILD_ROOT%{_prefix}/src/debug

%clean
rm -rf $RPM_BUILD_ROOT

%check
cd build
make test

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr( -, root, root )
%dir %{_libdir}/strus
%{_bindir}/strusModuleInfo
%{_libdir}/strus/libstrus_module.so.0.16
%{_libdir}/strus/libstrus_module.so.0.16.0
%{_libdir}/strus/libstrus_module_analyzer.so.0.16
%{_libdir}/strus/libstrus_module_analyzer.so.0.16.0
%{_libdir}/strus/libstrus_module_storage.so.0.16
%{_libdir}/strus/libstrus_module_storage.so.0.16.0
%{_libdir}/strus/libstrus_module_trace.so.0.16
%{_libdir}/strus/libstrus_module_trace.so.0.16.0
%dir %{_libdir}/strus/modules

%files devel
%defattr( -, root, root )
%{_libdir}/strus/libstrus_module.so
%{_libdir}/strus/libstrus_module_analyzer.so
%{_libdir}/strus/libstrus_module_storage.so
%{_libdir}/strus/libstrus_module_trace.so
%dir %{_includedir}/strus
%{_includedir}/strus/*.hpp
%dir %{_includedir}/strus/lib
%{_includedir}/strus/lib/*.hpp

%changelog
* Fri May 11 2018 Patrick Frey <patrickpfrey@yahoo.com> 0.16.0-0.1

* Thu Mar 15 2018 Patrick Frey <patrickpfrey@yahoo.com> 0.15.7-0.1
- added make target cppcheck for static code analysis
- adapted changes in error handling defined in strus base: simplified error codes
- make cmake variables CMAKE_MODULE_DIRECTORIES and CMAKE_MODULE_EXTENSION configurable

* Mon Feb 12 2018 Patrick Frey <patrickpfrey@yahoo.com> 0.15.6-0.1
- added some functions for introspection needed by the webservice
- adapted error handling to changes in base: mandatory error codes everywhere

* Fri Dec 29 2017 Patrick Frey <patrickpfrey@yahoo.com> 0.15.5-0.1
- fixed several build issues: Build with Clang, Fix bugs in travis build

* Mon Dec 4 2017 Patrick Frey <patrickpfrey@yahoo.com> 0.15.4-0.1
- added -Wshadow for C++ build

* Fri Oct 13 2017 Patrick Frey <patrickpfrey@yahoo.com> 0.15.3-0.1
- RPath fixes and some CMake file reorganization

* Wed Sep 27 2017 Patrick Frey <patrickpfrey@yahoo.com> 0.15.2-0.1
- bring up travis build, some minor fixes

* Mon Sep 4 2017 Patrick Frey <patrickpfrey@yahoo.com> 0.15.1-0.1
- release to cleanup mess with missing CHANGELOG in 0.15.0

* Sun Sep 3 2017 Patrick Frey <patrickpfrey@yahoo.com> 0.15.0-0.1
- remove hardcoded setting of C++98 in CMake files
- strenghten rules for printf style functions in the interface: issue warnings on wrong format string parameter lists for gcc
- adapt interface changes in strus core,analyzer and base
- many CMake build fixes

* Wed Feb 15 2017 Patrick Frey <patrickpfrey@yahoo.com> 0.14.0-0.1
- adapt interface changes in strus core

* Mon Feb 6 2017 Patrick Frey <patrickpfrey@yahoo.com> 0.13.0-0.1
- adapted interface changes in analyzer and strus core
- forbid some implicit module header constructors
- added program strusModuleInfo to check module version
- many build fixes

* Sat Oct 1 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.12.0-0.1
- adapted interface changes of strus analyzer

* Wed Sep 28 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.11.0-0.1
- added vector space model to object builder and make definable by module

* Tue Jul 5 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.10.0-0.1
- version increment along other strus modules

* Tue May 10 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.9.1-0.1
- added support for JSON loaded by default

* Thu Apr 28 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.9.0-0.1
- changes in the object builder interfaces

* Sun Apr 24 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.8.2-0.1
- version for solving version mismatch on OBS

* Sun Apr 24 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.8.1-0.1
- added method call trace processor modules

* Wed Apr 13 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.8.0-0.1
- moved libstrus_utils (no named libstrus_base) and libstrus_error to new project strusbase (strus depends now on strusbase)
- introduced dependency to strustrace

* Wed Mar 30 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.7.0-0.1
- adapted interface changes from strus core: introducing scalar function objects used for combining ranking functions or to pass functions to weighting functions or summarizers
- make scalar functions loadable from modules

* Mon Mar 21 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.6.0-0.1
- changed license from GPLv3 to MPLv2 (Mozilla Public License, Version 2)

* Sun Mar 6 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.5.0-0.1
- adapted core interface changes

* Sun Jan 17 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.4.1-0.1
- fix typos in src license reference

* Sat Jan 2 2016 Patrick Frey <patrickpfrey@yahoo.com> 0.4.0-0.1
- increment minor version number with the strus core

* Mon Dec 21 2015 Patrick Frey <patrickpfrey@yahoo.com> 0.3.1-0.1
- fixing versioning problems of the Open Suse build cluster 

* Fri Dec 18 2015 Patrick Frey <patrickpfrey@yahoo.com> 0.3.0-0.1
- adapted core interface changes: better introspection for functions
- adapted core interface changes: removed docno allocator interface and fdatasync on every new document insert when not using the docno allocator

* Tue Dec 1 2015 Patrick Frey <patrickpfrey@yahoo.com> 0.2.6-0.1
- adapted interface changes in core: added interfaces for introspection (user names, docids, term types, term values)

* Mon Nov 30 2015 Patrick Frey <patrickpfrey@yahoo.com> 0.2.5-0.1
- change interface for defining peer message processing

* Thu Nov 26 2015 Patrick Frey <patrickpfrey@yahoo.com> 0.2.4-0.1
- incremented version to 0.2.4 to resolve OBS trouble with dependencies

* Tue Nov 24 2015 Patrick Frey <patrickpfrey@yahoo.com> 0.2.3-0.1
- synchronize version number with strus core
- define package dependency to strus* not to patch version but to minor version

* Tue Nov 24 2015 Patrick Frey <patrickpfrey@yahoo.com> 0.2.2-0.1
- dynamically generated version number in packages

* Wed Nov 11 2015 Patrick Frey <patrickpfrey@yahoo.com> 0.2.0-0.1
- fixed wrong call of getDatabase with database name as parameter instead of configuration string
- fixed module loader test for out-of-source builds
- updated OBS package build support
- fixed type (came in with changing to exception free interface)
- added dependency of loader test to generated header file
- do not checkin cmake generated files
- adapted interface changes in analyzer
- return boolean (success/failure) in loadModule method
- adapting to strus utils interface changes
- build with visibility hidden
- adapted changes in error buffer interface
- make module interface exception safe
- make visibility default (all visible) for temporarily enable exceptions

* Wed Aug 12 2015 Patrick Frey <patrickpfrey@yahoo.com> v0.1.5-0.1
- adapted peer message handling redesign from strus core and added peer message processor interface as storage module part
- put common CMAKE stuff of all strus relaed projects into includes
- removed wrong include of programLoader.hpp that is part of strusUtilities

* Tue Jul 14 2015 Patrick Frey <patrickpfrey@yahoo.com> v0.1.4-0.1
- added document class detector to module interface
- adapted some namings from strusAnalyzer

* Sun Jul 5 2015 Patrick Frey <patrickpfrey@yahoo.com> v0.1.2-0.1
- updated documentation

* Fri Jul 3 2015 Patrick Frey <patrickpfrey@yahoo.com> v0.1.1-0.1
- Initial revision