mirror of
https://abf.rosa.ru/djam/lazarus.git
synced 2025-02-23 15:12:46 +00:00
136 lines
4.3 KiB
RPMSpec
136 lines
4.3 KiB
RPMSpec
Summary: Lazarus Component Library and IDE for Freepascal
|
|
Name: lazarus
|
|
Version: 3.4
|
|
Release: 1
|
|
# GNU Classpath style exception, see COPYING.modifiedLGPL
|
|
License: GPLv2+ and MPLv1.1 and LGPLv2+ with exceptions
|
|
Group: Development/Pascal
|
|
Url: http://www.lazarus-ide.org/
|
|
Source0: https://downloads.sourceforge.net/project/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20%{version}/%{name}-%{version}-0.tar.gz
|
|
Source1: lazarus-miscellaneousoptions
|
|
Source10: lazarus.rpmlintrc
|
|
Patch0: lazarus-2.2.0-makefile.patch
|
|
BuildRequires: desktop-file-utils
|
|
BuildRequires: fpc >= 3.2.0
|
|
BuildRequires: fpc-src >= 3.2.0
|
|
BuildRequires: gdb
|
|
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
BuildRequires: pkgconfig(gtk+-2.0)
|
|
Requires: binutils
|
|
Requires: fpc >= 3.2.0
|
|
Requires: fpc-src >= 3.2.0
|
|
Requires: gdb
|
|
Requires: make
|
|
Requires: pkgconfig(gdk-pixbuf-2.0)
|
|
Requires: pkgconfig(glib-2.0)
|
|
Requires: pkgconfig(gtk+-2.0)
|
|
Requires: glibc-devel
|
|
|
|
%description
|
|
Lazarus is a free and opensource RAD tool for freepascal using the lazarus
|
|
component library - LCL, which is also included in this package.
|
|
|
|
%files
|
|
%doc lazarus/COPYING* lazarus/README.md
|
|
%dir %{_sysconfdir}/%{name}
|
|
%config(noreplace) %{_sysconfdir}/%{name}/environmentoptions.xml
|
|
%{_bindir}/%{name}-ide
|
|
%{_bindir}/startlazarus
|
|
%{_bindir}/lazbuild
|
|
%{_bindir}/%{name}-miscellaneousoptions
|
|
%{_libdir}/%{name}
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%{_datadir}/mime/packages/%{name}.xml
|
|
%{_mandir}/*/*
|
|
|
|
%postun
|
|
if [ $1 = 0 ]
|
|
then
|
|
rm -rf %{_libdir}/%{name}
|
|
fi
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -qc
|
|
%patch0 -p1
|
|
|
|
%build
|
|
cd lazarus
|
|
# Remove the files for building debian-repositories
|
|
rm -rf debian
|
|
pushd tools
|
|
find install -depth -type d ! \( -path "install/linux/*" -o -path "install/linux" -o -path "install" \) -exec rm -rf '{}' \;
|
|
popd
|
|
|
|
export FPCDIR="%{_datadir}/fpcsrc/"
|
|
fpcmake -Tall
|
|
|
|
MAKEOPTS="-gl -gw -Fl/usr/%{_lib}"
|
|
|
|
make bigide OPT="$MAKEOPTS"
|
|
make tools OPT="$MAKEOPTS"
|
|
make lazbuild OPT="$MAKEOPTS"
|
|
|
|
# Defaulting to create a gtk2 IDE
|
|
# TODO: Consider switching to GKT3 (still in alpha) or QT5 when dropping gtk2
|
|
export LCL_PLATFORM=gtk2
|
|
make registration lcl bigidecomponents OPT='-gl -gw'
|
|
export LCL_PLATFORM=
|
|
strip %{name}
|
|
strip startlazarus
|
|
strip lazbuild
|
|
|
|
%install
|
|
# Not using automated install: do it manually
|
|
|
|
# Prepare needed dirs
|
|
LAZARUSDIR=%{_libdir}/%{name}
|
|
FPCDIR=%{_datadir}/fpcsrc/
|
|
mkdir -p %{buildroot}$LAZARUSDIR
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
|
mkdir -p %{buildroot}%{_datadir}/applications
|
|
mkdir -p %{buildroot}%{_datadir}/mime/packages
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
|
|
|
|
# Install binaries and units
|
|
cp -a %{name}/* %{buildroot}$LAZARUSDIR/
|
|
|
|
# Install our script
|
|
install -m 755 %{SOURCE1} %{buildroot}%{_bindir}/
|
|
|
|
# Install icon and desktop integration stuff
|
|
install -m 0644 lazarus/images/ide_icon48x48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
|
install -m 0644 lazarus/install/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|
install -m 0644 lazarus/install/%{name}-mime.xml $LazBuildDir%{buildroot}%{_datadir}/mime/packages/%{name}.xml
|
|
|
|
# Install symlinks for the binaries
|
|
ln -sf $LAZARUSDIR/%{name} %{buildroot}%{_bindir}/%{name}-ide
|
|
ln -sf $LAZARUSDIR/startlazarus %{buildroot}%{_bindir}/startlazarus
|
|
ln -sf $LAZARUSDIR/lazbuild %{buildroot}%{_bindir}/lazbuild
|
|
|
|
# Install man pages
|
|
install -m 0644 lazarus/install/man/man1/lazbuild.1 %{buildroot}%{_mandir}/man1/
|
|
install -m 0644 lazarus/install/man/man1/%{name}-ide.1 %{buildroot}%{_mandir}/man1/
|
|
install -m 0644 lazarus/install/man/man1/startlazarus.1 %{buildroot}%{_mandir}/man1/
|
|
|
|
|
|
# Install and fix default options file
|
|
install -m 0644 lazarus/tools/install/linux/environmentoptions.xml %{buildroot}%{_sysconfdir}/%{name}/environmentoptions.xml
|
|
sed -i 's/\$(FPCVER)\///g' %{buildroot}%{_sysconfdir}/%{name}/environmentoptions.xml
|
|
sed -i 's#__LAZARUSDIR__#'$LAZARUSDIR/'#g' %{buildroot}%{_sysconfdir}/%{name}/environmentoptions.xml
|
|
sed -i 's#__FPCSRCDIR__#'$FPCDIR'#g' %{buildroot}%{_sysconfdir}/%{name}/environmentoptions.xml
|
|
|
|
# Fix perms
|
|
chmod 755 %{buildroot}%{_libdir}/%{name}/components/lazreport/tools/localize.sh
|
|
chmod 644 %{buildroot}%{_libdir}/%{name}/lcl/interfaces/cocoa/*.pas
|
|
|
|
# Drop useless stuff
|
|
pushd %{buildroot}%{_libdir}/%{name}
|
|
rm -f *.txt
|
|
rm -rf install
|
|
popd
|