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