]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
- different binary version for sparc
[packages/fpc.git] / fpc.spec
1 # TODO:
2 # - check why it builds all static..
3 # - doesn't build on ppc/sparc :/ hgw why
4 Summary:        32-bit compiler for the i386 and m68k processors
5 Summary(pl):    32 bitowy kompilator dla procesorów i386 i m68k
6 Summary(ru):    ó×ÏÂÏÄÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal
7 Summary(uk):    ÷¦ÌØÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal
8 Name:           fpc
9 Version:        2.0.4
10 Release:        0.1
11 License:        GPL
12 Group:          Development/Languages
13 Source0:        ftp://ftp.freepascal.org/pub/fpc/dist/source-%{version}/%{name}build-%{version}.tar.gz
14 # Source0-md5:  1ff8b80d1f5f564983bb4e1550b8b53a
15 Source1:        ftp://ftp.freepascal.org/pub/fpc/dist/i386-linux-%{version}/%{name}-%{version}.i386-linux.tar
16 # Source1-md5:  d826aab69c98b9efe30398ff63e4c9d9
17 Source2:        ftp://ftp.freepascal.org/pub/fpc/dist/x86_64-linux-%{version}/%{name}-%{version}.x86_64-linux.tar
18 # Source2-md5:  3bbfe4c061ebd40502789eccef069d7c
19 Source3:        ftp://ftp.freepascal.org/pub/fpc/dist/powerpc-linux-%{version}/%{name}-%{version}.powerpc-linux.tar
20 # Source3-md5:  6ec5302fe446d94e5aaa1e159b0d65df
21 # no 2.0.4 binary for sparc, 2.0.0 only
22 Source4:        ftp://ftp.freepascal.org/pub/fpc/dist/sparc-linux-2.0.0/%{name}-2.0.0.sparc-linux.tar
23 # Source4-md5:  dd8925ce8ce93309456c3072e6e4d14d
24 Patch0:         %{name}-skip-dev-dot.patch
25 Patch1:         %{name}-makedocs.patch
26 URL:            http://www.freepascal.org/
27 BuildRequires:  ncurses-devel
28 BuildRequires:  gpm-devel
29 BuildRequires:  rpmbuild(macros) >= 1.213
30 BuildRequires:  tetex-fonts-jknappen
31 BuildRequires:  tetex-format-pdflatex
32 BuildRequires:  tetex-makeindex
33 BuildRequires:  tetex-metafont
34 Provides:       fpc-bootstrap
35 Requires:       binutils
36 ExclusiveArch:  %{ix86} %{x8664} ppc sparc
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
41 Free Pascal is designed to be, as much as possible, source compatible
42 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
43 attained), but it also enhances these languages with elements like
44 function overloading. And, unlike these ancestors, it supports
45 multiple platforms.
46
47 %description -l pl
48 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
49 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
50 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
51 rozszerza te jêzyki elementami takimi jak przeci±¿anie funkcji.
52
53 %description -l ru
54 FPC -- 32-ÂÉÔÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal, ÓÏ×ÍÅÓÔÉÍÙÊ Ó Turbo Pascal 7.0 É
55 Delphi. ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL
56 (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib,
57 mysql, postgres, ibase.
58
59 %description -l uk
60 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ
61 Delphi. ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL
62 (¦Â̦ÏÔÅËÏÀ ×¦ÌØÎÉÈ ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib,
63 mysql, postgres, ibase.
64
65 %package src
66 Summary:        Free Pascal Compiler source files
67 Summary(pl):    Pliki ¼ród³owe kompilatora Free Pascal
68 Group:          Development
69 Provides:       fpcsrc
70 Requires:       %{name} = %{version}-%{release}
71
72 %description src
73 Free Pascal Compiler source files.
74
75 %description src -l pl
76 Pliki ¼ród³owe kompilatora Free Pascal.
77
78 %package examples
79 Summary:        Free Pascal Compiler exaple programs
80 Summary(pl):    Przyk³adowe programy do kompilatora Free Pascal
81 Group:          Documentation
82 Requires:       %{name} = %{version}-%{release}
83
84 %description examples
85 Free Pascal Compiler exaple programs.
86
87 %description examples -l pl
88 Przyk³adowe programy do kompilatora Free Pascal.
89
90 %package doc
91 Summary:        Free Pascal Compiler documentation
92 Summary(pl):    Dokumentacja do kompilatora Free Pascal
93 Group:          Documentation
94 Requires:       %{name} = %{version}
95
96 %description doc
97 Documentation for fpc in PDF format.
98
99 %description doc -l pl
100 Dokumentacja do fpc w formacie PDF.
101
102 %prep
103 %setup -q -n %{name}build_%{version}_exp
104 %patch0 -p1
105 %patch1 -p1
106 %ifarch %{ix86}
107 tar xf %{SOURCE1}
108 %define _bver %{version}
109 %define _bname 386
110 %endif
111 %ifarch %{x8664}
112 tar xf %{SOURCE2}
113 %define _bver %{version}
114 %define _bname x64
115 %endif
116 %ifarch ppc
117 tar xf %{SOURCE3}
118 %define _bver %{version}
119 %define _bname ppc
120 %endif
121 %ifarch sparc
122 tar xf %{SOURCE4}
123 %define _bver 2.0.0
124 %define _bname sparc
125 %endif
126
127 tar xf binary.*-linux.tar
128
129 mkdir bin
130 cd bin
131 for i in ../*.tar.gz ; do
132         tar xzf $i
133 done
134 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
135
136 %build
137 # save for fpc-src
138 install -d fpc-src
139 cp -af fpcsrc/* fpc-src
140
141 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
142 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
143 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
144
145 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
146 case "%{_build_cpu}" in
147         i386,i486)
148                 OPTF="-OG2p1" ;;
149         i586)
150                 OPTF="-OG2p2" ;;
151         i686,athlon)
152                 OPTF="-Og2p3" ;;
153         *)
154                 OPTF="-O2" ;;
155 esac
156
157 %{__make} -C fpcsrc compiler_cycle \
158         OPT="$OPTF -Xs -n" \
159         RELEASE="1" \
160         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
161         BININSTALLDIR=%{_bindir} \
162         PP="$PP" \
163         FPC="$PP" \
164         SMARTLINK=YES
165
166 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
167         RELEASE="1" \
168         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
169         BININSTALLDIR=%{_bindir} \
170         PP="$NEWPP" \
171         FPC="$NEWPP" \
172         DATA2INC=`pwd`/utils/data2inc \
173         SMARTLINK=YES \
174         rtl_clean rtl_smart \
175         packages_base_smart \
176         fcl_smart \
177         fv_smart \
178         packages_extra_smart \
179         ide_all \
180         utils_all
181
182 export save_size=10000
183 %{__make} -C fpcdocs \
184         FPDOC=$NEWFPDOC \
185         FPC="$NEWPP" \
186         pdf
187
188 %install
189 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
191
192 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
193
194 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
195 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
196 %{__make} -C fpcsrc \
197         compiler_distinstall \
198         rtl_distinstall \
199         fcl_distinstall \
200         fv_distinstall \
201         packages_distinstall \
202         ide_distinstall \
203         utils_distinstall \
204         PP="$NEWPP" \
205         FPCMAKE="$FPCMAKE" \
206         SMARTLINK=YES \
207         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
208         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
209         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
210         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
211         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
212         INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
213         INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
214         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
215         CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
216
217 %{__make} -C install/man installman \
218         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
219
220 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
221
222 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
223
224 %clean
225 rm -rf $RPM_BUILD_ROOT
226
227 %files
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_bindir}/*
230 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
231 %dir %{_libdir}/%{name}
232 %dir %{_libdir}/%{name}/%{version}
233 %dir %{_libdir}/%{name}/lexyacc
234 %{_libdir}/%{name}/%{version}/msg
235 %{_libdir}/%{name}/%{version}/units
236 %{_libdir}/%{name}/%{version}/ide
237 %{_libdir}/%{name}/lexyacc/*
238 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
239 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
240 %{_mandir}/man*/*
241
242 %files src
243 %defattr(644,root,root,755)
244 %{_datadir}/fpcsrc
245
246 %files examples
247 %defattr(644,root,root,755)
248 %{_examplesdir}/fpc
249
250 %files doc
251 %defattr(644,root,root,755)
252 %doc fpcdocs/*.pdf
This page took 0.040933 seconds and 3 git commands to generate.