Fix lazarus dir in /etc/lazarus/environmentoptions.xml, Removed gtk2 build requirement (not needed), Small other cleanups, kept only the rpmlint errors in the lazarus-rpmlintrc file OBS-URL: https://build.opensuse.org/request/show/137174 OBS-URL: https://build.opensuse.org/package/show/devel:languages:pascal/lazarus?expand=0&rev=22
190 lines
6.3 KiB
RPMSpec
190 lines
6.3 KiB
RPMSpec
#
|
|
# spec file for package lazarus
|
|
#
|
|
# Copyright (c) 2008-2009 oc2pus
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: lazarus
|
|
Version: 1.0.0
|
|
Release: 0
|
|
License: GPL and modified LGPL
|
|
Summary: Lazarus Component Library and IDE
|
|
Url: http://www.lazarus.freepascal.org/
|
|
Group: Development/Languages/Other
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
Source1: %{name}.desktop
|
|
Source90: %{name}-rpmlintrc
|
|
# PATCH-FIX-OPENSUSE lazarus-Makefile_patch.diff -- Change installation path from /usr/share/lazarus to /usr/lib(64)/lazarus
|
|
Patch0: %{name}-Makefile_patch.diff
|
|
BuildRequires: ImageMagick
|
|
BuildRequires: dos2unix
|
|
BuildRequires: fdupes
|
|
BuildRequires: fpc >= 2.6.0
|
|
BuildRequires: fpc-src >= 2.6.0
|
|
BuildRequires: libdb-4_5-devel
|
|
BuildRequires: update-desktop-files
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
BuildRequires: pkgconfig(gtk+-2.0)
|
|
Requires: fpc
|
|
Requires: gdb
|
|
Requires: pkgconfig(glib-2.0)
|
|
Requires: pkgconfig(gtk+-2.0)
|
|
Requires(post): shared-mime-info
|
|
Requires(postun): shared-mime-info
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%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.
|
|
|
|
%prep
|
|
%setup -q -n %{name}
|
|
%patch0 -p1
|
|
|
|
# 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.*
|
|
|
|
# remove scripts vulnerable to symlink-attacks (bug 460642)
|
|
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.*
|
|
|
|
# fix rpmlint error "spurious-executable-perm"
|
|
chmod 644 docs/booth/ProdProgEntwMitOpenSourceSystems2007.odp
|
|
|
|
%build
|
|
export FPCDIR=%{_datadir}/fpcsrc/
|
|
fpcmake -Tall
|
|
|
|
MAKEOPTS="-gl -Fl/usr/%{_lib}"
|
|
if [ -n "$FPCCfg" ]; then
|
|
MAKEOPTS="$MAKEOPTS -n @$FPCCfg"
|
|
fi
|
|
#CHMHELP:MAKEOPTS="$MAKEOPTS -dUseCHMHelp"
|
|
make bigide OPT="$MAKEOPTS" USESVN2REVISIONINC=0
|
|
export LCL_PLATFORM=
|
|
strip lazarus
|
|
strip startlazarus
|
|
strip lazbuild
|
|
strip tools/lazres
|
|
strip tools/updatepofiles
|
|
strip tools/lrstolfm
|
|
strip tools/svn2revisioninc
|
|
if [ -f components/chmhelp/lhelp/lhelp ]; then
|
|
strip components/chmhelp/lhelp/lhelp
|
|
fi
|
|
|
|
# build Qt4 interface
|
|
make -C lcl/interfaces/qt all LCL_PLATFORM=qt OPT="-dQT_NATIVE_DIALOGS"
|
|
|
|
%install
|
|
install -dm 755 %{buildroot}%{_libdir}/%{name}
|
|
make install \
|
|
INSTALL_PREFIX=%{buildroot}%{_prefix} \
|
|
INSTALL_LIBDIR=%{buildroot}%{_libdir} INSTALL_BINDIR=%{buildroot}%{_bindir} \
|
|
LAZARUS_INSTALL_DIR=%{buildroot}%{_libdir}/%{name} \
|
|
|
|
# convenience links
|
|
for f in lazarus lazbuild startlazarus; do
|
|
rm -f %{buildroot}%{_bindir}/$f
|
|
ln -sf ../%{_lib}/%{name}/$f %{buildroot}%{_bindir}/$f
|
|
done
|
|
rm -f %{buildroot}%{_bindir}/lazarus-ide
|
|
ln -sf ../%{_lib}/%{name}/lazarus %{buildroot}%{_bindir}/lazarus-ide
|
|
for f in lazres lrstolfm updatepofiles; do
|
|
ln -sf ../%{_lib}/%{name}/tools/$f %{buildroot}%{_bindir}/$f
|
|
cat %{buildroot}%{_libdir}/%{name}/install/man/man1/${f}.1 | gzip > %{buildroot}%{_mandir}/man1/${f}.1.gz
|
|
done
|
|
|
|
# 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}/docs %{buildroot}%{_defaultdocdir}/%{name}
|
|
ln -s %{_defaultdocdir}/%{name}/docs %{buildroot}%{_libdir}/%{name}/docs
|
|
mv %{buildroot}%{_libdir}/%{name}/COPYING* %{buildroot}%{_libdir}/%{name}/README* %{buildroot}%{_defaultdocdir}/%{name}
|
|
|
|
# icon
|
|
install -dm 755 %{buildroot}%{_datadir}/pixmaps
|
|
install -m 644 images/icons/lazarus128x128.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
|
|
|
# menu-entry
|
|
install -dm 755 %{buildroot}%{_datadir}/applications
|
|
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|
%if 0%{?suse_version}
|
|
%suse_update_desktop_file -n %{name} Development IDE
|
|
%endif
|
|
|
|
# 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
|
|
cat tools/install/linux/environmentoptions.xml | sed -e "s#__LAZARUSDIR__#%{_libdir}/%{name}/#" -e "s#__FPCSRCDIR__#%{_datadir}/fpcsrc/#" > %{buildroot}%{_sysconfdir}/%{name}/environmentoptions.xml
|
|
|
|
# cleanup
|
|
rm -rf %{buildroot}%{_libdir}/%{name}/install/man
|
|
%if 0%{?suse_version}
|
|
%fdupes -s %{buildroot}
|
|
%endif
|
|
|
|
%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
|
|
%{_bindir}/lazres
|
|
%{_bindir}/lrstolfm
|
|
%{_bindir}/updatepofiles
|
|
%{_libdir}/%{name}/
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%{_datadir}/mime/packages/%{name}.xml
|
|
|
|
%changelog
|