]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
- up to 2.4.4
[packages/fpc.git] / fpc.spec
1 # TODO:
2 # - repair ide build
3 #
4 # Conditional build:
5 %bcond_with     ide                     # build with ide
6 %bcond_without  doc                     # build without doc
7
8 Summary:        32-bit compiler for the i386 and m68k processors
9 Summary(pl.UTF-8):      32 bitowy kompilator dla procesorów i386 i m68k
10 Summary(ru.UTF-8):      Свободный компилятор Pascal
11 Summary(uk.UTF-8):      Вільний компілятор Pascal
12 Name:           fpc
13 Version:        2.4.4
14 Release:        0.1
15 License:        GPL
16 Group:          Development/Languages
17 Source0:        ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/%{name}build-%{version}.tar.gz
18 # Source0-md5:  d069dfd3412bd0d26dcd1b81ac998305
19 Source1:        ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
20 # Source1-md5:  e761c4866ac4c8fcbe09f657f315ec32
21 Source2:        ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
22 # Source2-md5:  058e6cd765026748a2bd24c86f1ecf18
23 Source3:        ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
24 # Source3-md5:  cea93e5da48c45da3147236cba75dc76
25 Patch0:         %{name}-skip-dev-dot.patch
26 Patch1:         %{name}-fpdoc.patch
27 URL:            http://www.freepascal.org/
28 BuildRequires:  binutils-static >= 3:2.17.50
29 BuildRequires:  gdb-lib
30 BuildRequires:  gpm-devel
31 BuildRequires:  ncurses-devel
32 %{?with_ide:BuildRequires:      readline-static}
33 BuildRequires:  rpmbuild(macros) >= 1.213
34 %{?with_doc:BuildRequires:      tetex-fonts-jknappen}
35 %{?with_doc:BuildRequires:      tetex-format-pdflatex}
36 %{?with_doc:BuildRequires:      tetex-makeindex}
37 %{?with_doc:BuildRequires:      tetex-metafont}
38 %{?with_doc:BuildRequires:      texlive-xetex}
39 Requires:       binutils
40 Provides:       fpc-bootstrap
41 ExclusiveArch:  %{ix86} %{x8664} ppc
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
46 Free Pascal is designed to be, as much as possible, source compatible
47 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
48 attained), but it also enhances these languages with elements like
49 function overloading. And, unlike these ancestors, it supports
50 multiple platforms.
51
52 %description -l pl.UTF-8
53 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
54 Free Pascal został zaprojektowany by być (jak tylko to możliwe)
55 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
56 rozszerza te języki elementami takimi jak przeciążanie funkcji.
57
58 %description -l ru.UTF-8
59 FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
60 Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
61 (библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
62 mysql, postgres, ibase.
63
64 %description -l uk.UTF-8
65 FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
66 Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
67 (бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
68 mysql, postgres, ibase.
69
70 %package src
71 Summary:        Free Pascal Compiler source files
72 Summary(pl.UTF-8):      Pliki źródłowe kompilatora Free Pascal
73 Group:          Development
74 Requires:       %{name} = %{version}-%{release}
75 Provides:       fpcsrc
76
77 %description src
78 Free Pascal Compiler source files.
79
80 %description src -l pl.UTF-8
81 Pliki źródłowe kompilatora Free Pascal.
82
83 %package examples
84 Summary:        Free Pascal Compiler exaple programs
85 Summary(pl.UTF-8):      Przykładowe programy do kompilatora Free Pascal
86 Group:          Documentation
87 Requires:       %{name} = %{version}-%{release}
88
89 %description examples
90 Free Pascal Compiler exaple programs.
91
92 %description examples -l pl.UTF-8
93 Przykładowe programy do kompilatora Free Pascal.
94
95 %package doc
96 Summary:        Free Pascal Compiler documentation
97 Summary(pl.UTF-8):      Dokumentacja do kompilatora Free Pascal
98 Group:          Documentation
99 # doesn't require base
100
101 %description doc
102 Documentation for fpc in PDF format.
103
104 %description doc -l pl.UTF-8
105 Dokumentacja do fpc w formacie PDF.
106
107 %prep
108 %setup -q -n %{name}build-%{version}
109 %patch0 -p1
110 %patch1 -p1
111
112 %ifarch %{ix86}
113 tar xf %{SOURCE1}
114 %define _bver %{version}
115 %define _bname 386
116 %endif
117 %ifarch %{x8664}
118 tar xf %{SOURCE2}
119 %define _bver %{version}
120 %define _bname x64
121 %endif
122 %ifarch ppc
123 tar xf %{SOURCE3}
124 %define _bver %{version}
125 %define _bname ppc
126 %endif
127
128 tar xf binary.*-linux.tar
129
130 mkdir bin
131 cd bin
132 for i in ../*.tar.gz ; do
133         tar xzf $i
134 done
135 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
136
137 %build
138 # save for fpc-src
139 install -d fpc-src
140 cp -af fpcsrc/* fpc-src
141
142 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
143 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
144 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
145
146 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
147 case "%{_build_cpu}" in
148         i386) OPTF="-OG2p1" ;;
149         i486) OPTF="-OG2p1" ;;
150         i586) OPTF="-OG2p2" ;;
151         i686) OPTF="-Og2p3" ;;
152         athlon) OPTF="-Og2p3" ;;
153         *) OPTF="-O2" ;;
154 esac
155
156 %{__make} -C fpcsrc compiler_cycle \
157         OPT="$OPTF -Xs -n" \
158         RELEASE="1" \
159         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
160         BININSTALLDIR=%{_bindir} \
161         PP="$PP" \
162         FPC="$PP" \
163         LINKSMART=YES
164
165 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
166         RELEASE="1" \
167         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
168         BININSTALLDIR=%{_bindir} \
169         GDBLIBDIR=%{_libdir} \
170         PP="$NEWPP" \
171         FPC="$NEWPP" \
172         FPDOC=$NEWFPDOC \
173         DATA2INC=`pwd`/utils/data2inc \
174         LINKSMART=YES \
175         NODOCS=YES \
176         rtl_clean \
177         packages_clean \
178         utils_clean \
179         %{?with_ide: ide_clean installer_clean} \
180         rtl_all \
181         packages_all \
182         utils_all %{?with_ide:installer_all}
183
184 #       %{?with_ide:IDE=YES} \
185 %if %{with ide}
186 %{__make} -C fpcsrc/ide OPT="$OPTF -Xs -n" \
187         RELEASE="1" \
188         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
189         BININSTALLDIR=%{_bindir} \
190         GDBLIBDIR=%{_libdir} \
191         PP="$NEWPP" \
192         FPC="$NEWPP" \
193         FPDOC=$NEWFPDOC \
194         DATA2INC=`pwd`/utils/data2inc \
195         LINKSMART=YES \
196         clean \
197         default \
198         gdb
199 %endif
200 #       %{?with_ide:installer_clean} \
201 #       %{?with_ide:installer_all}
202
203 %if %{with doc}
204 export save_size=10000
205 %{__make} -j1 -C fpcdocs \
206         FPDOC=$NEWFPDOC \
207         FPC="$NEWPP" \
208         pdf
209 %endif
210
211 %install
212 rm -rf $RPM_BUILD_ROOT
213 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
214
215 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
216
217 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
218 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
219 %{__make} -j1 -C fpcsrc \
220         compiler_distinstall \
221         rtl_distinstall \
222         packages_distinstall \
223         %{?with_ide:ide_distinstall} \
224         utils_distinstall \
225         PP="$NEWPP" \
226         FPCMAKE="$FPCMAKE" \
227         SMARTLINK=YES \
228         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
229         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
230         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
231         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
232         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
233         INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
234         INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
235         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
236         CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
237
238 %{__make} -j1 -C install/man installman \
239         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
240
241 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
242
243 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
244
245 %clean
246 rm -rf $RPM_BUILD_ROOT
247
248 %files
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/*
251 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
252 %dir %{_libdir}/%{name}
253 %dir %{_libdir}/%{name}/%{version}
254 %dir %{_libdir}/%{name}/lexyacc
255 %{_libdir}/%{name}/%{version}/msg
256 %{_libdir}/%{name}/%{version}/units
257 %if %{with ide}
258 %{_libdir}/%{name}/%{version}/ide
259 %endif
260 %{_libdir}/%{name}/lexyacc/*
261 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
262 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
263 %{_mandir}/man*/*
264
265 %files src
266 %defattr(644,root,root,755)
267 %{_datadir}/fpcsrc
268
269 %files examples
270 %defattr(644,root,root,755)
271 %{_examplesdir}/fpc
272
273 %if %{with doc}
274 %files doc
275 %defattr(644,root,root,755)
276 %doc fpcdocs/*.pdf
277 %endif
This page took 0.076765 seconds and 4 git commands to generate.