qse/pkgs/qse.spec.in

119 lines
2.8 KiB
RPMSpec
Raw Normal View History

2021-08-17 08:23:17 +00:00
%define _prefix /usr
2021-08-17 07:54:27 +00:00
%define _sysconfdir /etc
%define _nowidechar_prefix /opt/qse-nowidechar
%define _nowidechar_libdir %{_nowidechar_prefix}/%{_lib}
2021-08-17 07:54:27 +00:00
Summary: QSE Library
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
2021-08-17 07:54:27 +00:00
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:
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
#BuildPrereq:
%description
QSE Library
%package devel
Summary: Development files for QSE
Group: System Environment/Libraries
2021-08-17 08:23:17 +00:00
Requires: @PACKAGE_NAME@ = %{version}
2021-08-17 07:54:27 +00:00
%description devel
The header files and libraries for developing applications with QSE.
%package nowidechar
Summary: Development files for QSE Non-Widechar
Group: System Environment/Libraries
%description nowidechar
The header files and libraries for developing applications with QSE Non-Widechar.
The nowidecharchar version is retained for building legacy applications.
2021-08-17 07:54:27 +00:00
%prep
%setup -q
%build
RPM_OPT_FLAGS="$(echo $RPM_OPT_FLAGS | %{__sed} 's/-O2/-O3/')"
#CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE" CXXFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --enable-shared=no --enable-static=no --enable-wide-char=yes:2w --enable-syscall=no --enable-cxx=yes --enable-pthread_flags=yes
mkdir bld-wide
pushd bld-wide
CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" ../configure \
2021-08-17 07:54:27 +00:00
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir} \
--enable-shared=no \
--enable-static=yes \
--enable-wide-char=yes \
--enable-bundled-unicode=no \
--enable-xcmgrs=yes \
--enable-syscall=no \
--enable-debug=no \
--enable-cxx=yes \
--enable-pthread_flags=yes ##CC=gcc44 CXX=g++44
make
popd
mkdir bld-no-wide
pushd bld-no-wide
CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" ../configure \
--prefix=%{_nowidechar_prefix} \
--libdir=%{_nowidechar_libdir} \
--enable-shared=no \
--enable-static=yes \
--enable-wide-char=no \
--enable-bundled-unicode=no \
--enable-xcmgrs=yes \
--enable-syscall=no \
--enable-debug=no \
--enable-cxx=yes \
--enable-pthread_flags=yes ##CC=gcc44 CXX=g++44
make
popd
2021-08-17 07:54:27 +00:00
%install
pushd bld-wide
2021-08-17 07:54:27 +00:00
make install DESTDIR=$RPM_BUILD_ROOT
popd
pushd bld-no-wide
make install DESTDIR=$RPM_BUILD_ROOT
popd
##rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
2021-08-17 07:54:27 +00:00
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
rm -rf $RPM_BUILD_ROOT%{_nowidechar_libdir}/pkgconfig
2021-08-17 07:54:27 +00:00
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/*
%{_sysconfdir}/qse/*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.a
%{_libdir}/*.la
%files nowidechar
%defattr(-,root,root)
%{_nowidechar_prefix}/*