Add w32api

This commit is contained in:
Ralf Corsepius
2006-03-15 17:41:56 +00:00
parent 760e8186ef
commit cab09c0bb9
3 changed files with 89 additions and 1 deletions

View File

@@ -33,6 +33,33 @@ CLEANFILES += @rpmprefix@$(TARGET)-libs.spec
noinst_DATA += @rpmprefix@$(TARGET)-libs.spec
W32API_VERS = 3.6-1
W32API_RPMREL = @VERSION@
EXTRA_DIST += target-w32api.add
EXTRA_DIST += w32api.add
W32API_SUBPACKAGES = $(top_builddir)/common/common.add
W32API_SUBPACKAGES += w32api.add
W32API_SUBPACKAGES += ../gcc/rpm-install.add
W32API_SUBPACKAGES += $(top_builddir)/common/clean.add
W32API_SUBPACKAGES += target-w32api.add
$(TARGET)-w32api.spec.in: $(W32API_SUBPACKAGES) Makefile.am
cat $(W32API_SUBPACKAGES) | sed \
-e "s/[@]W32API_VERS[@]/$(W32API_VERS)/g" \
-e "s/[@]W32API_RPMREL[@]/$(W32API_RPMREL)/g" \
-e "s,%{gcc_rpmvers},%{w32api_rpmvers},g" \
> $(TARGET)-w32api.spec.in
CLEANFILES += $(TARGET)-w32api.spec.in
@rpmprefix@$(TARGET)-w32api.spec: $(TARGET)-w32api.spec.in
$(MKSPEC) $(srcdir)/$(TARGET)-w32api.spec.in > $@
CLEANFILES += @rpmprefix@$(TARGET)-w32api.spec
noinst_DATA += @rpmprefix@$(TARGET)-w32api.spec
BINUTILS_VERS = 20050610-1
BINUTILS_RPMREL = @VERSION@
EXTRA_DIST += binutils-sources.add
@@ -89,7 +116,8 @@ $(TARGET)-gcc.spec.in: $(GCC_SUBPACKAGES) Makefile.am gcc-sources.add gcc-prep.a
-e "s/[@]GCC_VERS[@]/$(GCC_VERS)/g" \
-e "s/[@]GCC_RPMREL[@]/$(GCC_RPMREL)/g" \
-e "/[@]tool_target[@]-newlib/d" \
-e "/[@]tool_target[@]-w32api-sys-root/d" \
-e "/^BuildRequ.*[@]tool_target[@]-w32api-sys-root/d" \
-e "s,[@]tool_target[@]-w32api-sys-root,@tool_target@-w32api," \
-e 's,^%define build_newlib.*$$,%define build_newlib 0,' \
> $(TARGET)-gcc.spec.in
CLEANFILES += $(TARGET)-gcc.spec.in

View File

@@ -0,0 +1,19 @@
%files
%defattr(-,root,root,-)
%dir %{_prefix}/@tool_target@
%{_prefix}/@tool_target@/lib
%{_prefix}/@tool_target@/include
%package sys-root
Group: Development/Tools
Summary: @tool_target@ target files for gcc >= 3.4
%description sys-root
@tool_target@ target files for gcc >= 3.4
%files sys-root
%defattr(-,root,root,-)
%dir %{_prefix}/@tool_target@
%{_prefix}/@tool_target@/sys-root

View File

@@ -0,0 +1,41 @@
%define w32api_version @W32API_VERS@
%define w32api_rpmvers %{expand:%(echo @W32API_VERS@ | tr - _)}
%define _use_internal_dependency_generator 0
%define __debug_install_post %{nil}
Name: @rpmprefix@@tool_target@-w32api
Release: @W32API_RPMREL@%{?dist}
License: GPL
Group: Development/Tools
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Version: %w32api_rpmvers
Summary: Cygwin w32api Libraries
Source0: ftp://cygwin.com/pub/cygwin/release/w32api/w32api-%{w32api_version}.tar.bz2
%{?!_with_sources:NoSource: 0}
%description
Cygwin w32api libraries.
%prep
%setup -c -q
%build
rm -rf @tool_target@
mkdir -p @tool_target@
cp -a usr/lib usr/include @tool_target@
# Setup sys-root (Usable for gcc >= 3.4)
mkdir -p @tool_target@/sys-root
%{__tar} cf - usr/lib usr/include | ( cd @tool_target@/sys-root ; %{__tar} xf -)
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_prefix}
cp -a @tool_target@ $RPM_BUILD_ROOT%{_prefix}