summaryrefslogtreecommitdiffstats
path: root/cygwin-filesystem.spec
diff options
context:
space:
mode:
Diffstat (limited to 'cygwin-filesystem.spec')
-rw-r--r--cygwin-filesystem.spec160
1 files changed, 160 insertions, 0 deletions
diff --git a/cygwin-filesystem.spec b/cygwin-filesystem.spec
new file mode 100644
index 0000000..46a8ca5
--- /dev/null
+++ b/cygwin-filesystem.spec
@@ -0,0 +1,160 @@
+%define debug_package %{nil}
+
+Name: cygwin-filesystem
+Version: 1
+Release: 1%{?dist}
+Summary: Cygwin base filesystem and environment
+
+Group: Development/Libraries
+License: GPLv2+
+URL: http://cygwinports.org/
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+
+Source0: COPYING
+Source1: macros.cygwin
+Source2: cygwin.sh
+#Source3: cygwin.csh
+Source4: cygwin-find-requires.sh
+Source5: cygwin-find-provides.sh
+Source6: cygwin-scripts.sh
+Source7: cygwin-rpmlint.config
+Source8: Toolchain-cygwin.cmake
+Source9: cygwin-find-debuginfo.sh
+
+Requires: pkgconfig
+
+# Note about 'Provides: cygwin(foo.dll)'
+# ------------------------------------------------------------
+#
+# We want to be able to build & install Windows libraries without
+# necessarily needing to install wine. (And certainly not needing to
+# install Windows!) There is no requirement to have wine installed in
+# order to use the cygwin toolchain to develop software (ie. to
+# compile more stuff on top of it), so why require that?
+#
+# So for expediency, this base package provides the "missing" DLLs
+# from Windows. Another way to do it would be to exclude these
+# proprietary DLLs in our find-requires checking script - essentially
+# it comes out the same either way.
+#
+Provides: cygwin(advapi32.dll)
+Provides: cygwin(kernel32.dll)
+Provides: cygwin(ntdll.dll)
+Provides: cygwin(shell32.dll)
+Provides: cygwin(user32.dll)
+
+
+%description
+This package contains the base filesystem layout, RPM macros and
+environment for all Fedora Cygwin packages.
+
+This environment is maintained by the Fedora Cygwin SIG at:
+
+ http://fedoraproject.org/wiki/SIGs/Cygwin
+
+
+%prep
+%setup -q -c -T
+cp %{SOURCE0} COPYING
+sed 's/@VERSION@/%{version}/' < %{SOURCE4} > cygwin-find-requires.sh
+
+
+%build
+# nothing
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
+install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_libexecdir}/cygwin-scripts
+
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+pushd $RPM_BUILD_ROOT%{_bindir}
+for i in cygwin-configure cygwin-make cygwin-pkg-config i686-pc-cygwin-pkg-config cygwin-cmake cygwin-qmake-qt4; do
+ ln -s %{_libexecdir}/cygwin-scripts $i
+done
+popd
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
+install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
+#install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
+install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.cygwin
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint
+install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint/
+
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin
+
+# GCC requires these directories, even though they contain links
+# to binaries which are also installed in /usr/bin etc. These
+# contain Fedora native binaries.
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/bin
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/lib
+
+# The Cygwin system root which will contain Windows native binaries
+# and Windows-specific header files, pkgconfig, etc.
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/bin
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/include
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/include/sys
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/lib
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/lib/pkgconfig
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/share/aclocal
+
+# We don't normally package manual pages and info files, except
+# where those are not supplied by a Fedora native package. So we
+# need to create the directories.
+#
+# Note that some packages try to install stuff in
+# /usr/i686-pc-cygwin/sys-root/usr/man and
+# /usr/i686-pc-cygwin/sys-root/usr/doc
+# but those are both packaging bugs.
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/share
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/share/doc
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/share/info
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/share/man
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/share/man/man{1,2,3,4,5,6,7,8,l,n}
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-cygwin/sys-root/usr/share/themes
+
+# NB. NOT _libdir
+mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
+install -m 0755 cygwin-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
+install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
+install -m 0755 %{SOURCE9} $RPM_BUILD_ROOT/usr/lib/rpm
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/cygwin
+install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/cygwin
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING
+%config(noreplace) %{_sysconfdir}/rpm/macros.cygwin
+%config(noreplace) %{_sysconfdir}/profile.d/cygwin.sh
+#%config(noreplace) %{_sysconfdir}/profile.d/cygwin.csh
+%dir %{_sysconfdir}/rpmlint
+%config(noreplace) %{_sysconfdir}/rpmlint/cygwin-rpmlint.config
+%{_bindir}/cygwin-configure
+%{_bindir}/cygwin-make
+%{_bindir}/cygwin-pkg-config
+%{_bindir}/i686-pc-cygwin-pkg-config
+%{_bindir}/cygwin-cmake
+%{_bindir}/cygwin-qmake-qt4
+%{_libexecdir}/cygwin-scripts
+%{_prefix}/i686-pc-cygwin/
+%{_datadir}/cygwin
+/usr/lib/rpm/cygwin-*
+
+
+%changelog
+* Wed Feb 16 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 1-1
+- Initial RPM release, largely based on mingw32-filesystem.