Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > ca7c3fac3cce5cf5201e1863c2f86fcc > files > 3

lazarus-2.2.4.0-1.mga9.src.rpm

%global uver	2.2.4-0
%global ver	%(echo %{uver} | tr '-' '.')

Name:		lazarus
Version:	%{ver}
Release:	%mkrel 1
Summary:	Lazarus Component Library and IDE for Freepascal
Group:		Development/Other
# GNU Classpath style exception, see COPYING.modifiedLGPL
License:	GPLv2+ and MPLv1.1 and LGPLv2+ with exceptions
URL:		https://www.lazarus-ide.org/
Source0:	https://download.sourceforge.net/lazarus/%{name}-%{uver}.tar.gz
Source1:	lazarus-miscellaneousoptions

BuildRequires:	fpc-src >= 3.0.0
BuildRequires:	fpc >= 3.0.0
BuildRequires:	pkgconfig(gdk-pixbuf-2.0)
BuildRequires:	pkgconfig(gtk+-2.0)
BuildRequires:	glibc
BuildRequires:	gdb
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(gdk-pixbuf-2.0)
BuildRequires:	desktop-file-utils
Requires:	fpc-src >= 3.0.0
Requires:	fpc >= 3.0.0
Requires:	pkgconfig(gtk+-2.0)
Requires:	pkgconfig(gdk-pixbuf-2.0)
Requires:	gdb
Requires:	pkgconfig(glib-2.0)
Requires:	binutils
Requires:	glibc-devel
Requires:	make
Recommends:	pkgconfig(sqlite3)

%description
Lazarus is a free and opensource RAD tool for freepascal using the lazarus
component library - LCL, which is also included in this package.

%prep
%setup -q -c %{name}-%{version}

cd %{name}

# remove unneeded files
rm -rf debian
rm -rf tools/install/cross_unix/debian_crosswin32/
rm -f tools/install/cross_unix/*deb.*
rm -rf tools/install/debian_*
rm -rf tools/install/freebsd_*
rm -rf tools/install/macosx/
rm -rf tools/install/slacktgz/
rm -rf tools/install/win/
rm -f tools/install/*slacktgz.*
rm -f tools/install/*deb.*
find ./ -type f -name "*.bat" -delete -print

# remove scripts vulnerable to symlink-attacks (bug 460642)
rm -f tools/install/build_fpc_snaphot_rpm.sh
rm -f tools/install/check_fpc_dependencies.sh
rm -f tools/install/create_fpc_deb.sh
rm -f tools/install/create_fpc_export_tgz.sh
rm -f tools/install/create_fpc_rpm.sh
rm -f tools/install/create_fpc-src_rpm.sh
rm -f tools/install/create_fpc_tgz_from_local_dir.sh
rm -f tools/install/create_lazarus_export_tgz.sh

# fix lineencodings
sed -i 's/\r$//' examples/trayicon/frmtest.*
sed -i 's/\r$//' examples/trayicon/wndtray.*

%build
cd lazarus
# Remove the files for building other packages
rm -rf debian
cd tools
find install -depth -type d ! \( -path "install/linux/*" -o -path "install/linux" -o -path "install" \) -exec rm -rf '{}' \;
cd ..

export FPCDIR=%{_datadir}/fpcsrc/
fpcmake -Tall
cd components
fpcmake -Tall
cd ..
make bigide OPT='-gl -gw'
make tools OPT='-gl -gw'


%install
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}/lazarus
cp -a lazarus/* %{buildroot}$LAZARUSDIR/
install -m 0644 lazarus/images/ide_icon48x48.png %{buildroot}%{_datadir}/pixmaps/lazarus.png
install -m 0644 lazarus/install/lazarus.desktop %{buildroot}%{_datadir}/applications/lazarus.desktop
install -m 0644 lazarus/install/lazarus-mime.xml $LazBuildDir%{buildroot}%{_datadir}/mime/packages/lazarus.xml
ln -sf $LAZARUSDIR/lazarus %{buildroot}%{_bindir}/lazarus-ide
ln -sf $LAZARUSDIR/startlazarus %{buildroot}%{_bindir}/startlazarus
ln -sf $LAZARUSDIR/lazbuild %{buildroot}%{_bindir}/lazbuild
cat lazarus/install/man/man1/lazbuild.1 | gzip > %{buildroot}%{_mandir}/man1/lazbuild.1.gz
cat lazarus/install/man/man1/lazarus-ide.1 | gzip > %{buildroot}%{_mandir}/man1/lazarus-ide.1.gz
cat lazarus/install/man/man1/startlazarus.1 | gzip > %{buildroot}%{_mandir}/man1/startlazarus.1.gz

# fix fpc and lazarus path
install lazarus/tools/install/linux/environmentoptions.xml %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml
sed -i 's/\$(FPCVER)\///g' %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml
sed -i 's/%LazarusVersion%//g' %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml

# fix config path
sed -i 's#__LAZARUSDIR__#'$LAZARUSDIR/'#g' %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml
sed -i 's#__FPCSRCDIR__#'$FPCDIR'#g' %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml

chmod 755 %{buildroot}%{_libdir}/%{name}/components/lazreport/tools/localize.sh

pushd %{buildroot}%{_libdir}/%{name}
rm -f *.txt
rm -rf install
popd

install -m 755 %{SOURCE1} %{buildroot}%{_bindir}/

%postun
if [ $1 = 0 ]
then
rm -rf %{_libdir}/lazarus
fi

%files
%license lazarus/COPYING*
%doc lazarus/README*
%{_libdir}/%{name}
%{_bindir}/%{name}-ide
%{_bindir}/startlazarus
%{_bindir}/lazbuild
%{_bindir}/%{name}-miscellaneousoptions
%{_datadir}/pixmaps/lazarus.png
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/lazarus.xml
%dir %{_sysconfdir}/lazarus
%config(noreplace) %{_sysconfdir}/lazarus/environmentoptions.xml
%{_mandir}/*/*


