]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
- strict internal deps, use x8664 macro
[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:  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 É Delphi.
50 ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ
51 ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib, mysql, postgres, ibase.
52
53 %description -l uk
54 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ Delphi.
55 ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL (¦Â̦ÏÔÅËÏÀ ×¦ÌØÎÉÈ
56 ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib, mysql, postgres, ibase.
57
58 %package examples
59 Summary:        Free Pascal Compiler exaple programs
60 Summary(pl):    Przyk³adowe programy do kompilatora Free Pascal
61 Group:          Documentation
62 Requires:       %{name} = %{version}-%{release}
63
64 %description examples
65 Free Pascal Compiler exaple programs.
66
67 %description examples -l pl
68 Przyk³adowe programy do kompilatora Free Pascal.
69
70 %package doc
71 Summary:        Free Pascal Compiler documentation
72 Summary(pl):    Dokumentacja do kompilatora Free Pascal
73 Group:          Documentation
74 Requires:       %{name} = %{version}-%{release}
75
76 %description doc
77 Documentation for fpc in PDF format.
78
79 %description doc -l pl
80 Dokumentacja do fpc w formacie PDF.
81
82 %prep
83 %setup -q -n %{name}
84 %ifarch %{ix86}
85 tar xf %{SOURCE1}
86 %define _bname 386
87 %endif
88 %ifarch %{x8664}
89 tar xf %{SOURCE2}
90 %define _bname x64
91 %endif
92 %ifarch ppc
93 tar xf %{SOURCE3}
94 %define _bname ppc
95 %endif
96 %ifarch sparc
97 tar xf %{SOURCE4}
98 %define _bname sparc
99 %endif
100
101 tar xf binary.*-linux.tar
102
103 mkdir bin
104 cd bin
105 for i in ../*.tar.gz ; do
106         tar xzf $i
107 done
108 ln -sf `pwd`/lib/%{name}/%{version}/ppc* bin
109
110 %build
111 PP=`pwd`/bin/lib/%{name}/%{version}/ppc%{_bname}
112 NEWPP=`pwd`/compiler/ppc%{_bname}
113 NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
114
115 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
116 case "%{_build_cpu}" in
117         i386,i486)
118                 OPTF="-OG2p1" ;;
119         i586)
120                 OPTF="-OG2p2" ;;
121         i686,athlon)
122                 OPTF="-Og2p3" ;;
123         *)
124                 OPTF="-O2" ;;
125 esac
126
127 %{__make} compiler_cycle \
128         OPT="$OPTF -Xs -n" \
129         RELEASE="1" \
130         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
131         BININSTALLDIR=%{_bindir} \
132         PP="$PP" \
133         FPC="$PP" \
134         SMARTLINK=YES
135
136 %{__make} OPT="$OPTF -Xs -n" \
137         RELEASE="1" \
138         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
139         BININSTALLDIR=%{_bindir} \
140         PP="$NEWPP" \
141         FPC="$NEWPP" \
142         DATA2INC=`pwd`/utils/data2inc \
143         SMARTLINK=YES \
144         rtl_clean rtl_smart \
145         packages_base_smart \
146         fcl_smart \
147         fv_smart \
148         packages_extra_smart \
149         ide_all \
150         utils_all
151
152 export save_size=10000
153 %{__make} -C docs pdf \
154         FPDOC=$NEWFPDOC \
155         FPC="$NEWPP"
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_examplesdir}/fpc}
160
161 NEWPP=`pwd`/compiler/ppc%{_bname}
162 FPCMAKE=`pwd`/utils/fpcm/fpcmake
163 %{__make} \
164         compiler_distinstall \
165         rtl_distinstall \
166         fcl_distinstall \
167         fv_distinstall \
168         packages_distinstall \
169         ide_distinstall \
170         utils_distinstall \
171         man_install \
172         PP="$NEWPP" \
173         FPCMAKE="$FPCMAKE" \
174         SMARTLINK=YES \
175         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
176         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
177         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
178         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
179         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
180         INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
181         INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
182         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
183         CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
184
185 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
186
187 sh compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
188
189 cp -f install/doc/faq.htm faq.html
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %files
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_bindir}/*
197 %doc faq.html install/doc/{copying*,*.txt} ide/readme.ide
198 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/fpc.cfg
199 %dir %{_libdir}/%{name}
200 %dir %{_libdir}/%{name}/%{version}
201 %dir %{_libdir}/%{name}/lexyacc
202 %{_libdir}/%{name}/%{version}/msg
203 %{_libdir}/%{name}/%{version}/units
204 %{_libdir}/%{name}/%{version}/ide
205 %{_libdir}/%{name}/lexyacc/*
206 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
207 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
208 %{_mandir}/man*/*
209
210 %files examples
211 %defattr(644,root,root,755)
212 %{_examplesdir}/fpc
213
214 %files doc
215 %defattr(644,root,root,755)
216 %doc docs/*.pdf
This page took 0.039116 seconds and 4 git commands to generate.