File mingw32-texlive.spec of Package mingw32-texlive

%define __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides}
%define __os_install_post %{_mingw32_debug_install_post} \
                          %{_mingw32_install_post}

Name:           mingw32-texlive
Version:        2009
Release:        0
Summary:        The Base System of TeXLive
License:        GPL v2 or later ; TeX-License ..
Group:          Development/Libraries
Source0:        ftp://tug.org/historic/systems/texlive/2009/texlive-20091011-source.tar.xz
Source1000:     %{name}-rpmlintrc
Patch0:         texlive-20091011-source-initnew.patch
Patch1:         texlive-20091011-source-undefined.patch
Patch2:         texlive-20091011-source-getopt.patch
Patch1000:      texlive-20091011-source-wix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
#!BuildIgnore: post-build-checks

BuildRequires:  mingw32-filesystem >= 25
BuildRequires:  mingw32-cross-gcc
BuildRequires:  xz
BuildRequires:  wixwine

%description
This package is currently empty. Only mingw32-texlive-devel has
some files.


%package devel
License:        GPL v2 or later ; TeX-License ..
Summary:        The headers and library of the Kpathsea tools
Group:          Development/Libraries

%description devel
The purpose of the Kpathsea library is to return a file name from a
list of directories.  This package provides the static library and the
header files for compiling and linking programs with Kpathsea support.
For the normal use of TeX and LaTeX, this package is not required.

%{_mingw32_debug_package}


%prep
%setup -c -q -n texlive -T
tar --use-compress-program=xz --strip-components=1 -xf %{S:0}
%patch0 -p1 -b .initnew
%patch1 -p1 -b .undefined
%patch2 -p1 -b .getopt
%patch1000 -p1 -b .wix

%build
%{_mingw32_configure} \
	--enable-shared \
	--disable-native-texlive-build \
	--disable-xetex

cd texk/kpathsea
%{_mingw32_make}

echo "Name: libkpathsea" > libkpathsea.pc
echo "Description: TeX path search library" >> libkpathsea.pc
echo "Version: %{version}" >> libkpathsea.pc
echo "" >> libkpathsea.pc
echo "prefix=%{_mingw32_prefix}" >> libkpathsea.pc
echo "Libs: -lkpathsea" >> libkpathsea.pc
echo "Cflags: -L%{_mingw32_bindir}" >> libkpathsea.pc
echo "Wixlibs=%{_mingw32_datadir}/wixlib/libkpathsea.wixlib" >> libkpathsea.pc
echo "Fualflags=-C libkpathsea -D libkpathsea" >> libkpathsea.pc

candle -o libkpathsea.wixobj libkpathsea.wxs
lit -o libkpathsea.wixlib -bf libkpathsea.wixobj


%install
rm -rf $RPM_BUILD_ROOT

cd texk/kpathsea
%{_mingw32_make} DESTDIR=$RPM_BUILD_ROOT install

mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}/pkgconfig
cp libkpathsea.pc $RPM_BUILD_ROOT%{_mingw32_libdir}/pkgconfig/libkpathsea.pc

mkdir -p $RPM_BUILD_ROOT%{_mingw32_datadir}/wixlib
cp libkpathsea.wixlib $RPM_BUILD_ROOT%{_mingw32_datadir}/wixlib/libkpathsea.wixlib


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%{_mingw32_bindir}/libkpathsea-5.dll
%{_mingw32_bindir}/kpseaccess.exe
%{_mingw32_bindir}/kpsereadlink.exe
%{_mingw32_bindir}/kpsestat.exe
%{_mingw32_bindir}/kpsewhich.exe
%{_mingw32_bindir}/mktexlsr
%{_mingw32_bindir}/mktexmf
%{_mingw32_bindir}/mktexpk
%{_mingw32_bindir}/mktextfm
%{_mingw32_datadir}/man
%{_mingw32_datadir}/info
%{_mingw32_prefix}/texmf

%files devel
%defattr(-,root,root)
%{_mingw32_libdir}/libkpathsea.a
%{_mingw32_libdir}/libkpathsea.dll.a
%{_mingw32_includedir}/kpathsea
%{_mingw32_libdir}/pkgconfig/libkpathsea.pc
%{_mingw32_datadir}/wixlib/libkpathsea.wixlib


%changelog
openSUSE Build Service is sponsored by