summaryrefslogtreecommitdiffstats
path: root/cygwin.spec
diff options
context:
space:
mode:
authorYaakov Selkowitz <Yaakov@fedora.selkowitz>2011-02-17 04:06:58 -0600
committerYaakov Selkowitz <Yaakov@fedora.selkowitz>2011-02-17 04:06:58 -0600
commit1dfb4e5d756cfdd6f2d07c776fc95831b5c7d639 (patch)
tree914b31c479b2ea385c71795b633e734296a75fe0 /cygwin.spec
downloadcygwin-1dfb4e5d756cfdd6f2d07c776fc95831b5c7d639.tar.gz
cygwin-1dfb4e5d756cfdd6f2d07c776fc95831b5c7d639.tar.xz
cygwin-1dfb4e5d756cfdd6f2d07c776fc95831b5c7d639.zip
Initial commit
Diffstat (limited to 'cygwin.spec')
-rw-r--r--cygwin.spec119
1 files changed, 119 insertions, 0 deletions
diff --git a/cygwin.spec b/cygwin.spec
new file mode 100644
index 0000000..4f16d9c
--- /dev/null
+++ b/cygwin.spec
@@ -0,0 +1,119 @@
+%define __strip %{_cygwin_strip}
+%define __objdump %{_cygwin_objdump}
+%define _use_internal_dependency_generator 0
+%define __find_requires %{_cygwin_findrequires}
+%define __find_provides %{_cygwin_findprovides}
+%define __os_install_post %{_cygwin_os_install_post}
+
+Name: cygwin
+Version: 1.7.7
+Release: 1%{?dist}
+Summary: Cygwin cross-compiler runtime
+
+License: GPLv2 with exceptions
+Group: Development/Libraries
+URL: http://www.cygwin.com/
+Source0: ftp:/sourceware.org/pub/cygwin/release/cygwin/cygwin-%{version}-1-src.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+
+# Remove all of these for 1.7.8
+Patch0: cygwin-1.7.7-cross-configure.patch
+Patch1: cygwin-1.7.7-cfgetiospeed.patch
+Patch2: cygwin-1.7.7-err-noreturn.patch
+Patch3: cygwin-1.7.7-path-vartmp.patch
+Patch4: cygwin-1.7.7-pthread_yield.patch
+
+
+BuildRequires: cygwin-filesystem
+BuildRequires: cygwin-binutils
+BuildRequires: cygwin-gcc
+BuildRequires: cygwin-gcc-c++
+BuildRequires: cygwin-w32api
+BuildRequires: mingw32-runtime
+BuildRequires: mingw32-w32api
+
+Requires: cygwin-w32api
+
+%description
+Cygwin cross-compiler runtime, base libraries.
+
+
+%prep
+%setup -q -n cygwin-%{version}-1
+%patch0 -p1 -b .crossconfig~
+%patch1 -p1 -b .termios~
+%patch2 -p1 -b .err~
+%patch3 -p1 -b .paths~
+%patch4 -p1 -b .pthread~
+
+pushd winsup
+autoconf -f
+popd
+pushd winsup/cygwin
+autoconf -f
+popd
+pushd winsup/cygserver
+autoconf -f
+popd
+
+# code still has some warnings with gcc4.5
+sed -i -e 's| -Werror | |' winsup/cygwin/Makefile.in
+
+
+%build
+mkdir -p build
+pushd build
+
+../configure \
+ --prefix=%{_prefix} \
+ --build=%_build --host=%_host \
+ --target=%{_cygwin_target}
+
+make %{?_smp_mflags} all
+
+popd
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+pushd build
+make DESTDIR=$RPM_BUILD_ROOT install
+
+#
+rm -fr $RPM_BUILD_ROOT%{_prefix}/etc
+rm -fr $RPM_BUILD_ROOT%{_bindir}/cygserver-config
+rm -fr $RPM_BUILD_ROOT%{_sbindir}
+rm -fr $RPM_BUILD_ROOT%{_infodir}
+rm -fr $RPM_BUILD_ROOT%{_mandir}
+rm -fr $RPM_BUILD_ROOT%{_datadir}/doc/
+rm -fr $RPM_BUILD_ROOT%{_prefix}/%{_cygwin_target}/share/doc/
+# make install places these in nonstandard locations, so move them.
+mkdir -p $RPM_BUILD_ROOT%{_cygwin_bindir}
+mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_cygwin_bindir}
+mv $RPM_BUILD_ROOT%{_prefix}/%{_cygwin_target}/include $RPM_BUILD_ROOT%{_cygwin_prefix}/
+mv $RPM_BUILD_ROOT%{_prefix}/%{_cygwin_target}/lib $RPM_BUILD_ROOT%{_cygwin_prefix}/
+
+# these are provided by other packages
+rm -fr $RPM_BUILD_ROOT%{_cygwin_includedir}/iconv.h
+rm -fr $RPM_BUILD_ROOT%{_cygwin_includedir}/mingw
+rm -fr $RPM_BUILD_ROOT%{_cygwin_includedir}/w32api
+rm -fr $RPM_BUILD_ROOT%{_cygwin_libdir}/mingw
+rm -fr $RPM_BUILD_ROOT%{_cygwin_libdir}/w32api
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%doc winsup/COPYING winsup/CYGWIN_LICENSE
+%{_cygwin_bindir}/cygwin1.dll
+%{_cygwin_includedir}/*
+%{_cygwin_libdir}/*
+
+
+%changelog
+* Wed Feb 16 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 1.7.7-1
+- Initial RPM release, largely based on earlier work from several sources.