Blob Blame History Raw
Name:           lazarus
Version:        0.9.28
Release:        1%{?dist}
Summary:        Lazarus Component Library and IDE for Freepascal

Group:          Development/Languages
# GNU Classpath style exception, see COPYING.modifiedLGPL
License:        GPLv2+ and MPLv1.1 and LGPLv2+ with exceptions
URL:            http://www.lazarus.freepascal.org/
Source0:        http://download.sourceforge.net/%{name}/%{name}-%{version}-src.tar.bz2
patch0:         Makefile_patch.diff
patch1:         Desktop_patch.diff
patch2: 	gzip_manpages_patch.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  fpc, binutils, glibc-devel, desktop-file-utils, fpc-src, gtk2-devel 
Requires:       fpc-src, fpc, binutils, glibc-devel, gdb, gtk2-devel 

ExcludeArch:    s390 s390x

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

%prep
%setup -c -q
%patch0 -p0
%patch1 -p0
%patch2 -p0

%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 ..

# Remove scripts vulnerable to symlink-attacks (bug 460642)
rm tools/convert_po_file_to_utf-8.sh

export FPCDIR=%{_datadir}/fpcsrc/
fpcmake -Tall
make tools OPT='-gl'
make bigide OPT='-gl'
make lazbuilder OPT='-gl'

%install
rm -rf %{buildroot}

# These files have the wrong executable-bit set in version 0.9.28:
chmod -x lazarus/tools/chmmaker/chmwriter.lpi
chmod -x lazarus/tools/chmmaker/unit1.pas
chmod -x lazarus/tools/chmmaker/unit1.lfm
chmod -x lazarus/tools/chmmaker/unit1.lrs
chmod +x lazarus/components/lazsvnpkg/lazsvnpkg_images.sh
chmod +x lazarus/examples/trayicon/createbundle.sh

make -C lazarus install INSTALL_PREFIX=%{buildroot}%{_prefix} _LIB=%{_lib}
make -C lazarus/install/man INSTALL_MANDIR=%{buildroot}%{_mandir}

install -D -p -m 0644 lazarus/install/lazarus-mime.xml $LazBuildDir%{buildroot}%{_datadir}/mime/packages/lazarus.xml
install -D -p -m 0644 lazarus/images/ide_icon48x48.png %{buildroot}%{_datadir}/pixmaps/lazarus.png
desktop-file-install \
        --vendor fedora \
        --dir %{buildroot}%{_datadir}/applications \
        lazarus/install/%{name}.desktop

ln -sf ../%{_lib}/%{name}/lazarus %{buildroot}%{_bindir}/lazarus-ide
ln -sf ../%{_lib}/%{name}/startlazarus %{buildroot}%{_bindir}/startlazarus
ln -sf ../%{_lib}/%{name}/lazbuild %{buildroot}%{_bindir}/lazbuild

install -D -p -m 0644 lazarus/tools/install/linux/editoroptions.xml %{buildroot}%{_sysconfdir}/lazarus/editoroptions.xml
sed 's#/usr/lib/lazarus/#%{_libdir}/%{name}#;s#/\$(FPCVER)##' lazarus/tools/install/linux/environmentoptions.xml > %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml

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

%clean
rm -rf %{buildroot}

%post
update-mime-database %{_datadir}/mime &> /dev/null || :

%postun
update-mime-database %{_datadir}/mime &> /dev/null || :

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

%changelog
* Fri Oct 16 2009 Joost van der Sluis <rel-eng@lists.fedoraproject.org> - 0.9.28-1
- Updated to version 0.9.28

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.26.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jun 18 2009 Dan Horak <dan[at]danny.cz> 0.9.26.2-3
- Exclude s390/s390x architectures, FPC doesn't exist there

* Wed Apr 1 2009 Joost van der Sluis <joost@cnoc.nl> 0.9.26.2-2
 - Adapted Makefile patch for version 0.9.26.2

