2020-01-22 09:46:17 +00:00
|
|
|
%define _prefix /usr
|
|
|
|
%define _sysconfdir /etc
|
|
|
|
|
2022-03-23 15:15:41 +00:00
|
|
|
%define enable_mod_ffi 0
|
|
|
|
|
2020-01-22 09:46:17 +00:00
|
|
|
Summary: HAWK Interpreter
|
|
|
|
Name: @PACKAGE_NAME@
|
|
|
|
Version: @PACKAGE_VERSION@
|
|
|
|
Release: 1%{?dist}
|
|
|
|
License: Simplified BSD License
|
|
|
|
Vendor: Chung, Hyung-Hwan
|
|
|
|
URL: @PACKAGE_URL@
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
#Requires:
|
|
|
|
|
2022-03-23 15:15:41 +00:00
|
|
|
BuildRequires: mysql-devel
|
|
|
|
%if %{enable_mod_ffi}
|
2022-03-23 17:11:02 +00:00
|
|
|
## prep_cif_var() available since 3.0.11
|
|
|
|
BuildRequires: libffi-devel >= 3.0.11
|
2022-03-23 15:15:41 +00:00
|
|
|
%endif
|
2020-01-22 09:46:17 +00:00
|
|
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
|
|
|
|
|
%description
|
|
|
|
HAWK Interpreter
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for HAWK
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
Requires: @PACKAGE_NAME@ = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
The header files and libraries for developing applications with HAWK.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
RPM_OPT_FLAGS="$(echo $RPM_OPT_FLAGS | %{__sed} 's/-O2/-O3/')"
|
2020-09-24 13:45:44 +00:00
|
|
|
|
2020-10-13 17:42:10 +00:00
|
|
|
##CFLAGS="${RPM_OPT_FLAGS} -fPIC" CXXFLAGS="${RPM_OPT_FLAGS} -fPIC -std=c++11" ./configure \
|
|
|
|
CFLAGS="${RPM_OPT_FLAGS} -fPIC" CXXFLAGS="${RPM_OPT_FLAGS} -fPIC" ./configure \
|
2020-09-24 13:45:44 +00:00
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--sysconfdir=%{_sysconfdir} \
|
|
|
|
--enable-static=yes \
|
|
|
|
--enable-shared=no \
|
|
|
|
--enable-static-module=yes \
|
|
|
|
--enable-dynamic-module=yes \
|
|
|
|
--enable-wide-char="yes:2w" \
|
|
|
|
--enable-intmax=no \
|
|
|
|
--enable-fltmax=no \
|
|
|
|
--enable-cxx=yes \
|
|
|
|
--enable-pthread-flags=yes \
|
|
|
|
--enable-libltdl=no \
|
|
|
|
--enable-libunwind=no \
|
2022-03-23 15:15:41 +00:00
|
|
|
%if %{enable_mod_ffi}
|
2021-08-19 19:45:48 +00:00
|
|
|
--enable-mod-ffi=yes \
|
2022-03-23 15:15:41 +00:00
|
|
|
%else
|
|
|
|
--enable-mod-ffi=no \
|
|
|
|
%endif
|
2021-08-19 19:45:48 +00:00
|
|
|
--with-mysql=yes \
|
2021-08-17 17:38:16 +00:00
|
|
|
--enable-mod-mysql=yes \
|
2022-04-08 07:19:48 +00:00
|
|
|
--enable-mod-sed=yes \
|
2020-09-24 13:45:44 +00:00
|
|
|
--enable-mod-uci=no ##CC=gcc44 CXX=g++44
|
|
|
|
|
2020-01-22 09:46:17 +00:00
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
2021-08-19 20:10:05 +00:00
|
|
|
##rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
2020-01-22 09:46:17 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
|
2020-01-22 10:14:18 +00:00
|
|
|
rm -f $RPM_BUILD_ROOT%{_bindir}/uni-case
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_bindir}/uni-prop
|
2020-04-16 06:17:12 +00:00
|
|
|
rm -f $RPM_BUILD_ROOT%{_bindir}/hawk[0-9][0-9] ## delete binaries from the samples directory
|
2020-01-22 09:46:17 +00:00
|
|
|
|
2020-04-16 03:42:30 +00:00
|
|
|
%check
|
|
|
|
make check
|
|
|
|
|
2020-01-22 09:46:17 +00:00
|
|
|
%clean
|
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/*
|
|
|
|
%{_libdir}/*.a
|
2021-08-19 20:10:05 +00:00
|
|
|
%{_libdir}/*.la
|