| 1 |
# |
| 2 |
# spec file for package ${APPNAME} |
| 3 |
# |
| 4 |
# Copyright (c) ${YEAR} SUSE LINUX Products GmbH, Nuernberg, Germany. |
| 5 |
# Copyright (c) ${YEAR} Florian Hoech |
| 6 |
# |
| 7 |
# All modifications and additions to the file contributed by third parties |
| 8 |
# remain the property of their copyright owners, unless otherwise agreed |
| 9 |
# upon. The license for this file, and modifications and additions to the |
| 10 |
# file, is the same license as for the pristine package itself (unless the |
| 11 |
# license for the pristine package is not an Open Source License, in which |
| 12 |
# case the license is the MIT License). An "Open Source License" is a |
| 13 |
# license that conforms to the Open Source Definition (Version 1.9) |
| 14 |
# published by the Open Source Initiative. |
| 15 |
|
| 16 |
# Please submit bugfixes or comments via http://bugs.opensuse.org/ |
| 17 |
# |
| 18 |
|
| 19 |
|
| 20 |
%define numpy_version 1.0 |
| 21 |
%define py_minversion ${PY_MINVERSION} |
| 22 |
%define py_maxversion ${PY_MAXVERSION} |
| 23 |
%define wx_minversion ${WX_MINVERSION} |
| 24 |
|
| 25 |
%if 0%{?mandriva_version} > 0 |
| 26 |
%define correct_group Graphics |
| 27 |
%else |
| 28 |
%if 0%{?suse_version} > 0 |
| 29 |
%define correct_group Productivity/Graphics/Other |
| 30 |
%else |
| 31 |
%if 0%{?fedora_version} > 0 || 0%{?rhel_version} > 0 || 0%{?centos_version} > 0 || 0%{?scientificlinux_version} > 0 |
| 32 |
%define correct_group Applications/Multimedia |
| 33 |
%endif |
| 34 |
%endif |
| 35 |
%endif |
| 36 |
|
| 37 |
%global debug_package %{nil} |
| 38 |
|
| 39 |
Summary: ${SUMMARY} |
| 40 |
License: GPL-3.0+ |
| 41 |
Group: %{correct_group} |
| 42 |
Name: ${PACKAGE}-0install |
| 43 |
Version: ${VERSION} |
| 44 |
Release: 0 |
| 45 |
Source0: ${HTTPURL}download/${PACKAGE}-%version.tar.gz |
| 46 |
Url: ${URL} |
| 47 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build |
| 48 |
BuildArch: noarch |
| 49 |
BuildRequires: python |
| 50 |
BuildRequires: xdg-utils |
| 51 |
Requires: xdg-utils |
| 52 |
Obsoletes: ${PACKAGE} |
| 53 |
Provides: ${PACKAGE} = %{version} |
| 54 |
Provides: dispcalGUI = %{version} |
| 55 |
Obsoletes: dispcalGUI < 3.1.0.0 |
| 56 |
Obsoletes: dispcalGUI-0install < 3.1.0.0 |
| 57 |
%if 0%{?mandriva_version} > 0 |
| 58 |
Requires: libxscrnsaver1 |
| 59 |
Requires: libsdl2_mixer2.0_0 |
| 60 |
Requires: python-numpy >= %{numpy_version} |
| 61 |
Requires: wxPythonGTK >= %{wx_minversion} |
| 62 |
Requires: python-psutil |
| 63 |
Requires: zeroinstall-injector |
| 64 |
%else |
| 65 |
%if 0%{?suse_version} > 0 |
| 66 |
BuildRequires: update-desktop-files |
| 67 |
BuildRequires: zeroinstall-injector |
| 68 |
Requires: libXss1 |
| 69 |
Requires: python-numpy >= %{numpy_version} |
| 70 |
Requires: libSDL2_mixer-2_0-0 |
| 71 |
Requires: python-wxGTK >= %{wx_minversion} |
| 72 |
Requires: python2-psutil |
| 73 |
Requires: zeroinstall-injector |
| 74 |
%py_requires |
| 75 |
%else |
| 76 |
%if 0%{?fedora_version} > 0 || 0%{?rhel_version} > 0 || 0%{?centos_version} > 0 || 0%{?scientificlinux_version} > 0 |
| 77 |
Requires: libXScrnSaver |
| 78 |
Requires: numpy >= %{numpy_version} |
| 79 |
Requires: SDL2_mixer |
| 80 |
Requires: wxPython >= %{wx_minversion} |
| 81 |
Requires: python2-psutil |
| 82 |
%if 0%{?fedora_version} < 19 |
| 83 |
Requires: zeroinstall-injector |
| 84 |
%else |
| 85 |
Requires: 0install |
| 86 |
%endif |
| 87 |
%endif |
| 88 |
%endif |
| 89 |
%endif |
| 90 |
|
| 91 |
%description |
| 92 |
${DESC} |
| 93 |
|
| 94 |
%prep |
| 95 |
%setup -n ${PACKAGE}-%version |
| 96 |
|
| 97 |
%build |
| 98 |
|
| 99 |
%install |
| 100 |
PYTHONPATH=. %{__python} util/0install_desktop.py "%{buildroot}%{_datadir}" |
| 101 |
|
| 102 |
%if 0%{?suse_version} > 0 |
| 103 |
# Update desktop files to prevent buildservice from complaining |
| 104 |
desktopfilenames=`%{__python} -c "import glob |
| 105 |
import os |
| 106 |
print ' '.join([os.path.splitext(os.path.basename(path))[0] for path in |
| 107 |
glob.glob('%{buildroot}%{_datadir}/applications/*.desktop')])"` |
| 108 |
for desktopfilename in $desktopfilenames ; do |
| 109 |
%suse_update_desktop_file $desktopfilename 2DGraphics |
| 110 |
done |
| 111 |
%endif |
| 112 |
|
| 113 |
%files |
| 114 |
%defattr(-,root,root) |
| 115 |
/usr/share/applications/*.desktop |
| 116 |
/usr/share/icons/hicolor/*/apps/*.png |
| 117 |
|
| 118 |
%post |
| 119 |
${POST} |
| 120 |
|
| 121 |
%postun |
| 122 |
${POSTUN} |
| 123 |
|
| 124 |
%changelog |