d98f87b
Name:           fastbit
d98f87b
Version:        2.0.3
e9b05fa
Release:        16%{?dist}
d98f87b
Summary:        An Efficient Compressed Bitmap Index Technology
ce94ae5
License:        BSD
d98f87b
URL:            https://sdm.lbl.gov/fastbit/
d98f87b
Source0:        https://code.lbl.gov/frs/download.php/file/426/%{name}-%{version}.tar.gz
d98f87b
d98f87b
# Code patch to fix format truncation issue, sent to upstream ML
d98f87b
Patch0:         fastbit_format_truncation.patch
d98f87b
d98f87b
# Code patch to fix FSF address in fbmerge.cpp, sent to upstream ML
d98f87b
Patch1:         fastbit_fsf_address.patch
d98f87b
d98f87b
# Code patch to remove indentation warnings, sent to upstream ML
d98f87b
Patch2:         fastbit_indentation.patch
d98f87b
d98f87b
# Code patch to remove unused variable warnings, sent to upstream ML
d98f87b
Patch3:         fastbit_unused_variable.patch
d98f87b
74d58bf
# Build system patch to ensure linkage to pthread
74d58bf
Patch10:        fastbit_pthread_linkage.patch
74d58bf
d98f87b
# Build system patch for tests to use compiled binaries, not libtool wrappers
74d58bf
Patch11:        fastbit_tests_use_binaries.patch
d98f87b
102a508
# Build system patch to avoid versioning the JNI shared library (plugin)
74d58bf
Patch12:        fastbit_jni_avoid_version.patch
d98f87b
d98f87b
# Fedora patch for java bindings to use System.load not System.loadLibrary
74d58bf
Patch20:        fastbit_java_system_load.patch
d98f87b
d98f87b
BuildRequires:  autoconf
d98f87b
BuildRequires:  automake
d98f87b
BuildRequires:  gcc-c++
d98f87b
BuildRequires:  java-devel
1005a6e
BuildRequires:  javapackages-tools
d98f87b
BuildRequires:  perl-interpreter
d98f87b
e9b05fa
ExcludeArch:    s390x
e9b05fa
d98f87b
%description
d98f87b
FastBit is an open-source data processing library following the spirit of NoSQL
d98f87b
movement. It offers a set of searching functions supported by compressed bitmap
d98f87b
indexes. It treats user data in the column-oriented manner similar to
d98f87b
well-known database management systems such as Sybase IQ, MonetDB, and Vertica.
d98f87b
It is designed to accelerate user's data selection tasks without imposing undue
d98f87b
requirements.
d98f87b
d98f87b
%package devel
d98f87b
Summary: FastBit development
d98f87b
Requires: %{name}%{?_isa} = %{version}-%{release}
d98f87b
%description devel
d98f87b
Development package for FastBit.  Includes headers, libraries and man pages for
d98f87b
using FastBit API.
d98f87b
d98f87b
%package java
d98f87b
Summary: FastBit Java libraries
d98f87b
Requires: %{name}%{?_isa} = %{version}-%{release}
d98f87b
%description java
d98f87b
FastBit API bindings for java using JNI.
d98f87b
d98f87b
%prep
db80d7b
%autosetup -p1 -n %{name}-%{version}
db80d7b
db80d7b
# remove bundled jars before build as required
db80d7b
rm -f java/tests/lib/commons-logging.jar
db80d7b
rm -f java/tests/lib/log4j-1.2.15.jar
db80d7b
rm -f java/tests/lib/junit-4.4.jar
db80d7b
db80d7b
echo fixing permissions ...
d98f87b
find . -type f -perm /0111 \
d98f87b
    \( -name \*.cpp -or -name \*.h -or -name \*.yy -or -name \*.ll -or \
db80d7b
       -name \*.html -or -name README \) -print -exec chmod 0644 {} \;
d98f87b
d98f87b
%build
33eb562
aclocal -I tests/m4
33eb562
autoconf
33eb562
automake --copy --no-force
d98f87b
%configure \
d98f87b
    --disable-static \
d98f87b
    --enable-contrib \
d98f87b
    --with-quiet-nan \
d98f87b
    --with-java=%{java_home}
