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