Accepting request 186630 from home:adra:branches:devel:languages:pascal

Update to 1.0.10, Use the package's internal desktop file instead of a custom one and added a patch (lazarus.desktop.patch) to fix it, Removed ImageMagick build requirement (not needed), Minor other updates

OBS-URL: https://build.opensuse.org/request/show/186630
OBS-URL: https://build.opensuse.org/package/show/devel:languages:pascal/lazarus?expand=0&rev=27
This commit is contained in:
Mikhail Terekhov 2013-08-10 04:01:34 +00:00 committed by Git OBS Bridge
parent d6f132d520
commit 228b0d9947
6 changed files with 100 additions and 50 deletions

3
lazarus-1.0.10-0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:61fd508c832a9c6a27e624be42257493999fe7a3b2f2ab30b9eccd4a2b4d3758
size 47688266

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3a52fe5a1053d12fa2c6a4c89faf5487c3184ad584324b0c640db87b5b85744
size 46146420

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Wed Aug 7 20:16:43 UTC 2013 - asterios.dramis@gmail.com
- Update to 1.0.10:
This is a bug fix release. For complete list of changes see
http://wiki.lazarus.freepascal.org/Lazarus_1.0_fixes_branch#Fixes_for_1.0.10_.28Merged.29
- Use the package's internal desktop file instead of a custom one. Added a
patch (lazarus.desktop.patch) to fix it.
- Removed ImageMagick build requirement (not needed).
- Use desktop-file-utils instead of update-desktop-files for openSUSE > 12.1.
Added desktop-file-utils build requirement for this.
- Install icons in the hicolor icon directory. Added
icon_theme_cache_post/icon_theme_cache_postun entries for openSUSE >= 11.4 to
update the icon cache. Added hicolor-icon-theme build requirement for this.
- Added desktop_database_post/desktop_database_postun entries for
openSUSE >= 11.4 since the package defines a MIME handler. Added
desktop-file-utils post/postun runtime requirement for this.
- Use mime_database_post/mime_database_postun entries for openSUSE >= 11.4
instead of /usr/bin/update-mime-database.
-------------------------------------------------------------------
Tue Jan 1 18:29:20 UTC 2013 - mailaender@opensuse.org

View File

@ -1,15 +0,0 @@
[Desktop Entry]
Name=Lazarus
GenericName=Integrated Development Environment
GenericName[ru]=Интегрированная среда программирования
GenericName[de]=IDE für FreePascal
Comment=Develop applications using Pascal language
Comment[ru]=Разработка приложений на языке Pascal
Comment[de]=Anwendungen entwickeln mit Pascal
Exec=startlazarus %f
Terminal=false
Type=Application
Icon=lazarus
Categories=IDE;Development;
StartupWMClass=Lazarus
MimeType=text/x-pascal;text/lazarus-project-source;text/lazarus-project-information;text/lazarus-form;text/lazarus-resource;text/lazarus-package;text/lazarus-package-link;text/lazarus-code-inlay;

22
lazarus.desktop.patch Normal file
View File

@ -0,0 +1,22 @@
--- lazarus/install/lazarus.desktop.orig 2012-06-24 22:29:27.000000000 +0300
+++ lazarus/install/lazarus.desktop 2013-08-07 20:13:34.918924400 +0300
@@ -1,16 +1,11 @@
[Desktop Entry]
-Encoding=UTF-8
Name=Lazarus
+GenericName=Integrated Development Environment
Comment=Lazarus IDE
Exec=startlazarus %f
Terminal=false
Type=Application
-Icon=lazarus.png
-Categories=Application;IDE;Development;GTK;GUIDesigner;
+Icon=lazarus
+Categories=Development;IDE;
StartupWMClass=Lazarus
MimeType=text/x-pascal;text/lazarus-project-source;text/lazarus-project-information;text/lazarus-form;text/lazarus-resource;text/lazarus-package;text/lazarus-package-link;text/lazarus-code-inlay;
-[Property::X-KDE-NativeExtension]
-Type=QString
-Value=.pas
-X-Ubuntu-Gettext-Domain=desktop_kdelibs
-

