hawk/pkgs/hawk.spec.in

98 lines
2.1 KiB
RPMSpec
Raw Permalink Normal View History

2020-01-22 09:46:17 +00:00
%define _prefix /usr
%define _sysconfdir /etc
%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:
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
%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 \
%if %{enable_mod_ffi}
--enable-mod-ffi=yes \
%else
--enable-mod-ffi=no \
%endif
--with-mysql=yes \
--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
##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
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
%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
%{_libdir}/*.la