]> git.pld-linux.org Git - packages/fpc.git/blame - fpc.spec
- up to 2.4.4
[packages/fpc.git] / fpc.spec
CommitLineData
3c3a6271 1# TODO:
d59a3c01
BZ
2# - repair ide build
3#
4# Conditional build:
5%bcond_with ide # build with ide
6%bcond_without doc # build without doc
7
e8f622a3 8Summary: 32-bit compiler for the i386 and m68k processors
1d1a4bc8
ER
9Summary(pl.UTF-8): 32 bitowy kompilator dla procesorów i386 i m68k
10Summary(ru.UTF-8): Свободный компилятор Pascal
11Summary(uk.UTF-8): Вільний компілятор Pascal
e8f622a3 12Name: fpc
c91c2c23
JR
13Version: 2.4.4
14Release: 0.1
68db2ce9 15License: GPL
e8f622a3 16Group: Development/Languages
7ab23651 17Source0: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/%{name}build-%{version}.tar.gz
c91c2c23 18# Source0-md5: d069dfd3412bd0d26dcd1b81ac998305
7ab23651 19Source1: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
c91c2c23 20# Source1-md5: e761c4866ac4c8fcbe09f657f315ec32
7ab23651 21Source2: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
c91c2c23 22# Source2-md5: 058e6cd765026748a2bd24c86f1ecf18
e7da2251 23Source3: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
c91c2c23 24# Source3-md5: cea93e5da48c45da3147236cba75dc76
786da423 25Patch0: %{name}-skip-dev-dot.patch
429bc25f 26Patch1: %{name}-fpdoc.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}
cbfcda9f 38%{?with_doc:BuildRequires: texlive-xetex}
7da7a711 39Requires: binutils
41cff313 40Provides: fpc-bootstrap
0ba63043 41ExclusiveArch: %{ix86} %{x8664} ppc
e7e4f882 42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
e8f622a3
AM
43
44%description
5da97089 45Free Pascal is a 32-bit compiler for the i386 and m68k processors.
46Free Pascal is designed to be, as much as possible, source compatible
47with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
48attained), but it also enhances these languages with elements like
49function overloading. And, unlike these ancestors, it supports
50multiple platforms.
e8f622a3 51
6b989699
JR
52%description -l pl.UTF-8
53Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
54Free Pascal został zaprojektowany by być (jak tylko to możliwe)
55kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
56rozszerza te języki elementami takimi jak przeciążanie funkcji.
e8f622a3 57
6b989699
JR
58%description -l ru.UTF-8
59FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
60Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
61(библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
3c3a6271 62mysql, postgres, ibase.
def44520 63
6b989699
JR
64%description -l uk.UTF-8
65FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
66Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
67(бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
3c3a6271 68mysql, postgres, ibase.
def44520 69
412a5ed9
KK
70%package src
71Summary: Free Pascal Compiler source files
1d1a4bc8 72Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal
412a5ed9 73Group: Development
412a5ed9 74Requires: %{name} = %{version}-%{release}
41cff313 75Provides: fpcsrc
412a5ed9
KK
76
77%description src
78Free Pascal Compiler source files.
79
6b989699
JR
80%description src -l pl.UTF-8
81Pliki źródłowe kompilatora Free Pascal.
412a5ed9 82
1eee4a0c
JR
83%package examples
84Summary: Free Pascal Compiler exaple programs
1d1a4bc8 85Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal
1eee4a0c 86Group: Documentation
3f331815 87Requires: %{name} = %{version}-%{release}
1eee4a0c
JR
88
89%description examples
90Free Pascal Compiler exaple programs.
91
6b989699
JR
92%description examples -l pl.UTF-8
93Przykładowe programy do kompilatora Free Pascal.
1eee4a0c 94
786da423
JR
95%package doc
96Summary: Free Pascal Compiler documentation
1d1a4bc8 97Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal
786da423 98Group: Documentation
7ab23651 99# doesn't require base
786da423
JR
100
101%description doc
102Documentation for fpc in PDF format.
103
6b989699 104%description doc -l pl.UTF-8
786da423
JR
105Dokumentacja do fpc w formacie PDF.
106
e8f622a3 107%prep
d59a3c01 108%setup -q -n %{name}build-%{version}
786da423 109%patch0 -p1
429bc25f 110%patch1 -p1
d59a3c01 111
d3e9323d 112%ifarch %{ix86}
786da423 113tar xf %{SOURCE1}
4e71325a 114%define _bver %{version}
d3e9323d 115%define _bname 386
116%endif
3f331815 117%ifarch %{x8664}
786da423 118tar xf %{SOURCE2}
4e71325a 119%define _bver %{version}
d3e9323d 120%define _bname x64
121%endif
add5738b 122%ifarch ppc
786da423 123tar xf %{SOURCE3}
4e71325a 124%define _bver %{version}
add5738b 125%define _bname ppc
126%endif
d3e9323d 127
786da423
JR
128tar xf binary.*-linux.tar
129
130mkdir bin
131cd bin
132for i in ../*.tar.gz ; do
133 tar xzf $i
134done
4e71325a 135ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
786da423 136
1eee4a0c 137%build
412a5ed9
KK
138# save for fpc-src
139install -d fpc-src
140cp -af fpcsrc/* fpc-src
141
4e71325a 142PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
80841e72 143NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
144NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
d3e9323d 145
ca161524 146# DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
147case "%{_build_cpu}" in
d59a3c01
BZ
148 i386) OPTF="-OG2p1" ;;
149 i486) OPTF="-OG2p1" ;;
150 i586) OPTF="-OG2p2" ;;
151 i686) OPTF="-Og2p3" ;;
152 athlon) OPTF="-Og2p3" ;;
153 *) OPTF="-O2" ;;
ca161524 154esac
155
80841e72 156%{__make} -C fpcsrc compiler_cycle \
a5bf4f1a 157 OPT="$OPTF -Xs -n" \
d88793f7 158 RELEASE="1" \
e8f622a3
AM
159 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
160 BININSTALLDIR=%{_bindir} \
1eee4a0c 161 PP="$PP" \
94c54379 162 FPC="$PP" \
d59a3c01 163 LINKSMART=YES
94c54379 164
80841e72 165%{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
d88793f7 166 RELEASE="1" \
5edb3786
SZ
167 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
168 BININSTALLDIR=%{_bindir} \
fee73cf5 169 GDBLIBDIR=%{_libdir} \
5edb3786 170 PP="$NEWPP" \
94c54379 171 FPC="$NEWPP" \
d59a3c01 172 FPDOC=$NEWFPDOC \
d3e9323d 173 DATA2INC=`pwd`/utils/data2inc \
d59a3c01
BZ
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}
f5681e7a 202
d59a3c01 203%if %{with doc}
786da423 204export save_size=10000
cbfcda9f 205%{__make} -j1 -C fpcdocs \
786da423
JR
206 FPDOC=$NEWFPDOC \
207 FPC="$NEWPP" \
208 pdf
d59a3c01 209%endif
786da423 210
e8f622a3
AM
211%install
212rm -rf $RPM_BUILD_ROOT
412a5ed9
KK
213install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
214
215cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
e8f622a3 216
80841e72 217NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
218FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
7be7bd7e 219%{__make} -j1 -C fpcsrc \
f5681e7a 220 compiler_distinstall \
221 rtl_distinstall \
f5681e7a 222 packages_distinstall \
d59a3c01 223 %{?with_ide:ide_distinstall} \
f5681e7a 224 utils_distinstall \
d3e9323d 225 PP="$NEWPP" \
226 FPCMAKE="$FPCMAKE" \
f5681e7a 227 SMARTLINK=YES \
8bf0c9cb 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} \
d88793f7 233 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
f5681e7a 234 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
7da7a711 235 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
d88793f7 236 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
d3e9323d 237
7be7bd7e 238%{__make} -j1 -C install/man installman \
80841e72 239 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
9a679a53 240
80841e72 241ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
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/*
d3e9323d 261%attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
1eee4a0c 262%attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
7da7a711 263%{_mandir}/man*/*
1eee4a0c 264
412a5ed9
KK
265%files src
266%defattr(644,root,root,755)
267%{_datadir}/fpcsrc
268
1eee4a0c
JR
269%files examples
270%defattr(644,root,root,755)
f5681e7a 271%{_examplesdir}/fpc
786da423 272
d59a3c01 273%if %{with doc}
786da423
JR
274%files doc
275%defattr(644,root,root,755)
276%doc fpcdocs/*.pdf
d59a3c01 277%endif
This page took 0.192009 seconds and 4 git commands to generate.