]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
- j/n
[packages/fpc.git] / fpc.spec
1 Summary:        32-bit compiler for the i386 and m68k processors
2 Summary(pl):    32 bitowy kompilator dla procesorów i386 i m68k
3 Summary(ru):    ó×ÏÂÏÄÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal
4 Summary(uk):    ÷¦ÌØÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal
5 Name:           fpc
6 Version:        1.0.10
7 Release:        0.1
8 License:        GPL
9 Group:          Development/Languages
10 Vendor:         Michael Van Canneyt <michael@tfdec1.fys.kuleuven.ac.be>
11 Source0:        ftp://ftp.us.freepascal.org/pub/fpc/dist/source-%{version}/%{name}-%{version}-src.tar.gz
12 # Source0-md5:  da2ec003500584649cb31288613c33fa
13 Source1:        ftp://ftp.us.freepascal.org/pub/fpc/dist/Linux/i386/separate/binary.tar
14 # Source1-md5:  62c7ac6c21c44276b5e14bf34265d185
15 Source2:        %{name}-sample.cfg
16 URL:            http://www.freepascal.org/
17 Requires:       gcc >= 2.95.2
18 BuildRequires:  bin86
19 BuildRequires:  glibc-static
20 BuildRequires:  zlib-devel
21 ExclusiveArch:  %{ix86} m68k
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
26 Free Pascal is designed to be, as much as possible, source compatible
27 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
28 attained), but it also enhances these languages with elements like
29 function overloading. And, unlike these ancestors, it supports
30 multiple platforms.
31
32 %description -l pl
33 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
34 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
35 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
36 rozszerza te jêzyki elementami takimi jak prze³adowywanie funkcji.
37
38 %description -l ru
39 FPC -- 32-ÂÉÔÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal, ÓÏ×ÍÅÓÔÉÍÙÊ Ó Turbo Pascal 7.0 É Delphi.
40 ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ
41 ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib, mysql, postgres, ibase.
42
43 %description -l uk
44 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ Delphi.
45 ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL (¦Â̦ÏÔÅËÏÀ ×¦ÌØÎÉÈ
46 ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib, mysql, postgres, ibase.
47
48 %package examples
49 Summary:        Free Pascal Compiler exaple programs
50 Summary(pl):    Przyk³adowe programy do kompilatora Free Pascal
51 Group:          Documentation
52 Requires:       %{name} = %{version}
53
54 %description examples
55 Free Pascal Compiler exaple programs.
56
57 %description examples -l pl
58 Przyk³adowe programy do kompilatora Free Pascal.
59
60 %package doc
61 Summary:        Free Pascal Compiler documentation
62 Summary(pl):    Dokumentacja do kompilatora Free Pascal
63 Group:          Documentation
64 Requires:       %{name} = %{version}
65
66 %description doc
67 Documentation for fpc in PDF format.
68
69 %description doc -l pl
70 Dokumentacja do fpc w formacie PDF.
71
72 %prep
73 %setup -q -c -T -a1
74 for i in *.tar.gz ; do
75         tar xzf $i
76 done
77
78 mkdir -p src/%{name}-%{version}/doc
79 mv doc/%{name}-%{version}/* src/%{name}-%{version}/doc
80 mkdir -p src/%{name}-%{version}/man && echo ".PHONY:    all install installman" > src/%{name}-%{version}/man/Makefile
81
82 cd src/%{name}-%{version}
83 tar xzf %{SOURCE0}
84
85 %build
86 if [ "%{_build_cpu}" = "m68k" ]; then
87         CPU=M68K
88 else
89         CPU=I386
90 fi
91
92 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
93 case "%{_build_cpu}" in
94         i386)
95                 OPTF="-OG2p1" ;;
96         i586)
97                 OPTF="-OG2p2" ;;
98         i686)
99                 OPTF="-Og2p3" ;;
100         *)
101                 OPTF="-O2" ;;
102 esac
103
104 PP=`pwd`/lib/fpc/%{version}/ppc386
105 NEWPP=`pwd`/src/fpc-%{version}/compiler/ppc386
106 NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
107
108 # -O- optimalization to workaround bug in PP compiler in 1.0.4
109 %{__make} -C src/%{name}-%{version} \
110         OPT="-O- -Xs -n" \
111         RELEASE="" \
112         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
113         BININSTALLDIR=%{_bindir} \
114         PP="$PP" \
115         FPC="$PP" \
116         compiler_cycle
117
118 %{__make} -C src/%{name}-%{version} \
119         OPT="$OPTF -Xs -n" \
120         RELEASE="" \
121         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
122         BININSTALLDIR=%{_bindir} \
123         PP="$NEWPP" \
124         FPC="$NEWPP" \
125         rtl_clean rtl_smart packages_base_smart fcl_smart packages_extra_smart utils_all 
126
127 # %{__make} -C src/%{name}-%{version}/docs pdf FPDOC=${NEWFPDOC}
128
129
130 %install
131 rm -rf $RPM_BUILD_ROOT
132 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_examplesdir}/fpc}
133
134 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/fpc.cfg
135
136 # workaround for 1.0.4
137 #(cd src/fpc-%{version}; ln -s fcl/linux linux)
138
139 NEWPP=`pwd`/src/fpc-%{version}/compiler/ppc386
140 %{__make} -C src/%{name}-%{version} \
141         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
142         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
143         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
144         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
145         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
146         PP="$NEWPP" \
147         compiler_distinstall \
148         rtl_distinstall \
149         packages_distinstall \
150         fcl_distinstall \
151         utils_distinstall \
152         man_install
153
154 # %{__make} -C src/%{name}-%{version}/docs pdfinstall DOCINSTALLDIR=$RPM_BUILD_ROOT%{_docdir}
155  
156 #cp -a man/* $RPM_BUILD_ROOT%{_mandir}
157
158 mv -f src/%{name}-%{version}/doc/examples/* $RPM_BUILD_ROOT%{_examplesdir}/fpc
159
160 ln -sf ../lib/%{name}/%{version}/ppc386 $RPM_BUILD_ROOT%{_bindir}/ppc386
161 ln -sf ppc386 $RPM_BUILD_ROOT%{_bindir}/fpc
162
163 mv -f src/%{name}-%{version}/doc/faq.htm src/%{name}-%{version}/doc/faq.html
164
165 %clean
166 rm -rf $RPM_BUILD_ROOT
167
168 %post
169 umask 022
170 GCCSPEC=`(gcc -v 2>&1)| head -n 1| awk '{ print $4 } '`
171 GCCDIR=`dirname $GCCSPEC`
172 echo "Found libgcc.a in $GCCDIR"
173 sed -e "s#\$GCCDIR#$GCCDIR#" %{_sysconfdir}/fpc.cfg > %{_sysconfdir}/fpc.cfg.new
174 sed -e "s#\$1#%{_libdir}/%{name}/%{version}#" %{_sysconfdir}/fpc.cfg.new > %{_sysconfdir}/fpc.cfg
175 rm -f %{_sysconfdir}/fpc.cfg.new
176
177 %files
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/*
180 %doc src/%{name}-%{version}/doc/{copying*,*.txt}
181 %doc src/%{name}-%{version}/doc/faq.html
182 %config %verify(not md5 size mtime) %{_sysconfdir}/fpc.cfg
183 %dir %{_libdir}/%{name}
184 %dir %{_libdir}/%{name}/%{version}
185 %dir %{_libdir}/%{name}/lexyacc
186 %{_libdir}/%{name}/%{version}/msg
187 %{_libdir}/%{name}/%{version}/units
188 %{_libdir}/%{name}/lexyacc/*
189 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc386
190 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
191 %{_mandir}/man*/*
192
193 %files examples
194 %defattr(644,root,root,755)
195 %{_examplesdir}/fpc
196
197 #%files doc
198 #%defattr(644,root,root,755)
199 #%doc src/%{name}-%{version}/doc/*.pdf
This page took 0.072935 seconds and 3 git commands to generate.