File: fpc.spec.template

package info (click to toggle)
lazarus 2.0.10%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 219,188 kB
  • sloc: pascal: 1,867,962; xml: 265,716; cpp: 56,595; sh: 3,005; java: 609; makefile: 568; perl: 297; sql: 222; ansic: 137
file content (159 lines) | stat: -rw-r--r-- 4,678 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Name:           fpc
Version:        1.2.3
Release:        1
Summary:        Free Pascal Compiler

# Because this rpm is used on different systems, with different names
# of packages/dependencies. Do not add dependencies automatically.
AutoReqProv: no

Group:          Development/Languages
License:        GPL2 and modified LGPL2
URL:            http://www.freepascal.org/
Source:         ftp://ftp.freepascal.org/pub/fpc/dist/source-%{version}/%{name}-%{version}-%{release}.source.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:       glibc, binutils
BuildRequires:  binutils, glibc-devel

%define _source_payload w9.bzdio
%define _binary_payload w9.bzdio

%description

Freepascal is a free 32/64bit Pascal Compiler. It comes with a run-time
library fully compatible with Turbo Pascal 7.0 and nearly Delphi compatible.
Some extensions are added to the language, like function overloading. Shared
libraries can be linked. This package contains commandline compiler and
utils. Provided units are the runtime library (RTL), free component library
(FCL) and bindings for among others gtk1, gtk2, ncurses, zlib, mysql, postgres
and ibase.

%ifarch ppc
%define ppcname ppcppc
%else
%ifarch x86_64
%define ppcname ppcx64
%else
%ifarch amd64
%define ppcname amd64
%else
%define ppcname ppc386
%endif
%endif
%endif


%prep
%setup -q -n %{name}

%build
rm -rf packages/extra/amunits
rm -rf packages/extra/winunits

if [ -z "$STARTPP" ]; then
  STARTPP=`which %{ppcname}`
fi
NEWPP=`pwd`/compiler/%{ppcname}
DATA2INC=`pwd`/utils/data2inc
make distclean all FPC=${STARTPP}

# disable the debuginfo package
%define debug_package %{nil}
%define __spec_install_post /usr/lib/rpm/brp-compress

%install 
rm -rf %{buildroot}
FPCMAKE=`pwd`/utils/fpcm/fpcmake
if [ -f "$FPCMAKE" ]; then
    echo found fpcmake: $FPCMAKE
else
    FPCMAKE=`pwd`/utils/fpcm/bin/*-linux/fpcmake
    FPCMAKE=`echo $FPCMAKE`
fi
if [ -f "$FPCMAKE" ]; then
    echo found fpcmake: $FPCMAKE
else
    echo Error: fpcmake not found: $FPCMAKE
    exit 1
fi
DATA2INC=`pwd`/utils/data2inc
NEWPP=`pwd`/compiler/%{ppcname}
FPCVERSION=`${NEWPP} -iV`
FPCFULLVERSION=`${NEWPP} -iW`
INSTALLOPTS="FPC=${NEWPP} FPCMAKE=${FPCMAKE} DATA2INC=${DATA2INC} \
               INSTALL_PREFIX=%{buildroot}%{_prefix} \
               INSTALL_LIBDIR=%{buildroot}%{_libdir} \
               INSTALL_BASEDIR=%{buildroot}%{_libdir}/%{name}/${FPCVERSION} \
               INSTALL_BINDIR=%{buildroot}%{_bindir}"
make install ${INSTALLOPTS}
%ifarch x86_64
    if [ -f %{buildroot}%{_libdir}/../lib/libpas2jslib.so ]; then
        mv %{buildroot}%{_libdir}/../lib/libpas2jslib.so %{buildroot}%{_libdir}/libpas2jslib.so
    fi
%endif

# create link
ln -sf %{_libdir}/%{name}/${FPCVERSION}/%{ppcname} %{buildroot}%{_bindir}/%{ppcname}

# Workaround:
# newer rpm versions do not allow garbage
rm -rf %{buildroot}%{_libdir}/%{name}/lexyacc
rm -rf %{buildroot}%{_prefix}/lib/%{name}/lexyacc
rm -rf %{buildroot}%{_defaultdocdir}/fpc-libc-*
rm -rf %{buildroot}%{_defaultdocdir}/fpc-symbolic-*
# 2.7.1 ignores the INSTALL_DOC variable and writes some files directly to /usr/share/doc
rm -rf %{buildroot}/usr/share/doc/fpc-*

%clean
rm -rf %{buildroot}

%post
# Create a version independent config
%define fpcversion 1.2.3
%{_libdir}/%{name}/%{fpcversion}/samplecfg %{_libdir}/%{name}/%{fpcversion} > /dev/null

%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_libdir}/%{name}
%{_libdir}/libpas2jslib.so

%changelog
* Sat Nov 7 2018 Mattias Gaertner <mattias@freepascal.org> 3.3.1
- added libpas2jslib.so

* Sat Feb 25 2017 Mattias Gaertner <mattias@freepascal.org> 3.0.2
- 64bit
- removed src and doc

* Thu Jul 28 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-1
- Added some requirements
- Added COPYING-info to %%doc

* Tue Jun 28 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.6
- Only rtl, fcl and packages are added to src-subpackage
- Silenced post-script
- disabled the debuginfo-package

* Sun Jun 5 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.5
- Added doc-subpackage
- Added src-subpackage

* Fri Jun 3 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.4
- New fix for lib64 on x86_64
- small patches from Jens Petersen <petersen@redhat.com>

* Thu May 26 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.3
- replaced 'lib' and 'lib64' by %%{_lib}

* Tue May 24 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.2
- Fixed for lib64 on x86_64
- Changed summary, description and license
- Removed examples from installation
- Make clean removed from clean-section
- Clean-up
- replaced $RPM_BUILD_ROOT by %%{buildroot}

* Mon May 23 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.1
- Initial build.