]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
- back to rel 0.1 - doesn't build on sparc/ppc
[packages/fpc.git] / fpc.spec
1 # TODO:
2 # - check why it builds all static..
3 # - doesn't build on ppc/sparc :/ hgw why
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
8 Name:           fpc
9 Version:        2.0.2
10 Release:        0.1
11 License:        GPL
12 Group:          Development/Languages
13 Source0:        ftp://ftp.freepascal.org/pub/fpc/dist/source-%{version}/%{name}build-%{version}.tar.bz2
14 # Source0-md5:  b88893bc005c4404197ae55ef3c0de30
15 URL:            http://www.freepascal.org/
16 BuildRequires:  ncurses-devel
17 BuildRequires:  gpm-devel
18 BuildRequires:  rpmbuild(macros) >= 1.213
19 BuildRequires:  tetex-fonts-jknappen
20 BuildRequires:  tetex-format-pdflatex
21 BuildRequires:  tetex-metafont
22 BuildRequires:  fpc
23 Provides:       fpc-bootstrap
24 Requires:       binutils
25 ExclusiveArch:  %{ix86} %{x8664} ppc sparc
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
30 Free Pascal is designed to be, as much as possible, source compatible
31 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
32 attained), but it also enhances these languages with elements like
33 function overloading. And, unlike these ancestors, it supports
34 multiple platforms.
35
36 %description -l pl
37 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
38 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
39 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
40 rozszerza te jêzyki elementami takimi jak przeci±¿anie funkcji.
41
42 %description -l ru
43 FPC -- 32-ÂÉÔÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal, ÓÏ×ÍÅÓÔÉÍÙÊ Ó Turbo Pascal 7.0 É
44 Delphi. ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL
45 (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib,
46 mysql, postgres, ibase.
47
48 %description -l uk
49 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ
50 Delphi. ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL
51 (¦Â̦ÏÔÅËÏÀ ×¦ÌØÎÉÈ ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib,
52 mysql, postgres, ibase.
53
54 %package examples
55 Summary:        Free Pascal Compiler exaple programs
56 Summary(pl):    Przyk³adowe programy do kompilatora Free Pascal
57 Group:          Documentation
58 Requires:       %{name} = %{version}-%{release}
59
60 %description examples
61 Free Pascal Compiler exaple programs.
62
63 %description examples -l pl
64 Przyk³adowe programy do kompilatora Free Pascal.
65
66 %prep
67 %setup -q -n %{name}-src-%{version}
68 %ifarch %{ix86}
69 %define _bname 386
70 %endif
71 %ifarch %{x8664}
72 %define _bname x64
73 %endif
74 %ifarch ppc
75 %define _bname ppc
76 %endif
77 %ifarch sparc
78 %define _bname sparc
79 %endif
80
81 %build
82 PP=%{_bindir}/ppc%{_bname}
83 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
84 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
85
86 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
87 case "%{_build_cpu}" in
88         i386,i486)
89                 OPTF="-OG2p1" ;;
90         i586)
91                 OPTF="-OG2p2" ;;
92         i686,athlon)
93                 OPTF="-Og2p3" ;;
94         *)
95                 OPTF="-O2" ;;
96 esac
97
98 %{__make} -C fpcsrc compiler_cycle \
99         OPT="$OPTF -Xs -n" \
100         RELEASE="1" \
101         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
102         BININSTALLDIR=%{_bindir} \
103         PP="$PP" \
104         FPC="$PP" \
105         SMARTLINK=YES
106
107 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
108         RELEASE="1" \
109         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
110         BININSTALLDIR=%{_bindir} \
111         PP="$NEWPP" \
112         FPC="$NEWPP" \
113         DATA2INC=`pwd`/utils/data2inc \
114         SMARTLINK=YES \
115         rtl_clean rtl_smart \
116         packages_base_smart \
117         fcl_smart \
118         fv_smart \
119         packages_extra_smart \
120         ide_all \
121         utils_all
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_examplesdir}/fpc}
126
127 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
128 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
129 %{__make} -C fpcsrc \
130         compiler_distinstall \
131         rtl_distinstall \
132         fcl_distinstall \
133         fv_distinstall \
134         packages_distinstall \
135         ide_distinstall \
136         utils_distinstall \
137         PP="$NEWPP" \
138         FPCMAKE="$FPCMAKE" \
139         SMARTLINK=YES \
140         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
141         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
142         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
143         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
144         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
145         INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
146         INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
147         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
148         CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
149
150 %{__make} -C install/man installman \
151         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
152
153 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
154
155 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
156
157 %clean
158 rm -rf $RPM_BUILD_ROOT
159
160 %files
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_bindir}/*
163 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
164 %dir %{_libdir}/%{name}
165 %dir %{_libdir}/%{name}/%{version}
166 %dir %{_libdir}/%{name}/lexyacc
167 %{_libdir}/%{name}/%{version}/msg
168 %{_libdir}/%{name}/%{version}/units
169 %{_libdir}/%{name}/%{version}/ide
170 %{_libdir}/%{name}/lexyacc/*
171 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
172 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
173 %{_mandir}/man*/*
174
175 %files examples
176 %defattr(644,root,root,755)
177 %{_examplesdir}/fpc
This page took 0.040941 seconds and 4 git commands to generate.