]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
d4dd4b3b0a26d786f365e3eeb3cb5f1fa567c00f
[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 Name:           fpc
4 Version:        0.99.14
5 Release:        1
6 License:        GPL
7 Group:          Development/Languages
8 Group(pl):      Programowanie/Jêzyki
9 Vendor:         Michael Van Canneyt <michael@tfdec1.fys.kuleuven.ac.be>
10 Source0:        ftp://ftp.freepascal.org/pub/fpc/dist/Linux/%{name}-%{version}.ELF.tar
11 Source1:        fpc-sample.cfg
12 URL:            http://www.freepascal.org/
13 ExclusiveArch:  %{ix86} m68k
14 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15
16 %description
17 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
18 Free Pascal is designed to be, as much as possible, source compatible
19 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
20 attained), but it also enhances these languages with elements like
21 function overloading. And, unlike these ancestors, it supports
22 multiple platforms.
23
24 %description -l pl
25 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
26 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
27 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
28 rozszerza te jêzyki elementami takimi jak prze³adowywanie funkcji.
29
30 %package doc
31 Summary:        Free Pascal Compiler documentation
32 Summary(pl):    Dokumentacja do kompilatora Free Pascal
33 Group:          Documentation
34 Group(pl):      Dokumentacja
35 Requires:       %{name} = %{version}
36
37 %description doc
38 Documentation for fpc HTML format.
39
40 %description -l pl doc
41 Dokumentacja do fpc w formacie HTML.
42
43 %prep
44 %setup -q
45 mkdir sources && cd sources && tar -xzf ../sources.tar.gz \
46               && tar -xzf ../libs.tar.gz && tar -xzf ../bins.tar.gz \
47               && mkdir ../doc && cd ../doc && tar -xzf ../docs.tar.gz && cd ..
48
49 %build
50 cd sources
51 cp base/{Makefile,makefile.fpc} .
52
53 # Currently we don't have these extenstions
54 mkdir -p fcl/linux && echo ".PHONY:     all install" > fcl/linux/Makefile
55 mkdir -p gtk       && echo ".PHONY:     all install" > gtk/Makefile
56 mkdir -p api       && echo ".PHONY:     all install" > api/Makefile
57 mkdir -p fv        && echo ".PHONY:     all install" > fv/Makefile
58 mkdir -p gdbint    && echo ".PHONY:     all install" > gdbint/Makefile
59 mkdir -p ide       && echo ".PHONY:     all install" > ide/Makefile
60
61 if [ "%{_target_cpu}" = "m68k" ]; then
62         CPU=M68K
63 else
64         CPU=I386
65 fi
66 make \
67         OPT="$RPM_OPT_FLAGS" \
68         RELEASE=1 \
69         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
70         BININSTALLDIR=%{_bindir} \
71         PP="`pwd`/ppc386" \
72         all
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 install -d              $RPM_BUILD_ROOT%{_sysconfdir}/
78 install %{SOURCE1}      $RPM_BUILD_ROOT%{_sysconfdir}/ppc386.cfg
79
80 cd sources && make \
81         PP="`pwd`/ppc386" \
82         BASEINSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
83         BININSTALLDIR=$RPM_BUILD_ROOT%{_bindir} \
84         install
85
86 ln -sf %{_libdir}/%{name}/%{version}/ppc386 $RPM_BUILD_ROOT%{_bindir}/ppc386
87 strip $RPM_BUILD_ROOT%{_bindir}/*
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %post
93 umask 022
94 GCCSPEC=`(gcc -v 2>&1)| head -n 1| awk '{ print $4 } '`
95 GCCDIR=`dirname $GCCSPEC`
96 echo "Found libgcc.a in $GCCDIR"
97 sed -e "s#\$GCCDIR#$GCCDIR#" %{_sysconfdir}/ppc386.cfg > %{_sysconfdir}/ppc386.cfg.new
98 sed -e "s#\$1#%{_libdir}/%{name}/%{version}#" %{_sysconfdir}/ppc386.cfg.new > %{_sysconfdir}/ppc386.cfg
99 rm -f %{_sysconfdir}/ppc386.cfg.new
100
101 %files
102 %defattr(644,root,root,755)
103 %attr(755,root,root) %{_bindir}/*
104 %config %verify(not md5 size mtime) %{_sysconfdir}/ppc386.cfg
105 %dir %{_libdir}/%{name}
106 %dir %{_libdir}/%{name}/%{version}
107 %{_libdir}/%{name}/%{version}/msg
108 %{_libdir}/%{name}/%{version}/rtl
109 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc386
110
111 %files doc
112 %defattr(644,root,root,755)
113 %doc doc/*
This page took 0.12875 seconds and 3 git commands to generate.