]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
- works, but.. TODO
[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: bin86
27 #BuildRequires: zlib-devel
28 Requires:       gcc >= 2.95.2
29 ExclusiveArch:  %{ix86} m68k amd64 ppc sparc
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
34 Free Pascal is designed to be, as much as possible, source compatible
35 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
36 attained), but it also enhances these languages with elements like
37 function overloading. And, unlike these ancestors, it supports
38 multiple platforms.
39
40 %description -l pl
41 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
42 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
43 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
44 rozszerza te jêzyki elementami takimi jak przeci±¿anie funkcji.
45
46 %description -l ru
47 FPC -- 32-ÂÉÔÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal, ÓÏ×ÍÅÓÔÉÍÙÊ Ó Turbo Pascal 7.0 É Delphi.
48 ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ
49 ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib, mysql, postgres, ibase.
50
51 %description -l uk
52 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ Delphi.
53 ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL (¦Â̦ÏÔÅËÏÀ ×¦ÌØÎÉÈ
54 ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib, mysql, postgres, ibase.
55
56 %package examples
57 Summary:        Free Pascal Compiler exaple programs
58 Summary(pl):    Przyk³adowe programy do kompilatora Free Pascal
59 Group:          Documentation
60 Requires:       %{name} = %{version}
61
62 %description examples
63 Free Pascal Compiler exaple programs.
64
65 %description examples -l pl
66 Przyk³adowe programy do kompilatora Free Pascal.
67
68 %package doc
69 Summary:        Free Pascal Compiler documentation
70 Summary(pl):    Dokumentacja do kompilatora Free Pascal
71 Group:          Documentation
72 Requires:       %{name} = %{version}
73
74 %description doc
75 Documentation for fpc in PDF format.
76
77 %description doc -l pl
78 Dokumentacja do fpc w formacie PDF.
79
80 %prep
81 %setup -q -n %{name}
82 %ifarch %{ix86}
83 tar xf %{SOURCE1}
84 %define _bname 386
85 %endif
86 %ifarch amd64
87 tar xf %{SOURCE2}
88 %define _bname x64
89 %endif
90 %ifarch ppc
91 tar xf %{SOURCE3}
92 %define _bname ppc
93 %endif
94 %ifarch sparc
95 tar xf %{SOURCE4}
96 %define _bname sparc
97 %endif
98
99 tar xf binary.*-linux.tar
100
101 mkdir bin
102 cd bin
103 for i in ../*.tar.gz ; do
104         tar xzf $i
105 done
106 ln -sf `pwd`/lib/%{name}/%{version}/ppc* bin
107
108 %build
109 PP=`pwd`/bin/lib/%{name}/%{version}/ppc%{_bname}
110 NEWPP=`pwd`/compiler/ppc%{_bname}
111
112 %{__make} compiler_cycle \
113         OPT="$OPTF -Xs -n" \
114         RELEASE="1" \
115         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
116         BININSTALLDIR=%{_bindir} \
117         PP="$PP" \
118         FPC="$PP" \
119         compiler_cycle
120
121 %{__make} OPT="$OPTF -Xs -n" \
122         RELEASE="1" \
123         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
124         BININSTALLDIR=%{_bindir} \
125         PP="$NEWPP" \
126         FPC="$NEWPP" \
127         DATA2INC=`pwd`/utils/data2inc \
128         rtl packages_base_all fcl packages_extra_all utils_all
129
130 #%{__make} -C src/%{name}-%{version}/docs pdf FPDOC=${NEWFPDOC}
131
132 %install
133 rm -rf $RPM_BUILD_ROOT
134 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_examplesdir}/fpc}
135
136 NEWPP=`pwd`/compiler/ppc%{_bname}
137 FPCMAKE=`pwd`/utils/fpcm/fpcmake
138 %{__make} \
139         compiler_install \
140         rtl_install \
141         fcl_install \
142         packages_install \
143         utils_install \
144         PP="$NEWPP" \
145         FPCMAKE="$FPCMAKE" \
146         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
147         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
148         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
149         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
150         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
151         INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
152         CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
153
154 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
155
156 sh compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
157
158 #%{__make} -C src/%{name}-%{version}/docs pdfinstall DOCINSTALLDIR=$RPM_BUILD_ROOT%{_docdir}
159
160 #cp -af src/%{name}-%{version}/doc/examples/* $RPM_BUILD_ROOT%{_examplesdir}/fpc
161
162 #ln -sf ../lib/%{name}/%{version}/ppc386 $RPM_BUILD_ROOT%{_bindir}/ppc386
163 #ln -sf ppc386 $RPM_BUILD_ROOT%{_bindir}/fpc
164
165 #cp -af src/%{name}-%{version}/doc/faq.htm src/%{name}-%{version}/doc/faq.html
166
167 #ln -sf %{_bindir}/{as,ld} $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
168
169 %clean
170 rm -rf $RPM_BUILD_ROOT
171
172 #%post
173 #umask 022
174 #GCCSPEC=`(gcc -v 2>&1)| head -n 1| awk '{ print $4 } '`
175 #GCCDIR=`dirname $GCCSPEC`
176 #echo "Found libgcc.a in $GCCDIR"
177 #sed -e "s#\$GCCDIR#$GCCDIR#" %{_sysconfdir}/fpc.cfg > %{_sysconfdir}/fpc.cfg.new
178 #sed -e "s#\$1#%{_libdir}/%{name}/%{version}#" %{_sysconfdir}/fpc.cfg.new > %{_sysconfdir}/fpc.cfg
179 #rm -f %{_sysconfdir}/fpc.cfg.new
180
181 %files
182 %defattr(644,root,root,755)
183 %attr(755,root,root) %{_bindir}/*
184 #%doc src/%{name}-%{version}/doc/{copying*,*.txt}
185 #%doc src/%{name}-%{version}/doc/faq.html
186 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/fpc.cfg
187 %dir %{_libdir}/%{name}
188 %dir %{_libdir}/%{name}/%{version}
189 %dir %{_libdir}/%{name}/lexyacc
190 %{_libdir}/%{name}/%{version}/msg
191 %{_libdir}/%{name}/%{version}/units
192 %{_libdir}/%{name}/lexyacc/*
193 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
194 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
195 #%{_mandir}/man*/*
196
197 %files examples
198 %defattr(644,root,root,755)
199 #%{_examplesdir}/fpc
200
201 %files doc
202 %defattr(644,root,root,755)
203 #%doc src/%{name}-%{version}/docs/*.pdf
This page took 0.039336 seconds and 3 git commands to generate.