d98f87b
# patch libtool to remove rpaths
d98f87b
sed -i 's|^hardcode_into_libs=.*|hardcode_into_libs=no|g' libtool
d98f87b
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
d98f87b
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
db80d7b
%make_build
d98f87b
d98f87b
%check
d98f87b
# The test binaries need LD_LIBRARY_PATH to find the compiled fastbit library
d98f87b
# in the build tree.
f17be76
%make_build LD_LIBRARY_PATH="%{buildroot}%{_libdir};%{_libdir}" check
d98f87b
d98f87b
%install
d98f87b
%make_install
d98f87b
d98f87b
# move jar file to _jnidir, as required
d98f87b
install -d -m 0755 %{buildroot}%{_jnidir}
d98f87b
mv %{buildroot}%{_libdir}/fastbitjni.jar %{buildroot}%{_jnidir}/%{name}.jar
d98f87b
chmod 0644 %{buildroot}%{_jnidir}/%{name}.jar
d98f87b
d98f87b
# move JNI shared library to _libdir/name, as required
d98f87b
install -d -m 0755 %{buildroot}%{_libdir}/%{name}
d98f87b
mv %{buildroot}%{_libdir}/libfastbitjni.so %{buildroot}%{_libdir}/%{name}/
d98f87b
d98f87b
# remove libtool archives
d98f87b
find %{buildroot} -name \*.la | xargs rm -f
d98f87b
7085484
%ldconfig_scriptlets
7085484
%ldconfig_scriptlets -n devel
7085484
d98f87b
%files
d98f87b
%doc NEWS README
d98f87b
%license COPYING
d98f87b
%{_docdir}/%{name}/*.html
d98f87b
%{_bindir}/ardea
d98f87b
%{_bindir}/fbmerge
d98f87b
%{_bindir}/ibis
d98f87b
%{_bindir}/rara
d98f87b
%{_bindir}/tcapi
d98f87b
%{_bindir}/thula
d98f87b
%{_bindir}/tiapi
d98f87b
%{_libdir}/libfastbit.so.*
d98f87b
d98f87b
%files devel
d98f87b
%dir %{_prefix}/include/%{name}
d98f87b
%{_prefix}/include/%{name}/*.{h,hh}
d98f87b
%{_bindir}/fastbit-config
d98f87b
%{_libdir}/libfastbit.so
d98f87b
d98f87b
%files java
d98f87b
%dir %{_libdir}/%{name}
d98f87b
%{_libdir}/%{name}/libfastbitjni.so
d98f87b
%{_jnidir}/%{name}.jar
d98f87b
d98f87b
%changelog
e9b05fa
* Wed Feb 5 2020 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-16
e9b05fa
- Exclude arch s390x
e9b05fa
284ab45
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-15
284ab45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
284ab45
e9b05fa
* Wed Sep 11 2019 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-14
ce94ae5
- Rebuild for unretire
ce94ae5
- License is BSD only
ce94ae5
e9b05fa
* Fri Sep 6 2019 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-13
db80d7b
- Remove unnecessary build dependencies
db80d7b
- Improve packaging conformance
db80d7b
e9b05fa
* Wed Jun 19 2019 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-12
f17be76
- Use make_build macro instead of make
f17be76
e9b05fa
* Wed Jun 19 2019 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-11
4ca2468
- Replace __make macro with make
4ca2468
e9b05fa
* Wed Jun 19 2019 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-10
33eb562
- Stop using autotools macros that were removed from rpm
33eb562
1cfdaba
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-9
1cfdaba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
1cfdaba
2b7d915
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-8
2b7d915
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2b7d915
e9b05fa
* Fri May 25 2018 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-7
1005a6e
- Add BuildRequires javapackages-tools for needed rpm macros
1005a6e
c3e2963
* Wed Mar 07 2018 Adam Williamson <awilliam@redhat.com> - 2.0.3-6
c3e2963
- Rebuild to fix GCC 8 mis-compilation
c3e2963
  See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64")
c3e2963
e9b05fa
* Sat Feb 10 2018 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-5
7085484
- Use new ldconfig_scriptlets macro.
7085484
f9bbac8
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-4
f9bbac8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f9bbac8
e9b05fa
* Tue Jan 23 2018 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-3
74d58bf
- Ensure linkage to pthread (for ld flag -z defs).
74d58bf
e9b05fa
* Wed Dec 20 2017 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-2
102a508
- Fix minor typos in spec.
102a508
e9b05fa
* Tue Oct 10 2017 Philip Kovacs <pkfed@fedoraproject.org> - 2.0.3-1
d98f87b
- Packaging for Fedora.