source: spec/trunk/SPECS/gcc4.spec@ 228

Last change on this file since 228 was 228, checked in by Yuri Dario, 14 years ago

spec: gcc3/gcc4 build update, requires binutils.

  • Property svn:eol-style set to native
File size: 4.0 KB
Line 
1%global gcc_version 4.4.4
2
3Summary: Various compilers (C, C++, Objective-C, Java, ...)
4Name: gcc
5Version: %{gcc_version}
6Release: 10%{?dist}
7
8# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
9# GCC Runtime Exception.
10License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
11Group: Development/Languages
12URL: http://gcc.gnu.org
13
14Source0: gcc-%{version}-os2-20101229.zip
15Source1: gpl.zip
16#Source2: gcc-ssp.zip
17
18BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
19
20Obsoletes: gcc < %{gcc_version}
21Requires: libgcc444 = %{gcc_version}
22Requires: libc-devel >= 0.6.3
23Requires: binutils
24
25%description
26The gcc package contains the GNU Compiler Collection version 4.4.
27You'll need this package in order to compile C code.
28
29%package -n libgcc444
30Summary: GCC version 4.4 shared support library
31Group: System Environment/Libraries
32Autoreq: false
33
34%description -n libgcc444
35This package contains GCC shared support library which is needed
36e.g. for exception handling support.
37
38%package stack-protector
39Summary: GCC stack protector shared library
40Group: System Environment/Libraries
41
42%description stack-protector
43This package contains GCC shared library which is needed
44for stack protector.
45
46%package wlink
47Summary: GCC configuration changes for Watcom linker support.
48Group: Development/Languages
49Requires: watcom-wlink-hll
50
51%description wlink
52This package triggers the required config.sys settings to allow use of Watcom
53Linker instead of ld.
54
55%package wrc
56Summary: GCC configuration changes for Watcom resource compiler support.
57Group: Development/Languages
58Requires: watcom-wrc
59
60%description wrc
61This package triggers the required config.sys settings to allow use of Watcom
62resource compiler instead of IBM one.
63
64%prep
65%setup -q -c -a 1
66
67%install
68rm -rf $RPM_BUILD_ROOT
69mkdir -p %{buildroot}%{_usr}
70cp -p -r usr/local444/* %{buildroot}%{_usr}/
71
72mkdir -p %{buildroot}/%_docdir/%{name}-%{version}
73cp -p COPYING %{buildroot}%_docdir/%{name}-%{version}/
74cp -p COPYING.LGPL %{buildroot}%_docdir/%{name}-%{version}/
75
76#cp ssp* %{buildroot}%{_libdir}
77#rm %{buildroot}%{_libdir}/ssp*.lib
78#rm %{buildroot}%{_libdir}/ssp*.dll
79
80mv %{buildroot}%{_usr}/gcc444.cmd $RPM_BUILD_ROOT%_docdir/%{name}-%{version}/
81mv %{buildroot}%{_usr}/readme.os2 $RPM_BUILD_ROOT%_docdir/%{name}-%{version}/
82mv %{buildroot}%{_usr}/stdio.diff $RPM_BUILD_ROOT%_docdir/%{name}-%{version}/
83
84ln -s /@unixroot/usr/libexec/gcc/i386-pc-os2-emx/4.4.4/cc1.exe %{buildroot}%{_bindir}/cc1.exe
85ln -s /@unixroot/usr/libexec/gcc/i386-pc-os2-emx/4.4.4/cc1plus.exe %{buildroot}%{_bindir}/cc1plus.exe
86
87#yd fix attributes for executables
88chmod 0755 %{buildroot}%{_bindir}/*.exe
89
90%clean
91rm -rf %{buildroot}
92
93%post wrc
94if [ "$1" = 1 ] ; then
95#execute only on first install
96%cube {DELLINE "SET EMXOMFLD_RC="} c:\config.sys > NUL
97%cube {DELLINE "SET EMXOMFLD_RC_TYPE="} c:\config.sys > NUL
98%cube {ADDLINE "SET EMXOMFLD_RC=wrc.exe"} c:\config.sys > NUL
99%cube {ADDLINE "SET EMXOMFLD_RC_TYPE=WRC"} c:\config.sys > NUL
100fi
101
102%postun wrc
103if [ "$1" = 0 ] ; then
104#execute only on last uninstall
105%cube {DELLINE "SET EMXOMFLD_RC="} c:\config.sys > NUL
106%cube {DELLINE "SET EMXOMFLD_RC_TYPE="} c:\config.sys > NUL
107fi
108
109%post wlink
110if [ "$1" = 1 ] ; then
111#execute only on first install
112%cube {DELLINE "SET EMXOMFLD_LINKER="} c:\config.sys > NUL
113%cube {DELLINE "SET EMXOMFLD_TYPE="} c:\config.sys > NUL
114%cube {ADDLINE "SET EMXOMFLD_LINKER=wl.exe"} c:\config.sys > NUL
115%cube {ADDLINE "SET EMXOMFLD_TYPE=WLINK"} c:\config.sys > NUL
116fi
117
118%postun wlink
119if [ "$1" = 0 ] ; then
120#execute only on last uninstall
121%cube {DELLINE "SET EMXOMFLD_LINKER="} c:\config.sys > NUL
122%cube {DELLINE "SET EMXOMFLD_TYPE="} c:\config.sys > NUL
123fi
124
125%files
126%defattr(-,root,root,-)
127%{_usr}/bin
128%{_usr}/include
129%{_usr}/info
130%{_libdir}/*.*a
131%{_libdir}/*.spec
132%{_libdir}/gcc/*
133%{_usr}/libexec
134%{_usr}/man
135%{_usr}/share
136
137%files stack-protector
138%defattr(-,root,root,-)
139%{_libdir}/ssp.dll
140
141%files wlink
142%doc gcc-wlink.txt
143
144%files wrc
145%doc gcc-wrc.txt
146
147%files -n libgcc444
148%defattr(-,root,root,-)
149%{_libdir}/gcc444.dll
150%doc %{_datadir}/doc/*
151
152%changelog
Note: See TracBrowser for help on using the repository browser.