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/pub/fpc/dist/%{version}/source/%{name}build-%{version}.tar.gz
19 # Source0-md5: 20bb9a4a9f1449e2249c80d7aba7c245
20 Source1: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
21 # Source1-md5: dad8cb132bbefdc52b0f93e56484ea29
22 Source2: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
23 # Source2-md5: f1c523001cd842308d99b86d211368d2
24 Source3: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
25 # Source3-md5: 7340cf98dc751d58d899c546bd46b972
26 Patch0: %{name}-skip-dev-dot.patch
27 URL: http://www.freepascal.org/
28 BuildRequires: binutils-static >= 3:2.17.50
29 BuildRequires: gdb-lib
30 BuildRequires: gpm-devel
31 BuildRequires: ncurses-devel
32 %{?with_ide:BuildRequires: readline-static}
33 BuildRequires: rpmbuild(macros) >= 1.213
34 %{?with_doc:BuildRequires: tetex-fonts-jknappen}
35 %{?with_doc:BuildRequires: tetex-format-pdflatex}
36 %{?with_doc:BuildRequires: tetex-makeindex}
37 %{?with_doc:BuildRequires: tetex-metafont}
39 Provides: fpc-bootstrap
40 ExclusiveArch: %{ix86} %{x8664} ppc
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
45 Free Pascal is designed to be, as much as possible, source compatible
46 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
47 attained), but it also enhances these languages with elements like
48 function overloading. And, unlike these ancestors, it supports
51 %description -l pl.UTF-8
52 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
53 Free Pascal został zaprojektowany by być (jak tylko to możliwe)
54 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
55 rozszerza te języki elementami takimi jak przeciążanie funkcji.
57 %description -l ru.UTF-8
58 FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
59 Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
60 (библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
61 mysql, postgres, ibase.
63 %description -l uk.UTF-8
64 FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
65 Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
66 (бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
67 mysql, postgres, ibase.
70 Summary: Free Pascal Compiler source files
71 Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal
73 Requires: %{name} = %{version}-%{release}
77 Free Pascal Compiler source files.
79 %description src -l pl.UTF-8
80 Pliki źródłowe kompilatora Free Pascal.
83 Summary: Free Pascal Compiler exaple programs
84 Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal
86 Requires: %{name} = %{version}-%{release}
89 Free Pascal Compiler exaple programs.
91 %description examples -l pl.UTF-8
92 Przykładowe programy do kompilatora Free Pascal.
95 Summary: Free Pascal Compiler documentation
96 Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal
98 # doesn't require base
101 Documentation for fpc in PDF format.
103 %description doc -l pl.UTF-8
104 Dokumentacja do fpc w formacie PDF.
107 %setup -q -n %{name}build-%{version}
112 %define _bver %{version}
117 %define _bver %{version}
122 %define _bver %{version}
126 tar xf binary.*-linux.tar
130 for i in ../*.tar.gz ; do
133 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
138 cp -af fpcsrc/* fpc-src
140 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
141 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
142 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
144 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
145 case "%{_build_cpu}" in
146 i386) OPTF="-OG2p1" ;;
147 i486) OPTF="-OG2p1" ;;
148 i586) OPTF="-OG2p2" ;;
149 i686) OPTF="-Og2p3" ;;
150 athlon) OPTF="-Og2p3" ;;
154 %{__make} -C fpcsrc compiler_cycle \
157 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
158 BININSTALLDIR=%{_bindir} \
163 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
165 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
166 BININSTALLDIR=%{_bindir} \
167 GDBLIBDIR=%{_libdir} \
171 DATA2INC=`pwd`/utils/data2inc \
177 %{?with_ide: ide_clean installer_clean} \
180 utils_all %{?with_ide:installer_all}
182 # %{?with_ide:IDE=YES} \
184 %{__make} -C fpcsrc/ide OPT="$OPTF -Xs -n" \
186 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
187 BININSTALLDIR=%{_bindir} \
188 GDBLIBDIR=%{_libdir} \
192 DATA2INC=`pwd`/utils/data2inc \
198 # %{?with_ide:installer_clean} \
199 # %{?with_ide:installer_all}
202 export save_size=10000
203 %{__make} -C fpcdocs \
210 rm -rf $RPM_BUILD_ROOT
211 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
213 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
215 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
216 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
217 %{__make} -C fpcsrc \
218 compiler_distinstall \
220 packages_distinstall \
221 %{?with_ide:ide_distinstall} \
226 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
227 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
228 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
229 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
230 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
231 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
232 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
233 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
234 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
236 %{__make} -C install/man installman \
237 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
239 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
241 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
244 rm -rf $RPM_BUILD_ROOT
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/*
249 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
250 %dir %{_libdir}/%{name}
251 %dir %{_libdir}/%{name}/%{version}
252 %dir %{_libdir}/%{name}/lexyacc
253 %{_libdir}/%{name}/%{version}/msg
254 %{_libdir}/%{name}/%{version}/units
256 %{_libdir}/%{name}/%{version}/ide
258 %{_libdir}/%{name}/lexyacc/*
259 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
260 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
264 %defattr(644,root,root,755)
268 %defattr(644,root,root,755)
273 %defattr(644,root,root,755)