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