lazarus/lazarus.spec

229 lines
8.1 KiB
RPMSpec

# Copyright (c) 2008-2009 oc2pus
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments to toni@links2linux.de
# norootforbuild
Name: lazarus
Version: 0.9.28.2
Release: 1.pm.1
Summary: Lazarus Component Library and IDE
Group: Development/Languages/Other
License: GPL and modified LGPL
Url: http://www.lazarus.freepascal.org/
# snapshot build:
#Source0: http://snapshots.lazarus.shikami.org/lazarus/downloads/%{name}-%{version}-17149-20081029-src.tar.bz2
# svn co https://lazarus.svn.sourceforge.net/svnroot/lazarus/tags/lazarus_0_9_26_2 lazarus
#Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
# release build:
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}-src.tar.bz2
Source1: %{name}.desktop
Source90: %{name}-rpmlintrc
Patch: %{name}-Makefile_patch.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: shared-mime-info
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: fpc >= 2.2.4
BuildRequires: fpc-src >= 2.2.4
BuildRequires: gdk-pixbuf-devel
BuildRequires: glib2-devel
BuildRequires: gtk2-devel gtk2
BuildRequires: gtk-devel
BuildRequires: update-desktop-files
Requires: fpc >= 2.2.4
Requires: fpc-src >= 2.2.4
Requires: gdb
Requires: gdk-pixbuf-devel
Requires: glib2-devel
Requires: gtk2-devel
%if %suse_version >= 1120
BuildRequires: libdb-4_5-devel
%endif
%description
Lazarus is a free and open source Rapid Application Development
tool for the FreePascal compiler using the Lazarus component
library - LCL. The LCL is included in this package.
%debug_package
%prep
%setup -q -n %{name}
%patch -p1
%__rm Makefile.fpc.orig
# remove the files for building debian-repositories
%__rm -rf debian
%__rm -rf tools/install/cross_unix/debian_crosswin32
%__rm tools/install/cross_unix/create_linux_cross_win32_deb.sh
%__rm tools/install/cross_unix/HowToCreate_fpc_crosswin32_deb.txt
# remove scripts vulnerable to symlink-attacks (bug 460642)
%__rm tools/convert_po_file_to_utf-8.sh
%__rm tools/install/build_fpc_snaphot_rpm.sh
%__rm tools/install/check_fpc_dependencies.sh
%__rm tools/install/create_fpc_deb.sh
%__rm tools/install/create_fpc_export_tgz.sh
%__rm tools/install/create_fpc_rpm.sh
%__rm tools/install/create_fpc-src_rpm.sh
%__rm tools/install/create_fpc_tgz_from_local_dir.sh
%__rm tools/install/create_lazarus_export_tgz.sh
# fix lineencodings
dos2unix examples/gridexamples/grid_semaphor/example/table0*.stb
dos2unix examples/trayicon/frmtest.*
dos2unix examples/trayicon/wndtray.*
%build
export FPCDIR=%{_datadir}/fpcsrc/
fpcmake -Tall
MAKEOPTS="-gl -Fl/usr/%{_lib}"
if [ -n "$FPCCfg" ]; then
MAKEOPTS="$MAKEOPTS -n @$FPCCfg"
fi
%__cat > ide/revision.inc << EOF
// Created by Svn2RevisionInc
const RevisionStr = 'Unknown';
EOF
%__make tools OPT="$MAKEOPTS"
%__make bigide OPT="$MAKEOPTS" USESVN2REVISIONINC=0
%__make lazbuilder OPT="$MAKEOPTS"
# add the ability to create gtk2-applications build gtk2.ppu
export LCL_PLATFORM=gtk2
%__make lcl ideintf packager/registration bigidecomponents OPT="$MAKEOPTS"
export LCL_PLATFORM=
%install
%makeinstall \
INSTALL_PREFIX=%{buildroot}%{_prefix} \
_LIB=%{_lib}
# man-page
%__make -C install/man \
INSTALL_MANDIR=%{buildroot}%{_mandir}
# convenience links
%__install -dm 755 %{buildroot}%{_bindir}
ln -sf ../%{_lib}/%{name}/%{name} \
%{buildroot}%{_bindir}/%{name}-ide
ln -sf ../%{_lib}/%{name}/%{name} \
%{buildroot}%{_bindir}/%{name}
ln -sf ../%{_lib}/%{name}/startlazarus \
%{buildroot}%{_bindir}/startlazarus
ln -sf ../%{_lib}/%{name}/lazbuild \
%{buildroot}%{_bindir}/lazbuild
# collect docs and samples
%__install -dm 755 %{buildroot}%{_defaultdocdir}/%{name}
%__mv %{buildroot}%{_libdir}/%{name}/examples \
%{buildroot}%{_defaultdocdir}/%{name}
ln -s %{_defaultdocdir}/%{name}/examples \
%{buildroot}%{_libdir}/%{name}/examples
%__mv %{buildroot}%{_libdir}/%{name}/COPYING* %{buildroot}%{_libdir}/%{name}/README* \
%{buildroot}%{_defaultdocdir}/%{name}
# icon
%__install -dm 755 %{buildroot}%{_datadir}/pixmaps
%__install -m 644 images/ide_icon48x48.png \
%{buildroot}%{_datadir}/pixmaps/%{name}.png
# menu-entry
%__install -dm 755 %{buildroot}%{_datadir}/applications
%__install -m 644 %{SOURCE1} \
%{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file -n %{name} Development IDE
# mime info
%__install -dm 755 %{buildroot}%{_datadir}/mime/packages
%__install -m 644 install/%{name}-mime.xml \
%{buildroot}%{_datadir}/mime/packages/%{name}.xml
# configs
%__install -dm 755 %{buildroot}%{_sysconfdir}/%{name}
%__install -m 644 tools/install/linux/editoroptions.xml \
%{buildroot}%{_sysconfdir}/%{name}/editoroptions.xml
%__sed 's#/usr/lib/lazarus/#%{_libdir}/%{name}#;s#/\$(FPCVER)##;s#%LazarusVersion%##' \
tools/install/linux/environmentoptions.xml > %{buildroot}%{_sysconfdir}/%{name}/environmentoptions.xml
#%__install -m 644 tools/install/linux/environmentoptions.xml \
# %{buildroot}%{_sysconfdir}/%{name}/environmentoptions.xml
%__cp %{buildroot}%{_sysconfdir}/%{name}/environmentoptions.xml \
%{buildroot}%{_libdir}/%{name}/tools/install/linux
# fix rights
%__chmod 755 %{buildroot}%{_libdir}/%{name}/components/lazreport/tools/localize.sh
%__chmod 755 %{buildroot}%{_libdir}/%{name}/tools/install/macosx/uninstall.sh
%__rm -rf %{buildroot}%{_libdir}/%{name}/install/man
%fdupes -s %{buildroot}
%__chmod 644 %{buildroot}%{_libdir}/%{name}/tools/chmmaker/chmwriter.lpi
%__chmod 644 %{buildroot}%{_libdir}/%{name}/tools/chmmaker/unit1.lfm
%__chmod 644 %{buildroot}%{_libdir}/%{name}/tools/chmmaker/unit1.lrs
%__chmod 644 %{buildroot}%{_libdir}/%{name}/tools/chmmaker/unit1.pas
%__chmod 755 %{buildroot}%{_libdir}/%{name}/components/lazsvnpkg/lazsvnpkg_images.sh
%clean
[ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}"
%post
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
%postun
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
%files
%defattr(-,root,root,-)
%doc %{_mandir}/*/*
%doc %{_defaultdocdir}/%{name}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/editoroptions.xml
%config(noreplace) %{_sysconfdir}/%{name}/environmentoptions.xml
%{_bindir}/%{name}
%{_bindir}/%{name}-ide
%{_bindir}/lazbuild
%{_bindir}/startlazarus
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/%{name}.xml
%changelog
* Tue Nov 03 2009 Toni Graffy <toni@links2linux.de> - 0.9.28.2-1.pm.1
- fixed configfile environmentoptions.xml
* Sun Nov 01 2009 Toni Graffy <toni@links2linux.de> - 0.9.28.2-0.pm.1
- update to 0.9.28.2
- This release fixes compiling a test application without saving (missing
project1.lrs). The Lazarus directory is now set correctly by the deb package.
Some other small fixes are also included.
* Tue Oct 27 2009 Toni Graffy <toni@links2linux.de> - 0.9.28-0.pm.1
- update to 0.9.28
- In this major release, the IDE has many source editor improvements like display
of "double width" fonts (such as Eastern, Japanese, Chinese, and Arabic), better
code folding, highlighting, syncro editing, and persistent blocks. The debugger
has assembler windows, easier exception handling, and breakpoint properties. The
LCL now uses GTK2 as the default widgetset on Linux and BSD and includes the
TMonitor class for multi-monitor support. Refactoring of LCL reduced the minimum
size of executables by about 15%. The support of TFrame support has improved, so
you can visually nest designers in the IDE.
* Mon May 04 2009 Toni Graffy <toni@links2linux.de> - 0.9.26.2-0.pm.3
- rebuild against fpc-2.2.4
* Mon Mar 23 2009 Toni Graffy <toni@links2linux.de> - 0.9.26.2-0.pm.2
- update to 0.9.26.2 (release-tarball)
* Sat Feb 28 2009 Toni Graffy <toni@links2linux.de> - 0.9.26.2-0.pm.1
- update to 0.9.26.2
svn co https://lazarus.svn.sourceforge.net/svnroot/lazarus/tags/lazarus_0_9_26_2 lazarus
* Sat Nov 01 2008 Toni Graffy <toni@links2linux.de> - 0.9.26-0.pm.2
- rebuild against fpc-2.2.2-0.pm.2
* Thu Oct 30 2008 Toni Graffy <toni@links2linux.de> - 0.9.26-0.pm.1
- initial build for packman (fpc-2.2.2 is working with this version)
- based on fedora spec-file from Lubomir Rintel <lkundrak@v3.sk>