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