2 # - use dynamic linking
3 # - allow $PATH exceeding 255 chars
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
12 Group: Development/Languages
13 Vendor: Michael Van Canneyt <michael@tfdec1.fys.kuleuven.ac.be>
14 Source0: ftp://ftp.us.freepascal.org/pub/fpc/dist/source-%{version}/%{name}-%{version}-src.tar.gz
15 # Source0-md5: da2ec003500584649cb31288613c33fa
16 Source1: ftp://ftp.us.freepascal.org/pub/fpc/dist/Linux/i386/separate/binary.tar
17 # Source1-md5: 62c7ac6c21c44276b5e14bf34265d185
18 Source2: %{name}-sample.cfg
19 URL: http://www.freepascal.org/
21 BuildRequires: glibc-static
22 BuildRequires: zlib-devel
23 Requires: gcc >= 2.95.2
24 ExclusiveArch: %{ix86} m68k
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
29 Free Pascal is designed to be, as much as possible, source compatible
30 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
31 attained), but it also enhances these languages with elements like
32 function overloading. And, unlike these ancestors, it supports
36 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
37 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
38 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
39 rozszerza te jêzyki elementami takimi jak przeci±¿anie funkcji.
42 FPC -- 32-ÂÉÔÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal, ÓÏ×ÍÅÓÔÉÍÙÊ Ó Turbo Pascal 7.0 É Delphi.
43 ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ
44 ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib, mysql, postgres, ibase.
47 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ Delphi.
48 ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL (¦Â̦ÏÔÅËÏÀ צÌØÎÉÈ
49 ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib, mysql, postgres, ibase.
52 Summary: Free Pascal Compiler exaple programs
53 Summary(pl): Przyk³adowe programy do kompilatora Free Pascal
55 Requires: %{name} = %{version}
58 Free Pascal Compiler exaple programs.
60 %description examples -l pl
61 Przyk³adowe programy do kompilatora Free Pascal.
64 Summary: Free Pascal Compiler documentation
65 Summary(pl): Dokumentacja do kompilatora Free Pascal
67 Requires: %{name} = %{version}
70 Documentation for fpc in PDF format.
72 %description doc -l pl
73 Dokumentacja do fpc w formacie PDF.
77 for i in *.tar.gz ; do
81 mkdir -p src/%{name}-%{version}/doc
82 mv doc/%{name}-%{version}/* src/%{name}-%{version}/doc
83 mkdir -p src/%{name}-%{version}/man && echo ".PHONY: all install installman" > src/%{name}-%{version}/man/Makefile
85 cd src/%{name}-%{version}
89 if [ "%{_build_cpu}" = "m68k" ]; then
95 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
96 case "%{_build_cpu}" in
107 PP=`pwd`/lib/fpc/%{version}/ppc386
108 NEWPP=`pwd`/src/fpc-%{version}/compiler/ppc386
109 NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
111 # ppc386 binary cuts PATH - sometimes before /usr/bin with needed as and ld
112 export PATH="/usr/bin:/bin"
114 %{__make} -C src/%{name}-%{version} \
117 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
118 BININSTALLDIR=%{_bindir} \
123 %{__make} -C src/%{name}-%{version} \
126 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
127 BININSTALLDIR=%{_bindir} \
130 rtl_clean rtl_smart packages_base_smart fcl_smart packages_extra_smart utils_all
132 # %{__make} -C src/%{name}-%{version}/docs pdf FPDOC=${NEWFPDOC}
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_examplesdir}/fpc}
138 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/fpc.cfg
140 # new ppc386 cuts PATH too (how to fix it???)
141 export PATH="/usr/bin:/bin"
143 NEWPP=`pwd`/src/fpc-%{version}/compiler/ppc386
144 %{__make} -C src/%{name}-%{version} \
145 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
146 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
147 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
148 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
149 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
151 compiler_distinstall \
153 packages_distinstall \
158 # %{__make} -C src/%{name}-%{version}/docs pdfinstall DOCINSTALLDIR=$RPM_BUILD_ROOT%{_docdir}
160 mv -f src/%{name}-%{version}/doc/examples/* $RPM_BUILD_ROOT%{_examplesdir}/fpc
162 ln -sf ../lib/%{name}/%{version}/ppc386 $RPM_BUILD_ROOT%{_bindir}/ppc386
163 ln -sf ppc386 $RPM_BUILD_ROOT%{_bindir}/fpc
165 mv -f src/%{name}-%{version}/doc/faq.htm src/%{name}-%{version}/doc/faq.html
168 rm -rf $RPM_BUILD_ROOT
172 GCCSPEC=`(gcc -v 2>&1)| head -n 1| awk '{ print $4 } '`
173 GCCDIR=`dirname $GCCSPEC`
174 echo "Found libgcc.a in $GCCDIR"
175 sed -e "s#\$GCCDIR#$GCCDIR#" %{_sysconfdir}/fpc.cfg > %{_sysconfdir}/fpc.cfg.new
176 sed -e "s#\$1#%{_libdir}/%{name}/%{version}#" %{_sysconfdir}/fpc.cfg.new > %{_sysconfdir}/fpc.cfg
177 rm -f %{_sysconfdir}/fpc.cfg.new
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_bindir}/*
182 %doc src/%{name}-%{version}/doc/{copying*,*.txt}
183 %doc src/%{name}-%{version}/doc/faq.html
184 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/fpc.cfg
185 %dir %{_libdir}/%{name}
186 %dir %{_libdir}/%{name}/%{version}
187 %dir %{_libdir}/%{name}/lexyacc
188 %{_libdir}/%{name}/%{version}/msg
189 %{_libdir}/%{name}/%{version}/units
190 %{_libdir}/%{name}/lexyacc/*
191 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc386
192 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
196 %defattr(644,root,root,755)
200 #%defattr(644,root,root,755)
201 #%doc src/%{name}-%{version}/doc/*.pdf