1 | %global gcc_version 4.4.4
|
---|
2 |
|
---|
3 | Summary: Various compilers (C, C++, Objective-C, Java, ...)
|
---|
4 | Name: gcc
|
---|
5 | Version: %{gcc_version}
|
---|
6 | Release: 10%{?dist}
|
---|
7 |
|
---|
8 | # libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
|
---|
9 | # GCC Runtime Exception.
|
---|
10 | License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
|
---|
11 | Group: Development/Languages
|
---|
12 | URL: http://gcc.gnu.org
|
---|
13 |
|
---|
14 | Source0: gcc-%{version}-os2-20101229.zip
|
---|
15 | Source1: gpl.zip
|
---|
16 | #Source2: gcc-ssp.zip
|
---|
17 |
|
---|
18 | BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
|
---|
19 |
|
---|
20 | Obsoletes: gcc < %{gcc_version}
|
---|
21 | Requires: libgcc444 = %{gcc_version}
|
---|
22 | Requires: libc-devel >= 0.6.3
|
---|
23 | Requires: binutils
|
---|
24 |
|
---|
25 | %description
|
---|
26 | The gcc package contains the GNU Compiler Collection version 4.4.
|
---|
27 | You'll need this package in order to compile C code.
|
---|
28 |
|
---|
29 | %package -n libgcc444
|
---|
30 | Summary: GCC version 4.4 shared support library
|
---|
31 | Group: System Environment/Libraries
|
---|
32 | Autoreq: false
|
---|
33 |
|
---|
34 | %description -n libgcc444
|
---|
35 | This package contains GCC shared support library which is needed
|
---|
36 | e.g. for exception handling support.
|
---|
37 |
|
---|
38 | %package stack-protector
|
---|
39 | Summary: GCC stack protector shared library
|
---|
40 | Group: System Environment/Libraries
|
---|
41 |
|
---|
42 | %description stack-protector
|
---|
43 | This package contains GCC shared library which is needed
|
---|
44 | for stack protector.
|
---|
45 |
|
---|
46 | %package wlink
|
---|
47 | Summary: GCC configuration changes for Watcom linker support.
|
---|
48 | Group: Development/Languages
|
---|
49 | Requires: watcom-wlink-hll
|
---|
50 |
|
---|
51 | %description wlink
|
---|
52 | This package triggers the required config.sys settings to allow use of Watcom
|
---|
53 | Linker instead of ld.
|
---|
54 |
|
---|
55 | %package wrc
|
---|
56 | Summary: GCC configuration changes for Watcom resource compiler support.
|
---|
57 | Group: Development/Languages
|
---|
58 | Requires: watcom-wrc
|
---|
59 |
|
---|
60 | %description wrc
|
---|
61 | This package triggers the required config.sys settings to allow use of Watcom
|
---|
62 | resource compiler instead of IBM one.
|
---|
63 |
|
---|
64 | %prep
|
---|
65 | %setup -q -c -a 1
|
---|
66 |
|
---|
67 | %install
|
---|
68 | rm -rf $RPM_BUILD_ROOT
|
---|
69 | mkdir -p %{buildroot}%{_usr}
|
---|
70 | cp -p -r usr/local444/* %{buildroot}%{_usr}/
|
---|
71 |
|
---|
72 | mkdir -p %{buildroot}/%_docdir/%{name}-%{version}
|
---|
73 | cp -p COPYING %{buildroot}%_docdir/%{name}-%{version}/
|
---|
74 | cp -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 |
|
---|
80 | mv %{buildroot}%{_usr}/gcc444.cmd $RPM_BUILD_ROOT%_docdir/%{name}-%{version}/
|
---|
81 | mv %{buildroot}%{_usr}/readme.os2 $RPM_BUILD_ROOT%_docdir/%{name}-%{version}/
|
---|
82 | mv %{buildroot}%{_usr}/stdio.diff $RPM_BUILD_ROOT%_docdir/%{name}-%{version}/
|
---|
83 |
|
---|
84 | ln -s /@unixroot/usr/libexec/gcc/i386-pc-os2-emx/4.4.4/cc1.exe %{buildroot}%{_bindir}/cc1.exe
|
---|
85 | ln -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
|
---|
88 | chmod 0755 %{buildroot}%{_bindir}/*.exe
|
---|
89 |
|
---|
90 | %clean
|
---|
91 | rm -rf %{buildroot}
|
---|
92 |
|
---|
93 | %post wrc
|
---|
94 | if [ "$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
|
---|
100 | fi
|
---|
101 |
|
---|
102 | %postun wrc
|
---|
103 | if [ "$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
|
---|
107 | fi
|
---|
108 |
|
---|
109 | %post wlink
|
---|
110 | if [ "$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
|
---|
116 | fi
|
---|
117 |
|
---|
118 | %postun wlink
|
---|
119 | if [ "$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
|
---|
123 | fi
|
---|
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
|
---|