]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
- up to 2.0.4
[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.4
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.gz
14 # Source0-md5:  1ff8b80d1f5f564983bb4e1550b8b53a
15 Source1:        ftp://ftp.freepascal.org/pub/fpc/dist/i386-linux-%{version}/%{name}-%{version}.i386-linux.tar
16 # Source1-md5:  d826aab69c98b9efe30398ff63e4c9d9
17 Source2:        ftp://ftp.freepascal.org/pub/fpc/dist/x86_64-linux-%{version}/%{name}-%{version}.x86_64-linux.tar
18 # Source2-md5:  3bbfe4c061ebd40502789eccef069d7c
19 Source3:        ftp://ftp.freepascal.org/pub/fpc/dist/powerpc-linux-%{version}/%{name}-%{version}.powerpc-linux.tar
20 # Source3-md5:  6ec5302fe446d94e5aaa1e159b0d65df
21 # no 2.0.4 binary for sparc, 2.0.0 only
22 Source4:        ftp://ftp.freepascal.org/pub/fpc/dist/sparc-linux-2.0.0/%{name}-2.0.0.sparc-linux.tar
23 # Source4-md5:  dd8925ce8ce93309456c3072e6e4d14d
24 Patch0:         %{name}-skip-dev-dot.patch
25 Patch1:         %{name}-makedocs.patch
26 URL:            http://www.freepascal.org/
27 BuildRequires:  ncurses-devel
28 BuildRequires:  gpm-devel
29 BuildRequires:  rpmbuild(macros) >= 1.213
30 BuildRequires:  tetex-fonts-jknappen
31 BuildRequires:  tetex-format-pdflatex
32 BuildRequires:  tetex-makeindex
33 BuildRequires:  tetex-metafont
34 Provides:       fpc-bootstrap
35 Requires:       binutils
36 ExclusiveArch:  %{ix86} %{x8664} ppc sparc
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
41 Free Pascal is designed to be, as much as possible, source compatible
42 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
43 attained), but it also enhances these languages with elements like
44 function overloading. And, unlike these ancestors, it supports
45 multiple platforms.
46
47 %description -l pl
48 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
49 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
50 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
51 rozszerza te jêzyki elementami takimi jak przeci±¿anie funkcji.
52
53 %description -l ru
54 FPC -- 32-ÂÉÔÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal, ÓÏ×ÍÅÓÔÉÍÙÊ Ó Turbo Pascal 7.0 É
55 Delphi. ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL
56 (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib,
57 mysql, postgres, ibase.
58
59 %description -l uk
60 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ
61 Delphi. ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL
62 (¦Â̦ÏÔÅËÏÀ ×¦ÌØÎÉÈ ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib,
63 mysql, postgres, ibase.
64
65 %package src
66 Summary:        Free Pascal Compiler source files
67 Summary(pl):    Pliki ¼ród³owe kompilatora Free Pascal
68 Group:          Development
69 Provides:       fpcsrc
70 Requires:       %{name} = %{version}-%{release}
71
72 %description src
73 Free Pascal Compiler source files.
74
75 %description src -l pl
76 Pliki ¼ród³owe kompilatora Free Pascal.
77
78 %package examples
79 Summary:        Free Pascal Compiler exaple programs
80 Summary(pl):    Przyk³adowe programy do kompilatora Free Pascal
81 Group:          Documentation
82 Requires:       %{name} = %{version}-%{release}
83
84 %description examples
85 Free Pascal Compiler exaple programs.
86
87 %description examples -l pl
88 Przyk³adowe programy do kompilatora Free Pascal.
89
90 %package doc
91 Summary:        Free Pascal Compiler documentation
92 Summary(pl):    Dokumentacja do kompilatora Free Pascal
93 Group:          Documentation
94 Requires:       %{name} = %{version}
95
96 %description doc
97 Documentation for fpc in PDF format.
98
99 %description doc -l pl
100 Dokumentacja do fpc w formacie PDF.
101
102 %prep
103 %setup -q -n %{name}build_%{version}_exp
104 %patch0 -p1
105 %patch1 -p1
106 %ifarch %{ix86}
107 tar xf %{SOURCE1}
108 %define _bname 386
109 %endif
110 %ifarch %{x8664}
111 tar xf %{SOURCE2}
112 %define _bname x64
113 %endif
114 %ifarch ppc
115 tar xf %{SOURCE3}
116 %define _bname ppc
117 %endif
118 %ifarch sparc
119 tar xf %{SOURCE4}
120 %define _bname sparc
121 %endif
122
123 tar xf binary.*-linux.tar
124
125 mkdir bin
126 cd bin
127 for i in ../*.tar.gz ; do
128         tar xzf $i
129 done
130 ln -sf `pwd`/lib/%{name}/%{version}/ppc* bin
131
132 %build
133 # save for fpc-src
134 install -d fpc-src
135 cp -af fpcsrc/* fpc-src
136
137 PP=`pwd`/bin/lib/%{name}/%{version}/ppc%{_bname}
138 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
139 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
140
141 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
142 case "%{_build_cpu}" in
143         i386,i486)
144                 OPTF="-OG2p1" ;;
145         i586)
146                 OPTF="-OG2p2" ;;
147         i686,athlon)
148                 OPTF="-Og2p3" ;;
149         *)
150                 OPTF="-O2" ;;
151 esac
152
153 %{__make} -C fpcsrc compiler_cycle \
154         OPT="$OPTF -Xs -n" \
155         RELEASE="1" \
156         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
157         BININSTALLDIR=%{_bindir} \
158         PP="$PP" \
159         FPC="$PP" \
160         SMARTLINK=YES
161
162 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
163         RELEASE="1" \
164         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
165         BININSTALLDIR=%{_bindir} \
166         PP="$NEWPP" \
167         FPC="$NEWPP" \
168         DATA2INC=`pwd`/utils/data2inc \
169         SMARTLINK=YES \
170         rtl_clean rtl_smart \
171         packages_base_smart \
172         fcl_smart \
173         fv_smart \
174         packages_extra_smart \
175         ide_all \
176         utils_all
177
178 export save_size=10000
179 %{__make} -C fpcdocs \
180         FPDOC=$NEWFPDOC \
181         FPC="$NEWPP" \
182         pdf
183
184 %install
185 rm -rf $RPM_BUILD_ROOT
186 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
187
188 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
189
190 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
191 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
192 %{__make} -C fpcsrc \
193         compiler_distinstall \
194         rtl_distinstall \
195         fcl_distinstall \
196         fv_distinstall \
197         packages_distinstall \
198         ide_distinstall \
199         utils_distinstall \
200         PP="$NEWPP" \
201         FPCMAKE="$FPCMAKE" \
202         SMARTLINK=YES \
203         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
204         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
205         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
206         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
207         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
208         INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
209         INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
210         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
211         CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
212
213 %{__make} -C install/man installman \
214         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
215
216 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
217
218 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
219
220 %clean
221 rm -rf $RPM_BUILD_ROOT
222
223 %files
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_bindir}/*
226 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
227 %dir %{_libdir}/%{name}
228 %dir %{_libdir}/%{name}/%{version}
229 %dir %{_libdir}/%{name}/lexyacc
230 %{_libdir}/%{name}/%{version}/msg
231 %{_libdir}/%{name}/%{version}/units
232 %{_libdir}/%{name}/%{version}/ide
233 %{_libdir}/%{name}/lexyacc/*
234 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
235 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
236 %{_mandir}/man*/*
237
238 %files src
239 %defattr(644,root,root,755)
240 %{_datadir}/fpcsrc
241
242 %files examples
243 %defattr(644,root,root,755)
244 %{_examplesdir}/fpc
245
246 %files doc
247 %defattr(644,root,root,755)
248 %doc fpcdocs/*.pdf
This page took 0.110869 seconds and 4 git commands to generate.