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

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

spec: added gcc4 optional settings for Watcom tools support.

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