92 lines
3.8 KiB
Plaintext
92 lines
3.8 KiB
Plaintext
# RPM macros for Fedora MinGW.
|
|
|
|
# Paths.
|
|
%_mingw32_sysroot %{_prefix}/i686-pc-mingw32/sys-root
|
|
%_mingw32_prefix %{_mingw32_sysroot}/mingw
|
|
%_mingw32_exec_prefix %{_mingw32_prefix}
|
|
%_mingw32_bindir %{_mingw32_exec_prefix}/bin
|
|
%_mingw32_sbindir %{_mingw32_exec_prefix}/sbin
|
|
%_mingw32_libexecdir %{_mingw32_exec_prefix}/libexec
|
|
%_mingw32_libdir %{_mingw32_exec_prefix}/lib
|
|
%_mingw32_datadir %{_mingw32_prefix}/share
|
|
%_mingw32_docdir %{_mingw32_prefix}/share/doc
|
|
%_mingw32_infodir %{_mingw32_prefix}/share/info
|
|
%_mingw32_mandir %{_mingw32_prefix}/share/man
|
|
%_mingw32_sysconfdir %{_mingw32_prefix}/etc
|
|
%_mingw32_sharedstatedir %{_mingw32_prefix}/com
|
|
%_mingw32_localstatedir %{_mingw32_prefix}/var
|
|
%_mingw32_includedir %{_mingw32_prefix}/include
|
|
|
|
# Build macros.
|
|
%_mingw32_host i686-pc-mingw32
|
|
%_mingw32_target i686-pc-mingw32
|
|
|
|
%_mingw32_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
|
|
|
|
%_mingw32_cc i686-pc-mingw32-gcc
|
|
%_mingw32_cpp i686-pc-mingw32-gcc -E
|
|
%_mingw32_ar i686-pc-mingw32-ar
|
|
%_mingw32_as i686-pc-mingw32-as
|
|
%_mingw32_dlltool i686-pc-mingw32-dlltool
|
|
%_mingw32_ranlib i686-pc-mingw32-ranlib
|
|
%_mingw32_strip i686-pc-mingw32-strip
|
|
%_mingw32_objdump i686-pc-mingw32-objdump
|
|
%_mingw32_nm i686-pc-mingw32-nm
|
|
%_mingw32_windres i686-pc-mingw32-windres
|
|
%_mingw32_cxx i686-pc-mingw32-g++
|
|
|
|
%_mingw32_cache mingw32-config.cache
|
|
|
|
%_mingw32_findprovides /usr/lib/rpm/mingw32-find-provides.sh
|
|
%_mingw32_findrequires /usr/lib/rpm/mingw32-find-requires.sh
|
|
|
|
%_mingw32_env HOST_CC=gcc; export HOST_CC; \
|
|
NM="%{_mingw32_nm}"; export NM; \
|
|
OBJDUMP="%{_mingw32_objdump}"; export OBJDUMP; \
|
|
PKG_CONFIG_PATH="%{_mingw32_libdir}/pkgconfig"; export PKG_CONFIG_PATH; \
|
|
CC="${MINGW_CC:-%_mingw32_cc}"; export CC; \
|
|
CXX="${MINGW_CXX:-%_mingw32_cxx}"; export CXX; \
|
|
CFLAGS="${MINGW_CFLAGS:-%_mingw32_cflags}"; export CFLAGS; \
|
|
CXXFLAGS="${MINGW_CXXFLAGS:-%_mingw32_cflags}"; export CXXFLAGS; \
|
|
for i in `ls %{_mingw32_bindir}|grep -- "-config\$"` ; do \
|
|
CONFIG_NAME=`echo $i|tr "a-z-" "A-Z_"`; \
|
|
declare -x $CONFIG_NAME="%{_mingw32_bindir}/$i" ; export $CONFIG_NAME; \
|
|
done
|
|
|
|
%_mingw32_configure %{_mingw32_env} ; \
|
|
./configure --cache-file=%{_mingw32_cache} \\\
|
|
--host=%{_mingw32_host} \\\
|
|
--build=%_build \\\
|
|
--target=%{_mingw32_target} \\\
|
|
--prefix=%{_mingw32_prefix} \\\
|
|
--exec-prefix=%{_mingw32_exec_prefix} \\\
|
|
--bindir=%{_mingw32_bindir} \\\
|
|
--sbindir=%{_mingw32_sbindir} \\\
|
|
--sysconfdir=%{_mingw32_sysconfdir} \\\
|
|
--datadir=%{_mingw32_datadir} \\\
|
|
--includedir=%{_mingw32_includedir} \\\
|
|
--libdir=%{_mingw32_libdir} \\\
|
|
--libexecdir=%{_mingw32_libexecdir} \\\
|
|
--localstatedir=%{_mingw32_localstatedir} \\\
|
|
--sharedstatedir=%{_mingw32_sharedstatedir} \\\
|
|
--mandir=%{_mingw32_mandir} \\\
|
|
--infodir=%{_mingw32_infodir}
|
|
|
|
%_mingw32_make %{_mingw32_env} ; \
|
|
make \\\
|
|
prefix=%{?buildroot:%{buildroot}}%{_mingw32_prefix} \\\
|
|
exec_prefix=%{?buildroot:%{buildroot}}%{_mingw32_exec_prefix} \\\
|
|
bindir=%{?buildroot:%{buildroot}}%{_mingw32_bindir} \\\
|
|
sbindir=%{?buildroot:%{buildroot}}%{_mingw32_sbindir} \\\
|
|
sysconfdir=%{?buildroot:%{buildroot}}%{_mingw32_sysconfdir} \\\
|
|
datadir=%{?buildroot:%{buildroot}}%{_mingw32_datadir} \\\
|
|
includedir=%{?buildroot:%{buildroot}}%{_mingw32_includedir} \\\
|
|
libdir=%{?buildroot:%{buildroot}}%{_mingw32_libdir} \\\
|
|
libexecdir=%{?buildroot:%{buildroot}}%{_mingw32_libexecdir} \\\
|
|
localstatedir=%{?buildroot:%{buildroot}}%{_mingw32_localstatedir} \\\
|
|
sharedstatedir=%{?buildroot:%{buildroot}}%{_mingw32_sharedstatedir} \\\
|
|
mandir=%{?buildroot:%{buildroot}}%{_mingw32_mandir} \\\
|
|
infodir=%{?buildroot:%{buildroot}}%{_mingw32_infodir}
|
|
|
|
%_mingw32_makeinstall %{_mingw32_make} install
|