2 # - check why it builds all static..
6 %bcond_with ide # build with ide
7 %bcond_without doc # build without doc
9 Summary: 32-bit compiler for the i386 and m68k processors
10 Summary(pl.UTF-8): 32 bitowy kompilator dla procesorów i386 i m68k
11 Summary(ru.UTF-8): Свободный компилятор Pascal
12 Summary(uk.UTF-8): Вільний компілятор Pascal
17 Group: Development/Languages
18 Source0: ftp://ftp.freepascal.org/fpc/dist/source-%{version}/%{name}build-%{version}.tar.gz
19 # Source0-md5: ec3d463ec9859da4122e9edfa2ab992d
20 Source1: ftp://ftp.freepascal.org/fpc/dist/i386-linux-%{version}/%{name}-%{version}.i386-linux.tar
21 # Source1-md5: ee7ddbf3ad50f6c6f237439e3ecd83d6
22 Source2: ftp://ftp.freepascal.org/fpc/dist/x86_64-linux-%{version}/%{name}-%{version}.x86_64-linux.tar
23 # Source2-md5: 9671bb9f89fd64fd8db4de6c76393c62
24 Source3: ftp://ftp.freepascal.org/fpc/dist/powerpc-linux-%{version}/%{name}-%{version}.powerpc-linux.tar
25 # Source3-md5: e83013af5e6fd8272c6d26b41234f288
26 Patch0: %{name}-skip-dev-dot.patch
27 Patch1: %{name}-makedocs.patch
28 Patch2: %{name}-avoid-RE.patch
29 URL: http://www.freepascal.org/
30 BuildRequires: binutils-static >= 3:2.17.50
31 BuildRequires: gdb-lib
32 BuildRequires: gpm-devel
33 BuildRequires: ncurses-devel
34 %{?with_ide:BuildRequires: readline-static}
35 BuildRequires: rpmbuild(macros) >= 1.213
36 %{?with_doc:BuildRequires: tetex-fonts-jknappen}
37 %{?with_doc:BuildRequires: tetex-format-pdflatex}
38 %{?with_doc:BuildRequires: tetex-makeindex}
39 %{?with_doc:BuildRequires: tetex-metafont}
41 Provides: fpc-bootstrap
42 ExclusiveArch: %{ix86} %{x8664} ppc
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
47 Free Pascal is designed to be, as much as possible, source compatible
48 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
49 attained), but it also enhances these languages with elements like
50 function overloading. And, unlike these ancestors, it supports
53 %description -l pl.UTF-8
54 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
55 Free Pascal został zaprojektowany by być (jak tylko to możliwe)
56 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
57 rozszerza te języki elementami takimi jak przeciążanie funkcji.
59 %description -l ru.UTF-8
60 FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
61 Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
62 (библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
63 mysql, postgres, ibase.
65 %description -l uk.UTF-8
66 FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
67 Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
68 (бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
69 mysql, postgres, ibase.
72 Summary: Free Pascal Compiler source files
73 Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal
75 Requires: %{name} = %{version}-%{release}
79 Free Pascal Compiler source files.
81 %description src -l pl.UTF-8
82 Pliki źródłowe kompilatora Free Pascal.
85 Summary: Free Pascal Compiler exaple programs
86 Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal
88 Requires: %{name} = %{version}-%{release}
91 Free Pascal Compiler exaple programs.
93 %description examples -l pl.UTF-8
94 Przykładowe programy do kompilatora Free Pascal.
97 Summary: Free Pascal Compiler documentation
98 Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal
100 Requires: %{name} = %{version}-%{release}
103 Documentation for fpc in PDF format.
105 %description doc -l pl.UTF-8
106 Dokumentacja do fpc w formacie PDF.
109 %setup -q -n %{name}build-%{version}
116 %define _bver %{version}
121 %define _bver %{version}
126 %define _bver %{version}
130 tar xf binary.*-linux.tar
134 for i in ../*.tar.gz ; do
137 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
142 cp -af fpcsrc/* fpc-src
144 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
145 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
146 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
148 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
149 case "%{_build_cpu}" in
150 i386) OPTF="-OG2p1" ;;
151 i486) OPTF="-OG2p1" ;;
152 i586) OPTF="-OG2p2" ;;
153 i686) OPTF="-Og2p3" ;;
154 athlon) OPTF="-Og2p3" ;;
158 %{__make} -C fpcsrc compiler_cycle \
161 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
162 BININSTALLDIR=%{_bindir} \
167 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
169 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
170 BININSTALLDIR=%{_bindir} \
171 GDBLIBDIR=%{_libdir} \
175 DATA2INC=`pwd`/utils/data2inc \
181 %{?with_ide: ide_clean installer_clean} \
184 utils_all %{?with_ide:installer_all}
186 # %{?with_ide:IDE=YES} \
188 %{__make} -C fpcsrc/ide OPT="$OPTF -Xs -n" \
190 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
191 BININSTALLDIR=%{_bindir} \
192 GDBLIBDIR=%{_libdir} \
196 DATA2INC=`pwd`/utils/data2inc \
202 # %{?with_ide:installer_clean} \
203 # %{?with_ide:installer_all}
206 export save_size=10000
207 %{__make} -C fpcdocs \
214 rm -rf $RPM_BUILD_ROOT
215 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
217 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
219 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
220 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
221 %{__make} -C fpcsrc \
222 compiler_distinstall \
224 packages_distinstall \
225 %{?with_ide:ide_distinstall} \
230 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
231 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
232 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
233 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
234 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
235 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
236 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
237 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
238 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
240 %{__make} -C install/man installman \
241 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
243 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
245 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
248 rm -rf $RPM_BUILD_ROOT
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_bindir}/*
253 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
254 %dir %{_libdir}/%{name}
255 %dir %{_libdir}/%{name}/%{version}
256 %dir %{_libdir}/%{name}/lexyacc
257 %{_libdir}/%{name}/%{version}/msg
258 %{_libdir}/%{name}/%{version}/units
260 %{_libdir}/%{name}/%{version}/ide
262 %{_libdir}/%{name}/lexyacc/*
263 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
264 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
268 %defattr(644,root,root,755)
272 %defattr(644,root,root,755)
277 %defattr(644,root,root,755)