* Wed Apr 1 2009 Joost van der Sluis <joost@cnoc.nl> 0.9.26.2-1
 - Updated to version 0.9.26.2

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.26-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Dec  4 2008 Michael Schwendt <mschwendt@fedoraproject.org> 0.9.26-3
- Include /etc/lazarus directory.

* Wed Oct 29 2008 Lubomir Rintel <lkundrak@v3.sk> 0.9.26-2
- Fix path to the source tree

* Thu Oct 23 2008 Joost van der Sluis <joost@cnoc.nl> 0.9.26-1
- Updated to version 0.9.26
- Removed scripts which are vulnerable to symlink-attacks (bug 460642)
- Build bigide instead of the standard ide
- Build ideintf and the registration for gtk2
- Install the manfiles 
- Install the mime-types
- Install the global .xml configuration files

* Wed Jun 18 2008 Joost van der Sluis <joost@cnoc.nl> 0.9.24-4
- removed the trailing slash from the FPCDIR export in the build section

* Tue Apr 24 2008 Joost van der Sluis <joost@cnoc.nl> 0.9.24-3
- Remove executable-bit in install-section, instead of the files section
- Enabled debug-package on x86_64

* Fri Feb 01 2008 Joost van der Sluis <joost@cnoc.nl> 0.9.24-2
- Changed license-tag according to the official license tags of Fedora
- Removed some more Debian-specific files
- Made two scripts executable
- Improved fedora-lazarus.desktop 

* Mon Nov 26 2007 Joost van der Sluis <joost@cnoc.nl> 0.9.24-1
- Removed files specific for debian
- Updated to Lazarus v 0.9.24
- Changed desktop-file categories
- Disabled the debug-package for x86_64 again, see bug 337051
- If the debuginfo-packages is disabled, strip the executables manually
- Require fpc version 2.2.0
- Added -q to setup-macro
- Added OPT='-gl' option in build-section, to make sure that the debuginfo is generated by the compiler
- Removed explicit creation of {buildroot}{_mandir}/man1 and {buildroot}{_datadir}/applications
- Lazarus executable is renamed to lazarus-ide (changed upstream)

* Thu Jan 4 2007 Joost van der Sluis <joost@cnoc.nl> 0.9.20-2
- Added fpc-src as build-dependency to fix problem with fpcmake

* Tue Jan 2 2007 Joost van der Sluis <joost@cnoc.nl> 0.9.20-1
- Version 0.9.20

* Wed Oct 4 2006 Joost van der Sluis <joost@cnoc.nl> 0.9.18-2
- Use the makefile for installing

* Wed Sep 20 2006 Joost van der Sluis <joost@cnoc.nl> 0.9.18-1
- Updated to version 0.9.18.
- Removed obsolete copying of documentation
- Removed double requirements
- Removed part to remove debuginfo package 

* Thu Jun 1 2006 Joost van der Sluis <joost@cnoc.nl> 0.9.16-1
- Updated to version 0.9.16.

* Thu May 25 2006 Joost van der Sluis <joost@cnoc.nl> 0.9.14-5
- Added /usr/bin/startlazarus for packaging
- Removed strip in build-section
- added gtk2-devel buildrequirement

* Tue May 23 2006 Joost van der Sluis <joost@cnoc.nl> 0.9.14-4
- Only build the basic IDE, to remove dependencies on things which are buggy in fpc 2.0.2

* Tue May 4 2006 Joost van der Sluis <joost@cnoc.nl> 0.9.14-3
- Added the ability to create gtk2-applications

* Tue May 4 2006 Joost van der Sluis <joost@cnoc.nl> 0.9.14-2
- Updated to version 0.9.14-1.
- Changed the Source0 download url from prdownloads to
  downloads.sourceforge.net

* Tue Apr 10 2006 Joost van der Sluis <joost@cnoc.nl> 0.9.14-1
- Updated to version 0.9.14.

* Tue Mar 28 2006 Joost van der Sluis <joost@cnoc.nl> 0.9.12-1
- Initial build.