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