summaryrefslogtreecommitdiffstats
path: root/cygwin-filesystem.spec
blob: 644e185a5f302aca8c067252347b64948d449846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
%define debug_package %{nil}

Name:           cygwin-filesystem
Version:        3
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
# for brp-strip-static-archive which respects $STRIP
Requires:       redhat-rpm-config

# 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/aclocal
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
* Mon Mar 14 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 3-1
- Added _cygwin_datadir/pkgconfig and _datadir/pkgconfig to PKG_CONFIG_LIBDIR.

* Thu Feb 17 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 2-1
- Added dependency on redhat-rpm-config for brp-strip-static-archive which
  respects $STRIP.

* Wed Feb 16 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1-1
- Initial RPM release, largely based on mingw32-filesystem.