%changelog
* Sun Jan 08 2023 eatdirt <eatdirt> 2.2.4.0-1.mga9
+ Revision: 1931504
- Update to bug fix release 2.2.4

* Mon Mar 28 2022 umeabot <umeabot> 2.2.0.0-2.mga9
+ Revision: 1830561
- Mageia 9 Mass Rebuild

* Sat Jan 29 2022 wally <wally> 2.2.0.0-1.mga9
+ Revision: 1770230
- new version 2.2.0-0

* Mon Sep 13 2021 wally <wally> 2.0.12-1.mga9
+ Revision: 1745397
- new version 2.0.12

* Sat Oct 03 2020 wally <wally> 2.0.10.2-1.mga8
+ Revision: 1632099
- new version 2.0.10-2

* Sun Jul 05 2020 wally <wally> 2.0.8-1.mga8
+ Revision: 1602435
- new version 2.0.8

* Fri Feb 14 2020 umeabot <umeabot> 1.8.4-4.mga8
+ Revision: 1519321
- Mageia 8 Mass Rebuild

* Thu Oct 11 2018 pterjan <pterjan> 1.8.4-3.mga7
+ Revision: 1319423
- Fix qtsystemtrayicon.pas breaking every package using lazarus

* Sun Sep 23 2018 umeabot <umeabot> 1.8.4-2.mga7
+ Revision: 1298716
- Mageia 7 Mass Rebuild

* Thu Aug 09 2018 wally <wally> 1.8.4-1.mga7
+ Revision: 1250788
- new version 1.8.4

* Thu Aug 09 2018 wally <wally> 1.8.2-2.mga7
+ Revision: 1250710
- drop non-existing %%post script

* Tue Mar 20 2018 kekepower <kekepower> 1.8.2-1.mga7
+ Revision: 1210735
- Update to version 1.8.2

* Mon Jul 31 2017 joequant <joequant> 1.6.4-2.mga7
+ Revision: 1132942
- bump build with new fpc

* Sun Jul 30 2017 joequant <joequant> 1.6.4-1.mga7
+ Revision: 1132877
- update to 1.6.4

* Tue Nov 22 2016 alexl <alexl> 1.2.4-6.mga6
+ Revision: 1068795
- add pkgconfig(sqlite3) for TSQLite3Connection (mga#17519)

* Tue Feb 09 2016 umeabot <umeabot> 1.2.4-5.mga6
+ Revision: 951681
- Mageia 6 Mass Rebuild
+ alexl <alexl>
- add make requirement (mga#17290)

* Wed Jan 07 2015 alexl <alexl> 1.2.4-4.mga5
+ Revision: 808977
- added GenericName in desktop file

* Wed Oct 15 2014 umeabot <umeabot> 1.2.4-3.mga5
+ Revision: 743313
- Second Mageia 5 Mass Rebuild
- Mageia 5 Mass Rebuild

* Tue Sep 02 2014 alexl <alexl> 1.2.4-1.mga5
+ Revision: 670995
- moved gdb settings patch (fixed by upstream)
- moved lazbuild patch (included in sources now)
- added patches from Alt Linux (relax-onwine, fix-trailing-comma)
- updated fix for onmousemove with according upstream
- version 1.2.4

* Wed Aug 27 2014 alexl <alexl> 1.0.12-5.mga5
+ Revision: 668568
- rebuilt with fpc-2.6.4

* Wed Apr 09 2014 alexl <alexl> 1.0.12-4.mga5
+ Revision: 613030
- fixed run lazarus-miscellaneousoptions as root
- fixed OnMouseMove for tTrayIcon (#mga13178)

* Thu Feb 13 2014 alexl <alexl> 1.0.12-3.mga5
+ Revision: 590386
- add lazarus-miscellaneousoptions which allows addition of addons

* Fri Nov 15 2013 zezinho <zezinho> 1.0.12-2.mga4
+ Revision: 551458
- fix spec changelog

* Thu Nov 14 2013 zezinho <zezinho> 1.0.12-1.mga4
+ Revision: 551280
- added Makefile to allow local rebuild of lazarus
- new version 1.0.12

* Sat Oct 19 2013 umeabot <umeabot> 1.0.8-2.mga4
+ Revision: 528602
- Mageia 4 Mass Rebuild

* Tue Jun 25 2013 dams <dams> 1.0.8-1.mga4
+ Revision: 446584
- clean specfile
+ joequant <joequant>
- add ru-mageia patches
- remove 8805.  This was for fpc
- pull in changes from Mageia russian repo
- update to 1.0.8

* Sat Jan 12 2013 umeabot <umeabot> 0.9.30.4-3.mga3
+ Revision: 356682
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Jul 18 2012 dams <dams> 0.9.30.4-2.mga3
+ Revision: 272298
- fix 'environmentoptions.xml' to fix build of packages via lazarus

* Fri Apr 20 2012 remmy <remmy> 0.9.30.4-1.mga2
+ Revision: 232175
- Switched to latest stable release
- Lazarus now actually shows something different from blank windows (mga#4756, mga#1606)

* Sun Sep 04 2011 ovitters <ovitters> 0.9.30.1.30881-1.mga2
+ Revision: 138437
- clean buildrequires
  fix environmentoptions.xml to avoid errors on startup
- clean spec file
- imported package lazarus