2 # - allow $PATH exceeding 255 chars
3 Summary: 32-bit compiler for the i386 and m68k processors
4 Summary(pl): 32 bitowy kompilator dla procesorów i386 i m68k
5 Summary(ru): ó×ÏÂÏÄÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal
6 Summary(uk): ÷¦ÌØÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal
11 Group: Development/Languages
12 Vendor: Michael Van Canneyt <michael@tfdec1.fys.kuleuven.ac.be>
13 Source0: ftp://ftp.us.freepascal.org/pub/fpc/dist/source-%{version}/%{name}-%{version}-src.tar.gz
14 # Source0-md5: da2ec003500584649cb31288613c33fa
15 Source1: ftp://ftp.us.freepascal.org/pub/fpc/dist/Linux/i386/separate/binary.tar
16 # Source1-md5: 62c7ac6c21c44276b5e14bf34265d185
17 Source2: %{name}-sample.cfg
18 URL: http://www.freepascal.org/
20 BuildRequires: zlib-devel
21 Requires: gcc >= 2.95.2
22 ExclusiveArch: %{ix86} m68k
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
27 Free Pascal is designed to be, as much as possible, source compatible
28 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
29 attained), but it also enhances these languages with elements like
30 function overloading. And, unlike these ancestors, it supports
34 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
35 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
36 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
37 rozszerza te jêzyki elementami takimi jak przeci±¿anie funkcji.
40 FPC -- 32-ÂÉÔÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal, ÓÏ×ÍÅÓÔÉÍÙÊ Ó Turbo Pascal 7.0 É Delphi.
41 ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ
42 ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib, mysql, postgres, ibase.
45 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ Delphi.
46 ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL (¦Â̦ÏÔÅËÏÀ צÌØÎÉÈ
47 ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib, mysql, postgres, ibase.
50 Summary: Free Pascal Compiler exaple programs
51 Summary(pl): Przyk³adowe programy do kompilatora Free Pascal
53 Requires: %{name} = %{version}
56 Free Pascal Compiler exaple programs.
58 %description examples -l pl
59 Przyk³adowe programy do kompilatora Free Pascal.
62 Summary: Free Pascal Compiler documentation
63 Summary(pl): Dokumentacja do kompilatora Free Pascal
65 Requires: %{name} = %{version}
68 Documentation for fpc in PDF format.
70 %description doc -l pl
71 Dokumentacja do fpc w formacie PDF.
75 for i in *.tar.gz ; do
79 mkdir -p src/%{name}-%{version}/doc
80 mv doc/%{name}-%{version}/* src/%{name}-%{version}/doc
81 mkdir -p src/%{name}-%{version}/man && echo ".PHONY: all install installman" > src/%{name}-%{version}/man/Makefile
83 cd src/%{name}-%{version}
87 if [ "%{_build_cpu}" = "m68k" ]; then
93 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
94 case "%{_build_cpu}" in
105 PP=`pwd`/lib/fpc/%{version}/ppc386
106 NEWPP=`pwd`/src/fpc-%{version}/compiler/ppc386
107 NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
109 # ppc386 binary cuts PATH - sometimes before /usr/bin with needed as and ld
110 export PATH="/usr/bin:/bin"
112 %{__make} -C src/%{name}-%{version} \
115 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
116 BININSTALLDIR=%{_bindir} \
121 %{__make} -C src/%{name}-%{version} \
124 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
125 BININSTALLDIR=%{_bindir} \
128 rtl_clean rtl_smart packages_base_smart fcl_smart packages_extra_smart utils_all
130 # %{__make} -C src/%{name}-%{version}/docs pdf FPDOC=${NEWFPDOC}
133 rm -rf $RPM_BUILD_ROOT
134 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_examplesdir}/fpc}
136 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/fpc.cfg
138 # new ppc386 cuts PATH too (how to fix it???)
139 export PATH="/usr/bin:/bin"
141 NEWPP=`pwd`/src/fpc-%{version}/compiler/ppc386
142 %{__make} -C src/%{name}-%{version} \
143 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
144 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
145 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
146 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
147 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
149 compiler_distinstall \
151 packages_distinstall \
156 # %{__make} -C src/%{name}-%{version}/docs pdfinstall DOCINSTALLDIR=$RPM_BUILD_ROOT%{_docdir}
158 mv -f src/%{name}-%{version}/doc/examples/* $RPM_BUILD_ROOT%{_examplesdir}/fpc
160 ln -sf ../lib/%{name}/%{version}/ppc386 $RPM_BUILD_ROOT%{_bindir}/ppc386
161 ln -sf ppc386 $RPM_BUILD_ROOT%{_bindir}/fpc
163 mv -f src/%{name}-%{version}/doc/faq.htm src/%{name}-%{version}/doc/faq.html
166 rm -rf $RPM_BUILD_ROOT
170 GCCSPEC=`(gcc -v 2>&1)| head -n 1| awk '{ print $4 } '`
171 GCCDIR=`dirname $GCCSPEC`
172 echo "Found libgcc.a in $GCCDIR"
173 sed -e "s#\$GCCDIR#$GCCDIR#" %{_sysconfdir}/fpc.cfg > %{_sysconfdir}/fpc.cfg.new
174 sed -e "s#\$1#%{_libdir}/%{name}/%{version}#" %{_sysconfdir}/fpc.cfg.new > %{_sysconfdir}/fpc.cfg
175 rm -f %{_sysconfdir}/fpc.cfg.new
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/*
180 %doc src/%{name}-%{version}/doc/{copying*,*.txt}
181 %doc src/%{name}-%{version}/doc/faq.html
182 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/fpc.cfg
183 %dir %{_libdir}/%{name}
184 %dir %{_libdir}/%{name}/%{version}
185 %dir %{_libdir}/%{name}/lexyacc
186 %{_libdir}/%{name}/%{version}/msg
187 %{_libdir}/%{name}/%{version}/units
188 %{_libdir}/%{name}/lexyacc/*
189 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc386
190 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
194 %defattr(644,root,root,755)
198 #%defattr(644,root,root,755)
199 #%doc src/%{name}-%{version}/doc/*.pdf