5 %bcond_with ide # build with ide
6 %bcond_without doc # build without doc
8 Summary: 32-bit compiler for the i386 and m68k processors
9 Summary(pl.UTF-8): 32 bitowy kompilator dla procesorów i386 i m68k
10 Summary(ru.UTF-8): Свободный компилятор Pascal
11 Summary(uk.UTF-8): Вільний компілятор Pascal
16 Group: Development/Languages
17 Source0: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/%{name}build-%{version}.tar.gz
18 # Source0-md5: d069dfd3412bd0d26dcd1b81ac998305
19 Source1: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
20 # Source1-md5: e761c4866ac4c8fcbe09f657f315ec32
21 Source2: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
22 # Source2-md5: 058e6cd765026748a2bd24c86f1ecf18
23 Source3: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
24 # Source3-md5: cea93e5da48c45da3147236cba75dc76
25 Patch0: %{name}-skip-dev-dot.patch
26 Patch1: %{name}-fpdoc.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}
38 %{?with_doc:BuildRequires: texlive-xetex}
40 Provides: fpc-bootstrap
41 ExclusiveArch: %{ix86} %{x8664} ppc
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
46 Free Pascal is designed to be, as much as possible, source compatible
47 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
48 attained), but it also enhances these languages with elements like
49 function overloading. And, unlike these ancestors, it supports
52 %description -l pl.UTF-8
53 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
54 Free Pascal został zaprojektowany by być (jak tylko to możliwe)
55 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
56 rozszerza te języki elementami takimi jak przeciążanie funkcji.
58 %description -l ru.UTF-8
59 FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
60 Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
61 (библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
62 mysql, postgres, ibase.
64 %description -l uk.UTF-8
65 FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
66 Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
67 (бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
68 mysql, postgres, ibase.
71 Summary: Free Pascal Compiler source files
72 Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal
74 Requires: %{name} = %{version}-%{release}
78 Free Pascal Compiler source files.
80 %description src -l pl.UTF-8
81 Pliki źródłowe kompilatora Free Pascal.
84 Summary: Free Pascal Compiler exaple programs
85 Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal
87 Requires: %{name} = %{version}-%{release}
90 Free Pascal Compiler exaple programs.
92 %description examples -l pl.UTF-8
93 Przykładowe programy do kompilatora Free Pascal.
96 Summary: Free Pascal Compiler documentation
97 Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal
99 # doesn't require base
102 Documentation for fpc in PDF format.
104 %description doc -l pl.UTF-8
105 Dokumentacja do fpc w formacie PDF.
108 %setup -q -n %{name}build-%{version}
114 %define _bver %{version}
119 %define _bver %{version}
124 %define _bver %{version}
128 tar xf binary.*-linux.tar
132 for i in ../*.tar.gz ; do
135 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
140 cp -af fpcsrc/* fpc-src
142 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
143 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
144 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
146 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
147 case "%{_build_cpu}" in
148 i386) OPTF="-OG2p1" ;;
149 i486) OPTF="-OG2p1" ;;
150 i586) OPTF="-OG2p2" ;;
151 i686) OPTF="-Og2p3" ;;
152 athlon) OPTF="-Og2p3" ;;
156 %{__make} -C fpcsrc compiler_cycle \
159 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
160 BININSTALLDIR=%{_bindir} \
165 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
167 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
168 BININSTALLDIR=%{_bindir} \
169 GDBLIBDIR=%{_libdir} \
173 DATA2INC=`pwd`/utils/data2inc \
179 %{?with_ide: ide_clean installer_clean} \
182 utils_all %{?with_ide:installer_all}
184 # %{?with_ide:IDE=YES} \
186 %{__make} -C fpcsrc/ide OPT="$OPTF -Xs -n" \
188 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
189 BININSTALLDIR=%{_bindir} \
190 GDBLIBDIR=%{_libdir} \
194 DATA2INC=`pwd`/utils/data2inc \
200 # %{?with_ide:installer_clean} \
201 # %{?with_ide:installer_all}
204 export save_size=10000
205 %{__make} -j1 -C fpcdocs \
212 rm -rf $RPM_BUILD_ROOT
213 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
215 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
217 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
218 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
219 %{__make} -j1 -C fpcsrc \
220 compiler_distinstall \
222 packages_distinstall \
223 %{?with_ide:ide_distinstall} \
228 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
229 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
230 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
231 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
232 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
233 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
234 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
235 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
236 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
238 %{__make} -j1 -C install/man installman \
239 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
241 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
243 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
246 rm -rf $RPM_BUILD_ROOT
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/*
251 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
252 %dir %{_libdir}/%{name}
253 %dir %{_libdir}/%{name}/%{version}
254 %dir %{_libdir}/%{name}/lexyacc
255 %{_libdir}/%{name}/%{version}/msg
256 %{_libdir}/%{name}/%{version}/units
258 %{_libdir}/%{name}/%{version}/ide
260 %{_libdir}/%{name}/lexyacc/*
261 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
262 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
266 %defattr(644,root,root,755)
270 %defattr(644,root,root,755)
275 %defattr(644,root,root,755)