Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > b55dd33bf5f9c676346f0c06357a685f > files > 7

lazarus-1.2.4-4.mga5.src.rpm

Name:		lazarus
Version:	1.2.4
Release:	%mkrel 4
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:		http://www.lazarus.freepascal.org
Source0:	http://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%20%{version}/%{name}-%{version}-0.tar.gz
Source1:	%{name}-miscellaneousoptions
# http://bugs.freepascal.org/view.php?id=23217
Source2:	qtsystemtrayicon.pas
Patch1:		%{name}-%{version}-mga-desktop-file.patch
# http://bugs.freepascal.org/view.php?id=23217
Patch2:		%{name}_trayicon_onmousemove_mga.patch
Patch3:		%{name}-0.9.22-alt-relax-onwine.patch
Patch4:		%{name}-1.2.0-alt-fix-trailing-comma.patch
# http://bugs.freepascal.org/view.php?id=23217
Patch5:		%{name}-%{version}-mga-qtsystemtrayicon-events.patch
BuildRequires:	fpc-src >= 2.6.4
BuildRequires:	fpc >= 2.6.4
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 >= 2.6.4
Requires:	fpc >= 2.6.4
Requires:	pkgconfig(gtk+-2.0)
Requires:	pkgconfig(gdk-pixbuf-2.0)
Requires:	gdb
Requires:	pkgconfig(glib-2.0)
Requires:	binutils
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.

%prep
%setup -q -c %{name}-%{version}
%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p1
%patch5 -p0
cp -f %{SOURCE2} %{name}/lcl/interfaces/qt/

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/gridexamples/grid_semaphor/example/table0*.stb
sed -i 's/\r$//' examples/trayicon/frmtest.*
sed -i 's/\r$//' examples/trayicon/wndtray.*

%build
cd %{name}
export FPCDIR=%{_datadir}/fpcsrc/
fpcmake -Tall

MAKEOPTS="-gl -gw -Fl/usr/%{_lib}"

make bigide OPT="$MAKEOPTS"
make tools OPT="$MAKEOPTS"
make lazbuild OPT="$MAKEOPTS"

# Add the ability to create gtk2-applications
export LCL_PLATFORM=gtk2
make packager/registration lazutils lcl codetools bigidecomponents OPT='-gl -gw'
export LCL_PLATFORM=
strip lazarus
strip startlazarus
strip lazbuild
if [ -f components/chmhelp/lhelp/lhelp ]; then
  strip components/chmhelp/lhelp/lhelp
fi

%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
install lazarus/tools/install/linux/editoroptions.xml %{buildroot}%{_sysconfdir}/lazarus/editoroptions.xml

# 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}/

%post
%{_libdir}/%{name}/tools/install/rpm/create_gtk1_links.sh

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

%files
%doc lazarus/COPYING* lazarus/README.txt
%{_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/editoroptions.xml
%config(noreplace) %{_sysconfdir}/lazarus/environmentoptions.xml
%{_mandir}/*/*


%changelog
* 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


* Tue May 24 2011 Александр Казанцев <kazancas@mandriva.org> 0.9.30.1.30881-1mdv2011.0
+ Revision: 678181
- svn fix version for new fpc 2.4.4

* Mon Mar 28 2011 Александр Казанцев <kazancas@mandriva.org> 0.9.30.1.30041-1
+ Revision: 648700
- new release 0.9.30 (fix snapshot)

* Wed Jan 26 2011 Александр Казанцев <kazancas@mandriva.org> 0.9.29.29190-1
+ Revision: 633048
-update to 0.9.29-29190 fix snapshot

* Mon Dec 27 2010 Александр Казанцев <kazancas@mandriva.org> 0.9.29.27705-1mdv2011.0
+ Revision: 625490
+ rebuild (emptylog)

* Mon Dec 06 2010 Oden Eriksson <oeriksson@mandriva.com> 0.9.28.2-5mdv2011.0
+ Revision: 612703
- the mass rebuild of 2010.1 packages

* Fri Jan 29 2010 Jérôme Brenier <incubusss@mandriva.org> 0.9.28.2-4mdv2010.1
+ Revision: 497877
- Requires: make

* Thu Dec 03 2009 Jérôme Brenier <incubusss@mandriva.org> 0.9.28.2-3mdv2010.1
+ Revision: 472753
- bump release
- fix both environmentoptions.xml files

* Wed Dec 02 2009 Jérôme Brenier <incubusss@mandriva.org> 0.9.28.2-2mdv2010.1
+ Revision: 472717
- fix environmentoptions.xml

* Wed Dec 02 2009 Jérôme Brenier <incubusss@mandriva.org> 0.9.28.2-1mdv2010.1
+ Revision: 472695
- version 0.9.8.2
- fix BuildRequires / Requires
- fix desktop file
- remove some duplicates and useless files
- fix %%files section

  + Funda Wang <fwang@mandriva.org>
    - sync with fedora's patckage
    - import lazarus