OBS-URL: https://build.opensuse.org/request/show/158046 OBS-URL: https://build.opensuse.org/package/show/devel:languages:erlang/erlang-snappy-nif?expand=0&rev=2
52 lines
1.4 KiB
RPMSpec
52 lines
1.4 KiB
RPMSpec
# norootforbuild
|
|
|
|
%define pkg_name snappy-erlang-nif
|
|
Name: erlang-snappy-nif
|
|
Version: 2013.01.03
|
|
Release: 1
|
|
Group: Development/Libraries/Other
|
|
License: Apache-2.0
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: erlang >= R13B04
|
|
BuildRequires: snappy-devel
|
|
BuildRequires: unzip
|
|
URL: https://github.com/fdmanana/snappy-erlang-nif
|
|
Source0: %{pkg_name}-master-%{version}.zip
|
|
# PATCH-FIX-UPSTREAM use-sys-snappy.diff -- do not use included snappy lib but the one from the system
|
|
Patch0: use-sys-snappy.diff
|
|
# PATCH-FIX-UPSTREAM fix-require_otp_vsn.patch -- do not require old versions of erlang which we don't have
|
|
Patch1: fix-require_otp_vsn.patch
|
|
|
|
Summary: Erlang NIF wrapper for snappy
|
|
%description
|
|
An Erlang NIF wrapper for Google's snappy compressor/decompressor
|
|
|
|
%prep
|
|
%setup -q -n %{pkg_name}-master
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%__rm -rf c_src/snappy/
|
|
|
|
%build
|
|
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
|
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
|
make
|
|
|
|
%install
|
|
for dir in ebin priv ; do
|
|
%{__install} -d %{buildroot}%{_libdir}/erlang/lib/%{name}-%{version}/${dir}
|
|
%{__install} ${dir}/* %{buildroot}%{_libdir}/erlang/lib/%{name}-%{version}/${dir}/
|
|
done
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc README.md
|
|
%dir %{_libdir}/erlang/lib/%{name}-%{version}
|
|
%{_libdir}/erlang/lib/%{name}-%{version}/*
|
|
|
|
%changelog
|