]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
8917d62a56871b07eb4901e51fb72a5ccaec2704
[packages/fpc.git] / fpc.spec
1 # TODO:
2 # - check why it builds all static..
3 Summary:        32-bit compiler for the i386 and m68k processors
4 Summary(pl):    32 bitowy kompilator dla procesorów i386 i m68k
5 Summary(ru):    ó×ÏÂÏÄÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal
6 Summary(uk):    ÷¦ÌØÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal
7 Name:           fpc
8 Version:        2.0.0
9 Release:        1
10 License:        GPL
11 Group:          Development/Languages
12 Vendor:         Michael Van Canneyt <michael@tfdec1.fys.kuleuven.ac.be>
13 Source0:        http://dl.sourceforge.net/freepascal/%{name}-%{version}.source.tar.gz
14 # Source0-md5:  3f9c64d0146a3631f6963fd7477776d1
15 Source1:        http://dl.sourceforge.net/freepascal/%{name}-%{version}.i386-linux.tar
16 # Source1-md5:  5f0a5fba632a811dcfdafe0ff80476a3
17 Source2:        http://dl.sourceforge.net/freepascal/%{name}-%{version}.x86_64-linux.tar
18 # Source2-md5:  36270de604c6b5ad3af8aaa08143e88f
19 Source3:        http://dl.sourceforge.net/freepascal/%{name}-%{version}.powerpc-linux.tar
20 # Source3-md5:  7019384e09411902e530dfe55d4ff145
21 Source4:        http://dl.sourceforge.net/freepascal/%{name}-%{version}.sparc-linux.tar
22 # Source4-md5:  dd8925ce8ce93309456c3072e6e4d14d
23 URL:            http://www.freepascal.org/
24 BuildRequires:  ncurses-devel
25 BuildRequires:  gpm-devel
26 BuildRequires:  rpmbuild(macros) >= 1.213
27 BuildRequires:  tetex-fonts-jknappen
28 BuildRequires:  tetex-format-pdflatex
29 BuildRequires:  tetex-metafont
30 Requires:       binutils
31 ExclusiveArch:  %{ix86} %{x8664} ppc sparc
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
36 Free Pascal is designed to be, as much as possible, source compatible
37 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
38 attained), but it also enhances these languages with elements like
39 function overloading. And, unlike these ancestors, it supports
40 multiple platforms.
41
42 %description -l pl
43 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
44 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
45 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
46 rozszerza te jêzyki elementami takimi jak przeci±¿anie funkcji.
47
48 %description -l ru
49 FPC -- 32-ÂÉÔÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal, ÓÏ×ÍÅÓÔÉÍÙÊ Ó Turbo Pascal 7.0 É
50 Delphi. ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL
51 (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib,
52 mysql, postgres, ibase.
53
54 %description -l uk
55 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ
56 Delphi. ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL
57 (¦Â̦ÏÔÅËÏÀ ×¦ÌØÎÉÈ ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib,
58 mysql, postgres, ibase.
59
60 %package examples
61 Summary:        Free Pascal Compiler exaple programs
62 Summary(pl):    Przyk³adowe programy do kompilatora Free Pascal
63 Group:          Documentation
64 Requires:       %{name} = %{version}-%{release}
65
66 %description examples
67 Free Pascal Compiler exaple programs.
68
69 %description examples -l pl
70 Przyk³adowe programy do kompilatora Free Pascal.
71
72 %package doc
73 Summary:        Free Pascal Compiler documentation
74 Summary(pl):    Dokumentacja do kompilatora Free Pascal
75 Group:          Documentation
76 Requires:       %{name} = %{version}-%{release}
77
78 %description doc
79 Documentation for fpc in PDF format.
80
81 %description doc -l pl
82 Dokumentacja do fpc w formacie PDF.
83
84 %prep
85 %setup -q -n %{name}
86 %ifarch %{ix86}
87 tar xf %{SOURCE1}
88 %define _bname 386
89 %endif
90 %ifarch %{x8664}
91 tar xf %{SOURCE2}
92 %define _bname x64
93 %endif
94 %ifarch ppc
95 tar xf %{SOURCE3}
96 %define _bname ppc
97 %endif
98 %ifarch sparc
99 tar xf %{SOURCE4}
100 %define _bname sparc
101 %endif
102
103 tar xf binary.*-linux.tar
104
105 mkdir bin
106 cd bin
107 for i in ../*.tar.gz ; do
108         tar xzf $i
109 done
110 ln -sf `pwd`/lib/%{name}/%{version}/ppc* bin
111
112 %build
113 PP=`pwd`/bin/lib/%{name}/%{version}/ppc%{_bname}
114 NEWPP=`pwd`/compiler/ppc%{_bname}
115 NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
116
117 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
118 case "%{_build_cpu}" in
119         i386,i486)
120                 OPTF="-OG2p1" ;;
121         i586)
122                 OPTF="-OG2p2" ;;
123         i686,athlon)
124                 OPTF="-Og2p3" ;;
125         *)
126                 OPTF="-O2" ;;
127 esac
128
129 %{__make} compiler_cycle \
130         OPT="$OPTF -Xs -n" \
131         RELEASE="1" \
132         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
133         BININSTALLDIR=%{_bindir} \
134         PP="$PP" \
135         FPC="$PP" \
136         SMARTLINK=YES
137
138 %{__make} OPT="$OPTF -Xs -n" \
139         RELEASE="1" \
140         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
141         BININSTALLDIR=%{_bindir} \
142         PP="$NEWPP" \
143         FPC="$NEWPP" \
144         DATA2INC=`pwd`/utils/data2inc \
145         SMARTLINK=YES \
146         rtl_clean rtl_smart \
147         packages_base_smart \
148         fcl_smart \
149         fv_smart \
150         packages_extra_smart \
151         ide_all \
152         utils_all
153
154 export save_size=10000
155 %{__make} -C docs pdf \
156         FPDOC=$NEWFPDOC \
157         FPC="$NEWPP"
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_examplesdir}/fpc}
162
163 NEWPP=`pwd`/compiler/ppc%{_bname}
164 FPCMAKE=`pwd`/utils/fpcm/fpcmake
165 %{__make} \
166         compiler_distinstall \
167         rtl_distinstall \
168         fcl_distinstall \
169         fv_distinstall \
170         packages_distinstall \
171         ide_distinstall \
172         utils_distinstall \
173         man_install \
174         PP="$NEWPP" \
175         FPCMAKE="$FPCMAKE" \
176         SMARTLINK=YES \
177         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
178         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
179         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
180         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
181         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
182         INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
183         INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
184         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
185         CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
186
187 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
188
189 sh compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
190
191 cp -f install/doc/faq.htm faq.html
192
193 %clean
194 rm -rf $RPM_BUILD_ROOT
195
196 %files
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_bindir}/*
199 %doc faq.html install/doc/{copying*,*.txt} ide/readme.ide
200 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
201 %dir %{_libdir}/%{name}
202 %dir %{_libdir}/%{name}/%{version}
203 %dir %{_libdir}/%{name}/lexyacc
204 %{_libdir}/%{name}/%{version}/msg
205 %{_libdir}/%{name}/%{version}/units
206 %{_libdir}/%{name}/%{version}/ide
207 %{_libdir}/%{name}/lexyacc/*
208 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
209 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
210 %{_mandir}/man*/*
211
212 %files examples
213 %defattr(644,root,root,755)
214 %{_examplesdir}/fpc
215
216 %files doc
217 %defattr(644,root,root,755)
218 %doc docs/*.pdf
This page took 0.040725 seconds and 2 git commands to generate.