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: af49e9a8bb632f361395add30ece8934
20 Source1: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
21 # Source1-md5: 5f38071d4bc560425f08905c14c1a68c
22 Source2: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
23 # Source2-md5: 80fc3434f2d2af25af8c5e4dcf98723b
24 Source3: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
25 # Source3-md5: 5a25c4d031e3f11d1d214c0d2faf00b5
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}
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}
113 %define _bver %{version}
118 %define _bver %{version}
123 %define _bver %{version}
127 tar xf binary.*-linux.tar
131 for i in ../*.tar.gz ; do
134 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
139 cp -af fpcsrc/* fpc-src
141 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
142 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
143 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
145 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
146 case "%{_build_cpu}" in
147 i386) OPTF="-OG2p1" ;;
148 i486) OPTF="-OG2p1" ;;
149 i586) OPTF="-OG2p2" ;;
150 i686) OPTF="-Og2p3" ;;
151 athlon) OPTF="-Og2p3" ;;
155 %{__make} -C fpcsrc compiler_cycle \
158 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
159 BININSTALLDIR=%{_bindir} \
164 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
166 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
167 BININSTALLDIR=%{_bindir} \
168 GDBLIBDIR=%{_libdir} \
172 DATA2INC=`pwd`/utils/data2inc \
178 %{?with_ide: ide_clean installer_clean} \
181 utils_all %{?with_ide:installer_all}
183 # %{?with_ide:IDE=YES} \
185 %{__make} -C fpcsrc/ide OPT="$OPTF -Xs -n" \
187 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
188 BININSTALLDIR=%{_bindir} \
189 GDBLIBDIR=%{_libdir} \
193 DATA2INC=`pwd`/utils/data2inc \
199 # %{?with_ide:installer_clean} \
200 # %{?with_ide:installer_all}
203 export save_size=10000
204 %{__make} -j1 -C fpcdocs \
211 rm -rf $RPM_BUILD_ROOT
212 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
214 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
216 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
217 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
218 %{__make} -j1 -C fpcsrc \
219 compiler_distinstall \
221 packages_distinstall \
222 %{?with_ide:ide_distinstall} \
227 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
228 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
229 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
230 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
231 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
232 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
233 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
234 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
235 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
237 %{__make} -j1 -C install/man installman \
238 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
240 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
242 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
245 rm -rf $RPM_BUILD_ROOT
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_bindir}/*
250 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
251 %dir %{_libdir}/%{name}
252 %dir %{_libdir}/%{name}/%{version}
253 %dir %{_libdir}/%{name}/lexyacc
254 %{_libdir}/%{name}/%{version}/msg
255 %{_libdir}/%{name}/%{version}/units
257 %{_libdir}/%{name}/%{version}/ide
259 %{_libdir}/%{name}/lexyacc/*
260 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
261 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
265 %defattr(644,root,root,755)
269 %defattr(644,root,root,755)
274 %defattr(644,root,root,755)