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