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