LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File codelite.spec of Package codelite (Project devel:tools)

#
# spec file for package codelite
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2012-2014 Mariusz Fik <fisiu@opensuse.org>.
#
# 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/
#


%if 0%{?suse_version} >= 1315
# Only available on x86_64 and %%arm (see lldb package)
  %ifarch %arm x86_64
    %bcond_without lldb
  %endif
# Not available on ppc
  %ifnarch ppc
    %bcond_without clang
  %endif
%endif

Name:           codelite
Version:        8.1
Release:        0
Summary:        Powerful open-source, cross platform code editor for C,C++,PHP and Node.js
License:        GPL-3.0
Group:          Development/Tools/IDE
# parts of package contain LGPL-3.0 licenced code thus license needs to be
# GPL-3.0
Url:            http://codelite.org/
Source0:        https://github.com/eranif/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
# Template files are identified by RPMLint as Development-Files --> Ignore this errors
Source1:        %{name}-rpmlintrc
# PATCH-FEATURE-OPENSUSE codelite-disable-new-version-check.patch fisiu@opensuse.org -- Disable 'new version' check on startup
Patch0:         %{name}-disable-new-version-check.patch
# TODO: Remove following patch next release
# PATCH-FIX-UPSTREAM fix-use-system-sqlite3.patch -- Use system sqlite3 version instead of projects own version. Fixed already upstream in git commit: fe554119c772d8579094b2c3315e0bab92cd4afe
Patch1:         fix-use-system-sqlite3.patch
# PATH-FIX-UPSTREAM fix-no-return-in-nonvoid-function.patch -- Fix non void function without return to avoid rpmlint error. Reported Upstream: https://github.com/eranif/codelite/issues/946
Patch2:         fix-no-return-in-nonvoid-function.patch
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkg-config
BuildRequires:  update-desktop-files
BuildRequires:  wxWidgets-3_0-devel >= 3.0.0
BuildRequires:  wxWidgets-devel >= 3.0.0
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(hunspell)
BuildRequires:  pkgconfig(libssh)
BuildRequires:  pkgconfig(sqlite3)
%if %{with lldb}
BuildRequires:  lldb-devel
%endif
%if %{with clang}
BuildRequires:  llvm-clang-devel
%endif
Requires:       hicolor-icon-theme
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1320
Requires:       xterm-bin
%else
Requires:       xterm
%endif

%description
CodeLite is a powerful open-source, cross platform code editor for the
C,C++,PHP and Node.js programming languages.
It uses a sophisticated, yet intuitive interface which allows user
easily to create, build and debug complex projects.

%prep
%setup -q
%patch0
%patch1 -p1
%patch2 -p1

%build
%cmake \
   %if %{with clang}
  -DENABLE_CLANG=1 \
  %endif
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_LIBDIR=%{_lib}

make %{?_smp_mflags}

%install
%cmake_install
%find_lang %{name}
### Add mime types
mkdir -p %{buildroot}%{_datadir}/mime/packages/
cp -p %{name}.xml %{buildroot}%{_datadir}/mime/packages/
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/mimetypes/
ln -s %{_datadir}/%{name}/images/cubes.png %{buildroot}%{_datadir}/icons/hicolor/32x32/mimetypes/application-x-%{name}-workspace.png
ln -s %{_datadir}/%{name}/images/cubes.png %{buildroot}%{_datadir}/icons/hicolor/32x32/mimetypes/application-x-%{name}-project.png
%fdupes %{buildroot}%{_prefix}
### Update translation in desktop menu entry and add IDE as category
%suse_update_desktop_file %{name} IDE

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files -f %{name}.lang
%defattr(-,root,root)
%doc about.html AUTHORS COPYING
%{_bindir}/%{name}*
%{_bindir}/clg++
%{_bindir}/clgcc
%{_libdir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_mandir}/man1/%{name}*.1%{ext_man}
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/icons/hicolor/32x32/mimetypes/application-x-%{name}-workspace.png
%{_datadir}/icons/hicolor/32x32/mimetypes/application-x-%{name}-project.png

%changelog