]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
- manuals
[packages/fpc.git] / fpc.spec
1 # TODO: 
2 # - documentation
3 # - check why it builds all static..
4 Summary:        32-bit compiler for the i386 and m68k processors
5 Summary(pl):    32 bitowy kompilator dla procesorów i386 i m68k
6 Summary(ru):    ó×ÏÂÏÄÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal
7 Summary(uk):    ÷¦ÌØÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal
8 Name:           fpc
9 Version:        2.0.0
10 Release:        0.1
11 License:        GPL
12 Group:          Development/Languages
13 Vendor:         Michael Van Canneyt <michael@tfdec1.fys.kuleuven.ac.be>
14 Source0:        http://switch.dl.sourceforge.net/sourceforge/freepascal/%{name}-%{version}.source.tar.gz
15 # Source0-md5:  3f9c64d0146a3631f6963fd7477776d1
16 Source1:        http://dl.sourceforge.net/freepascal/fpc-%{version}.i386-linux.tar
17 # Source1-md5:  5f0a5fba632a811dcfdafe0ff80476a3
18 Source2:        http://dl.sourceforge.net/freepascal/fpc-%{version}.x86_64-linux.tar
19 # Source2-md5:  36270de604c6b5ad3af8aaa08143e88f
20 Source3:        http://dl.sourceforge.net/freepascal/fpc-%{version}.powerpc-linux.tar
21 # Source3-md5:  7019384e09411902e530dfe55d4ff145
22 Source4:        http://dl.sourceforge.net/freepascal/%{name}-%{version}.sparc-linux.tar
23 # Source4-md5:  dd8925ce8ce93309456c3072e6e4d14d
24 #Source2:       %{name}-sample.cfg
25 URL:            http://www.freepascal.org/
26 #BuildRequires: zlib-devel
27 BuildRequires:  ncurses-devel
28 BuildRequires:  gpm-devel
29 BuildRequires:  tetex-format-pdflatex
30 Requires:       binutils
31 ExclusiveArch:  %{ix86} m68k amd64 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}
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}
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 amd64
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 %{__make} compiler_cycle \
116         OPT="$OPTF -Xs -n" \
117         RELEASE="1" \
118         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
119         BININSTALLDIR=%{_bindir} \
120         PP="$PP" \
121         FPC="$PP" \
122         SMARTLINK=YES
123
124 %{__make} OPT="$OPTF -Xs -n" \
125         RELEASE="1" \
126         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
127         BININSTALLDIR=%{_bindir} \
128         PP="$NEWPP" \
129         FPC="$NEWPP" \
130         DATA2INC=`pwd`/utils/data2inc \
131         SMARTLINK=YES \
132         rtl_clean rtl_smart \
133         packages_base_smart \
134         fcl_smart \
135         fv_smart \
136         packages_extra_smart \
137         ide_all \
138         utils_all
139
140 #%{__make} -C docs pdf \
141 #       FPDOC=$NEWFPDOC \
142 #       FPC="$NEWPP"
143
144 %install
145 rm -rf $RPM_BUILD_ROOT
146 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_examplesdir}/fpc}
147
148 NEWPP=`pwd`/compiler/ppc%{_bname}
149 FPCMAKE=`pwd`/utils/fpcm/fpcmake
150 %{__make} \
151         compiler_distinstall \
152         rtl_distinstall \
153         fcl_distinstall \
154         fv_distinstall \
155         packages_distinstall \
156         ide_distinstall \
157         utils_distinstall \
158         man_install \
159         PP="$NEWPP" \
160         FPCMAKE="$FPCMAKE" \
161         SMARTLINK=YES \
162         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
163         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
164         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
165         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
166         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
167         INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
168         INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
169         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
170         CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
171
172 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
173
174 sh compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
175
176 #%{__make} -C src/%{name}-%{version}/docs pdfinstall DOCINSTALLDIR=$RPM_BUILD_ROOT%{_docdir}
177
178 #cp -af src/%{name}-%{version}/doc/examples/* $RPM_BUILD_ROOT%{_examplesdir}/fpc
179
180 #ln -sf ../lib/%{name}/%{version}/ppc386 $RPM_BUILD_ROOT%{_bindir}/ppc386
181 #ln -sf ppc386 $RPM_BUILD_ROOT%{_bindir}/fpc
182
183 #cp -af src/%{name}-%{version}/doc/faq.htm src/%{name}-%{version}/doc/faq.html
184
185 #ln -sf %{_bindir}/{as,ld} $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 #%post
191 #umask 022
192 #GCCSPEC=`(gcc -v 2>&1)| head -n 1| awk '{ print $4 } '`
193 #GCCDIR=`dirname $GCCSPEC`
194 #echo "Found libgcc.a in $GCCDIR"
195 #sed -e "s#\$GCCDIR#$GCCDIR#" %{_sysconfdir}/fpc.cfg > %{_sysconfdir}/fpc.cfg.new
196 #sed -e "s#\$1#%{_libdir}/%{name}/%{version}#" %{_sysconfdir}/fpc.cfg.new > %{_sysconfdir}/fpc.cfg
197 #rm -f %{_sysconfdir}/fpc.cfg.new
198
199 %files
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_bindir}/*
202 #%doc src/%{name}-%{version}/doc/{copying*,*.txt}
203 #%doc src/%{name}-%{version}/doc/faq.html
204 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/fpc.cfg
205 %dir %{_libdir}/%{name}
206 %dir %{_libdir}/%{name}/%{version}
207 %dir %{_libdir}/%{name}/lexyacc
208 %{_libdir}/%{name}/%{version}/msg
209 %{_libdir}/%{name}/%{version}/units
210 %{_libdir}/%{name}/%{version}/ide
211 %{_libdir}/%{name}/lexyacc/*
212 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
213 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
214 %{_mandir}/man*/*
215
216 %files examples
217 %defattr(644,root,root,755)
218 %{_examplesdir}/fpc
219
220 %files doc
221 %defattr(644,root,root,755)
222 #%doc src/%{name}-%{version}/docs/*.pdf
This page took 0.067421 seconds and 4 git commands to generate.