View File

@ -1,6 +1,7 @@
#
# spec file for package lazarus
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2008-2009 oc2pus
#
# All modifications and additions to the file contributed by third parties
@ -17,39 +18,51 @@
Name: lazarus
Version: 1.0.4
Version: 1.0.10
Release: 0
# Please note that the LGPL is modified and this is not multi-licensed, but each component has a separate license chosen.
License: GPL-2.0 and LGPL-2.0 and MPL-1.1
Summary: FreePascal RAD IDE and Component Library
Url: http://www.lazarus.freepascal.org/
Group: Development/Languages/Other
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}-1.tar.gz
Source1: %{name}.desktop
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}-0.tar.gz
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
# PATCH-FIX-OPENSUSE lazarus.desktop.patch -- Fix desktop file
Patch1: lazarus.desktop.patch
%if 0%{?suse_version} > 1210
BuildRequires: desktop-file-utils
%else
BuildRequires: update-desktop-files
%endif
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: fpc >= 2.6.0
BuildRequires: fpc-src >= 2.6.0
BuildRequires: update-desktop-files
%if %sles_version >= 11
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
Requires: glib2
Requires: gtk2
%if 0%{?suse_version} >= 1140
BuildRequires: hicolor-icon-theme
%endif
%if 0%{?sles_version} >= 11
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
%else
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-2.0)
Requires: pkgconfig(glib-2.0)
Requires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-2.0)
%endif
Requires: fpc
Requires: fpc-src
Requires: gdb
%if 0%{?sles_version} >= 11
Requires: glib2-devel
Requires: gtk2-devel
%else
Requires: pkgconfig(glib-2.0)
Requires: pkgconfig(gtk+-2.0)
%endif
Requires(post): desktop-file-utils
Requires(post): shared-mime-info
Requires(postun): desktop-file-utils
Requires(postun): shared-mime-info
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -61,6 +74,7 @@ library - LCL. The LCL is included in this package.
%prep
%setup -q -n %{name}
%patch0 -p1
%patch1 -p1
# remove unneeded files
rm -rf debian
@ -100,10 +114,6 @@ 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"
export LCL_PLATFORM=
@ -112,11 +122,12 @@ export LCL_PLATFORM=
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} \
INSTALL_LIBDIR=%{buildroot}%{_libdir} \
INSTALL_BINDIR=%{buildroot}%{_bindir} \
LAZARUS_INSTALL_DIR=%{buildroot}%{_libdir}/%{name} \
_LIB=%{_lib}
# convenience links
for f in lazarus lazbuild startlazarus; do
@ -138,24 +149,24 @@ 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
# icons
for f in 16 32 48 64 128 256; do
install -Dpm 0644 images/icons/lazarus${f}x${f}.png %{buildroot}%{_datadir}/icons/hicolor/${f}x${f}/apps/%{name}.png
done
# menu-entry
install -dm 755 %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%if 0%{?suse_version}
%if 0%{?suse_version} > 1210
desktop-file-install install/lazarus.desktop
%else
install -Dpm 0644 install/lazarus.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%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
install -Dpm 0644 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
install -Dpm 0644 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
@ -165,14 +176,26 @@ rm -rf %{buildroot}%{_libdir}/%{name}/install/man
%endif
%post
%if 0%{?suse_version} >= 1140
%mime_database_post
%icon_theme_cache_post
%desktop_database_post
%else
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
%endif
%postun
%if 0%{?suse_version} >= 1140
%mime_database_postun
%icon_theme_cache_postun
%desktop_database_postun
%else
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
%endif
%files
%defattr(-,root,root,-)
%doc %{_mandir}/*/*
%doc %{_mandir}/man1/*
%doc %{_defaultdocdir}/%{name}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/editoroptions.xml
@ -185,8 +208,8 @@ rm -rf %{buildroot}%{_libdir}/%{name}/install/man
%{_bindir}/lrstolfm
%{_bindir}/updatepofiles
%{_libdir}/%{name}/
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/mime/packages/%{name}.xml
%changelog